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 business logic. Can Blaze serve as a Model component in the MVC Architecture as it contains the business logic/rules?
Please suggest...
3 Replies
- FICOCommunity Manager
Yes, typically you would categorise Blaze Advisor's Rule Server and Repository as part of the "Model" in an MVC architecture. By separating the View from the Model, business logic can be changed in the Model without incurring an additional change in the View.
- FICOCommunity 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.
- FICOCommunity Manager
In MVC pattern separates the modeling of the domain, the presentation, and the actions based on user input into three separate classes
- · Model. The model manages the behavior and data of the application domain, responds to requests for information about its state (usually from the view
- · View. The view manages the display of information.
- · Controller. The controller interprets the mouse and keyboard inputs from the user, informing the model and/or the view to change as appropriate.
I think this Blaze role in MVC Architecture you can read more detail on our blog
>
http://www.alliancetek.com/Blog/post/2012/04/02/Why-MVC-for-NET-Development-.aspx