The simplest examples I've seen put simple business logic in the controller, but ideally you can create a business layer.
A good example of splitting business logic using MVC3 can be seen in the Microsoft Silk project, which you can download here . In this solution, business logic is allocated to a different project than the MVC project.
In this project, you can see that the controller logic simply handles the relationship between views and view models (note models, not business-level models). Presentation models simply contain information that will be passed on to the views, so if the field in the view changes, the field in the view model changes. The project also goes further to divide presentation models into presentation models for transferring data in representations and form models for transferring data backward, but this is a matter of choice.
This project uses a script transaction template for its business logic. The controller transfers information to the business layer using its own presentation models, which implement the interface in the design of command templates. Information obtained from the business level is carried out through business models of business models. I would strongly recommend that you take a look at this project in order to better understand how separation is achieved.
For further reading of business layers, I also recommend that you take a look at Wrox Enterprise.NET , where several chapters provide a good discussion of business level structuring options, the first of which is the transaction template used in the Silk project.
Hope this helps.
Dangerous
source share