Explain Model in an MVC.

 Model

  • The Model in an MVC application should represent the current state of the application, as well as business logic and/or operations.
  • A very important aspect of the MVC pattern is the Separation of Concerns (SOC). SOC is achieved by encapsulating information inside a section of code, making each section modular, and then having strict control over how each module communicates. 
  • For the MVC pattern, this means that both the View and the Controller can depend on the Model, but the model doesn't depend on neither the View nor the Controller.
  • As mentioned, the Model can be a class already defined in your project, or it can be a new class you add specifically to act as a Model. Therefore, Models in the ASP.NET MVC framework usually exists in a folder called "Models".

Comments

Popular posts from this blog

What are different steps used in JDBC? Write down a small program showing all steps.

Discuss classification or taxonomy of virtualization at different levels.

Pure Versus Partial EC