Contents
What is business logic layer in MVC?
A1: Business Logic goes to Model part in MVC . Role of Model is to contain data and business logic. Controller on the other hand is responsible to receive user input and decide what to do. A2: A Business Rule is part of Business Logic .
What is application logic in MVC?
The application logic (interaction between domain logic structures and storage abstraction) should be a part of model layer. To be more precise: it should be inside the Services . The interaction between presentation layer (models, views, layouts, templates) and model layer should happen only through those services.
Which is better business logic or model in MVC?
The model is a very reasonable choice choice to place business logic, but a better/more maintainable approach is to separate your presentation layer from your business logic layer and create a business logic layer and simply call the business logic layer from your models when needed.
How is business logic as a separate layer?
ASP.NET MVC: Business Logic as a Separate Layer ASP.NET MVC offers a great way of how to separate different application layers. View layer is responsible for data representation, the controller layer is responsible for receiving and replying to requests, and models are used as two-way information carriers between the previous two layers.
What is the job of each MVC layer?
Each layer is responsible for doing “its job”. Now MVC controllers may call business, wich call the database to save the records. All projects share the same Entities. The “Models” folder on the MVC project is just an example the team provided.
Which is fungible business logic layer in ASP.NET?
Depending on the complexity of your app, this is the layer that’s most fungible, as you’ll often need to draw a fine line between what is “business logic” that might be universally applicable to any application your organization develops vs. “business logic” that is related to the specific application you’re developing.