Forum Discussion
FICO
14 years agoCommunity Manager
Blaze role in MVC Architecture
Blaze role in MVC Architecture As per the MVC Architecture, View contains the presentation logic, Controller is the servlet which handles the flow of data in an application and Model contains the bu...
FICO
14 years agoCommunity Manager
I think your understanding of the MVC architecture is slightly different from mine. To me Model is the data that the application operates on, as in "business object model". Controller is where the logic lives.
(Actually, it seems that both understandings are correct, only yours talks about "Active Model" MVC and I am more used to think about "Passive Model" architectures: http://msdn.microsoft.com/en-us/library/ff649643.aspx. However, since you talk about servlets, which implies HTTP-based architecture, the "Passive Model" type is probably more correct in this case.)
Traditionally, Controller is viewed as a single tier where application and business logic is mixed, sometimes in very ugly spaghetti-code way.
One of the goals of BRMS is to separate true business logic ("rules") from the application logic and externalize it so that business users can maintain it without heavy IT involvement. With that business logic can evolve independently of application code changes and vice versa. So you can think of Controller as a two sub-tiers: Application Controller (servlets/EJBs/etc. implementing page flow, model data loading/updates, etc.) and Business Controller (rule server making business decisions on the model data prepared by the Application Controller).
Blaze rules repository (the place where rules are stored and from which they are loaded into the rules server) could be viewed as a part of the Model, but again Model tier has its own subtiers and sometimes it is easier to think of the rules repository as "Configuration" on steroids (http://blaze.i.lithium.com/i/smilies/16x16_smiley-wink.gif) Rules never change during their execution in the server, but the data that they operate on does.