What is MVC ?
MVC is a framework pattern that divides an application’s implementation logic into three component as : Models, Views, and Controllers
1. Model:
The business entity on which the overall application operates. Many applications use a persistent storage mechanism (such as a database) to store data.MVC does not specifically mention the data access layer because it is understood to be encapsulated by the Model.
The model represents core business logic and data. Models encapsulate the properties and behavior of a domain entity and expose properties that describe the entity. for the Auction class represents the concept of an “auction” in the application
2. View:
The user interface that renders the Model into a form of interaction.
The view is responsible for transforming a model or models into a visual representation. web applications, this most often means generating HTML to be rendered in the browser, although views can manifest in many forms.
For instance, the same might be visualized in HTML, PDF, XML, or perhaps even in a spreadsheet.
For instance, the same might be visualized in HTML, PDF, XML, or perhaps even in a spreadsheet.
Following separation of concerns, views should concentrate only on displaying data should not contain any business logic themselves—the business logic stays in the, which should provide the view with everything it needs.
3. Controller:
Handles a request from a View and updates the Model that results in a change of the Model's state. The controller, as the name implies, controls the application logic and acts as the coordinator the view and the model.
Controllers receive input from users via the, then work with the model to perform specific actions, passing the results back to view.
Microsoft has given the development community several web development platforms as follows:
Microsoft’s first answer to web development was Active Server Pages (ASP), a scripting language in which code and markup are authored together in a single file, with each physical file corresponding to a page on the website.
ASP’s server-side scripting approach widely popular and many websites grew out of it. Some of these sites to serve visitors today. After a while, though, developers wanted more.
They for features such as improved code reuse, better separation of concerns, and application of object-oriented programming principles. In 2002, Microsoft ASP.NET as a solution to these concerns.
Like ASP, ASP.NET websites rely on a page-based approach where each page on the is represented in the form of a physical file (called a Web Form) and is accessible that file’s name.
Unlike a page using ASP, a Web Forms page provides some of code and markup by splitting the web content into two different files:
One for the markup and one for the code. ASP.NET and the Web Forms approach developers’ needs for many years, and this continues to be the web development of choice for many .NET developers.
Some .NET developers, however, the Web Forms approach too much of an abstraction from the underlying, JavaScript, and CSS.
Microsoft was quick to spot the growing need in the ASP.NET developer community something different than the page-based Web Forms approach, and the company the first version of ASP.NET MVC in 2008.
Representing a total departure the Web Forms approach, ASP.NET MVC abandons the page-based architecture, relying on the Model-View-Controller (MVC) architecture instead.
Controllers receive input from users via the, then work with the model to perform specific actions, passing the results back to view.
Microsoft’s Web Development Platforms:
Microsoft has given the development community several web development platforms as follows:
Active Server Pages (ASP):
ASP’s server-side scripting approach widely popular and many websites grew out of it. Some of these sites to serve visitors today. After a while, though, developers wanted more.
They for features such as improved code reuse, better separation of concerns, and application of object-oriented programming principles. In 2002, Microsoft ASP.NET as a solution to these concerns.
ASP.NET Web Forms:
Like ASP, ASP.NET websites rely on a page-based approach where each page on the is represented in the form of a physical file (called a Web Form) and is accessible that file’s name.
Unlike a page using ASP, a Web Forms page provides some of code and markup by splitting the web content into two different files:
One for the markup and one for the code. ASP.NET and the Web Forms approach developers’ needs for many years, and this continues to be the web development of choice for many .NET developers.
Some .NET developers, however, the Web Forms approach too much of an abstraction from the underlying, JavaScript, and CSS.
ASP.NET MVC:
Representing a total departure the Web Forms approach, ASP.NET MVC abandons the page-based architecture, relying on the Model-View-Controller (MVC) architecture instead.
No comments:
Post a Comment