Wednesday 17 February 2010

ASP.NET MVC

 

Model-View-Controller

The Model-View-Controller (MVC) pattern separates the modeling of the domain, the presentation, and the actions based on user input into three separate classes :

  • Model. The model manages the behavior and data of the application domain, responds to requests for information about its state (usually from the view), and responds to instructions to change state (usually from the controller).

  • View. The view manages the display of information.

  • Controller. The controller interprets the mouse and keyboard inputs from the user, informing the model and/or the view to change as appropriate.

Figure 1 depicts the structural relationship between the three objects.

ms978748.des_MVC_Fig01(en-us,MSDN.10).gif

 

ASP.NET MVC is Microsoft framework for building web applications that use a model-view-controller pattern. ASP.NET MVC is built on the ASP.NET framework.

ASP.NET MVC provides the following benefits:

  • Provides complete control over your HTML markup.
  • Enables rich AJAX integration
  • Intuitive website URLs
  • Clear separation of concerns which results in web applications that are easier to maintain and extend over time.
  • Testability – including support for test-driven development.

For Developing Applications using MVC and to use entity framework for adding ADO.NET entity Data Models you need to have .net 3.5 and service pack 1.

The ASP.NET MVC framework is a lightweight, highly testable presentation framework that (as with Web Forms-based applications) is integrated with existing ASP.NET features, such as master pages and membership-based authentication. The MVC framework is defined in the System.Web.Mvc namespace and is a fundamental, supported part of theSystem.Web namespace.

http://www.asp.net/learn/mvc/tutorial-01-cs.aspx

 

Problems:

 

While trying to do a sample application i got the following problems:

1. ADO.Net Entity Data Model not a selectable option when I go to add an item.

Linq to Entity Framework is shipped with Visual Studio 2008 SP1. So in order to use it, we need to apply the Visual Studio SP1

http://www.microsoft.com/downloads/details.aspx?FamilyId=FBEE1648-7106-44A7-9649-6D9F6D58056E&displaylang=en

2. While trying to install sp1 i got the following error saying :

Installation Requirements:

You must first use <A HREF="http://go.microsoft.com/fwlink/?LinkID=121685">Microsoft Visual Studio Patch removal tool</A> before installing Visual Studio 2008 SP1.  The tool will verify Visual Studio integrity and remove previous Visual Studio 2008 updates or pre-release software
Microsoft Visual Studio 2008 - KB945140 (Beta)

image

Visual Studio 2008 Service Pack Preparation Tool must be installed inorder to avoid this error.

No comments:

Post a Comment