Welcome Guest, Not a member yet? Register   Sign In
Business rules, model or controller?
#1

[eluser]William Rufino[/eluser]
Hi everyone,

Where should the business rules of my app be located, in the model or the controller ?
#2

[eluser]WanWizard[/eluser]
I would say Model. Try to keep the controller as lean as possible.
#3

[eluser]OliverHR[/eluser]
The Controller in the MVC is not a replacement of the Business Logic Layer. The Controller is a bridge between the logic and the presentation.

The Model in the MVC is the Business Logic Layer.

The Controllers purpose is to be a contract between the View and the Model, handle events, response to user actions, make petitions to Model and response to the views.
#4

[eluser]William Rufino[/eluser]
Interesting...... thanks!
Model it is than!




Theme © iAndrew 2016 - Forum software by © MyBB