Contents
Where does business logic go in MVP?
Presenter layer
But according to the MVP architecture, business logic belongs in the Presenter layer as this layers is suppose to act as bridge between the ui and model. Many of these demo apps have models that consist of nothing more than a class with public fields to store and retrieve data from.
Is MVP a framework?
After Taligent’s discontinuation in 1998, Andy Bower and Blair McGlashan of Dolphin Smalltalk adapted the MVP pattern to form the basis for their Smalltalk user interface framework. In 2006, Microsoft began incorporating MVP into its documentation and examples for user interface programming in the . NET Framework.
Where does business logic go in a controller?
That is because the controller actually handles the calls to a specific resource, queries the data by making calls to the business logic and links the data (model) to the appropriate view. Mud told you that the business rules go into the model.
Where to put business logic in MVC approach?
The result, if you are following an MVC approach without also separating the application into tiers is that you end up with Models, Views, and Controllers that have bits of business rules and data access logic mixed in with the rest of the logic.
Where to put business logic in C #?
Any validation needs to be handled by IValidatable on the Model. Any business logic needs to be routed to a separate layer. The general answer I have is that business logic normally fits into two categories: Object Oriented Business Logic: Gets modeled as objects (in the model), usually injected as repositories.
Which is an example of an application logic?
For example Object A of type B must have attributed C and D, but not E. Application Logic is more of a technical specification, like using Java servlets and OJB to persist to an Oracle database. In the end, that are buzz words to help describe tiers of technology in an application.