Powered by Blogger.

Saturday, March 1, 2014

asp.net mvc 4 tutorial

In this article we will discuss about What is Asp.Net MVC. You can also check about my previosus posts on MVC Framework VS Classic ASP.NET, Generics tutorial in C#.Net and Tutorials on WCF in Asp.Net.

Asp.Net MVC is a web development framework on the Microsoft .NET platform that provides a way for developers to build well-structured web applications. MVC helps in separating the components of a web application which gives you more control in individual parts of the application.

Asp.Net MVC provides an alternative to Web Forms for building web applications on the .NET platform.

Asp.Net MVC 4 works with .NET 4 as well as .NET 4.5.

Also you can check out:

Allow only numeric values into textbox in Asp.Net

- Bind dropdownlist from enum in Asp.Net

- Validation of viewstate MAC failed error in Asp.Net 

The MVC pattern helps you create applications that separate the different aspects of the application (input logic, business logic, and UI logic), while providing a loose coupling between these elements.

MVC stands for Model-View-Controller.

Model part of the application that handles the logic for the application data. Sometimes stores and retrieve data from  database. Business logic belongs in the model.

VIew part of the application handles the display part of data, it display the application's user interface (UI). The UI logic belongs in the view.

Controller part of the application that handles user interaction. The controller handles and responds to user input and interaction. Input logic belongs in the controller.

In Asp.Net MVC you do not have to work with ASPX pages and controls, postbacks or view state, or page lifecycle events.

Some advantages of Asp.Net MVC are:
- MVC makes it easier to manage complexity by dividing an application into the model, the view, and the controller.

- It does not use view state or server-based forms. This makes the MVC framework ideal for developers who want full control over the behavior of an application.

- It provides better support for test-driven development (TDD).

- Asp.Net MVC provides powerfull URL mapping.

- Asp.Net MVC uses existing Asp.net features like forms authentication and Windows authentication, URL authorization, membership and roles, output and data caching, session and profile state management, health monitoring, the configuration system, and the provider architecture.