ASP.NET Model-View-Controller (MVC) Overview

ASP.NET Model-View-Controller (MVC) Overview

ASP.NET Model-View-Controller (MVC) Overview

Comments Off on ASP.NET Model-View-Controller (MVC) Overview

ASP.NET Model-View-Controller (MVC)

Asp.net Model-View-Controller (MVC) architectural pattern separates an application into three main components: the model, the view, and the controller. The Model-View-Controller (MVC) framework provides an alternative to the ASP.NET Web Forms pattern for creating Web applications. The Model-View-Controller (MVC) framework is a lightweight, highly testable presentation framework that (as with Web Forms-based applications) is integrated with existing ASP.NET features. The Model-View-Controller (MVC) framework is defined in the System.Web.Mvc assembly.

Asp.net Model-View-Controller (MVC) Design Pattern

MVC Design Pattern.

 

Model-View-Controller (MVC) gives you a powerful, patterns-based way to build dynamic websites that enables a clean separation of concerns and gives you full control over markup for enjoyable, agile development. Model-View-Controller (MVC) includes many features that enable fast, TDD-friendly development for creating sophisticated applications that use the latest web standards.

Pre-requisites

Basic web development, familiarity with the C# language and ASP.NET framework

What are Web Application Frameworks?

Put simply, Web Application Frameworks allow you to create applications which generate HTML pages (typically, though there are other types of responses which we will brush on later) dynamically, rather than storing pre-created HTML pages on your web server.

This allows the creation of powerful, smart websites that do way beyond displaying static data. Most dynamic websites (meaning websites that do not only display static HTML pages) in the world today are created using some sort of a Web Application Framework.

ASP .NET Web Forms

ASP .NET Web Forms is what .NET developers used to call “ASP .NET”, prior to the introduction of ASP .NET MVC (hence the confusion). It introduced concepts that are similar to developing Windows Forms applications – including draggable controls, page state and code-behind files.

The main advantage of ASP .NET Web Forms is the ease of creating a Web Application, which can initially be created with little to no code at all, using controls from the Toolkit. However, Web Forms doesn’t enforce modern design patterns, may sometimes create cluttered and non-standard HTML pages and couples the user to Microsoft controls & JavaScript libraries.

ASP .NET Web Forms still lives and is used by many .NET developers.

ASP .NET MVC

ASP .NET MVC was introduced in 2008 and is based on the ASP .NET stack, as a competitor to existing, prominent open source MVC Web Application Frameworks such as Ruby on Rails and Django. Like them, ASP .NET MVC is open sourced.

The main advantage of ASP .NET MVC is that it is more flexible, and allows you to use external libraries, implement your own logic, and creates clean, compatible HTML pages and application logic that is easily testable. It does, however, require a steeper learning curve and generally speaking, more code.



Muhammad Hashir Khan Ghouri

Create Account



Log In Your Account