NET Developer Group Meeting Presentation

Document Sample
NET Developer Group Meeting Presentation Powered By Docstoc
					The Model-View-Controller (MVC) architectural pattern separates an application into three main components: the model, the view, and the controller.
1

offer well-established solutions to architectural problems in software engineering. • • • • • • • • • • Layered N-Tier Client Server Component Based Message Bus Peer-to-Peer MVC Object Oriented SOA and many more

ASP.NET MVC Framework

2

• • • • • •

•

•

MVC is a standard software design pattern ASP.NET MVC enables you to build Model View Controller (MVC) Web Applications by using the ASP.NET Framework. ASP.NET MVC is an alternative, not a replacement Existing ASP.NET features such as master pages, web controls, validation, membership integrated. MVC framework defined in System.Web.MVC namespace, which is part of System.Web namespace. Provide loose coupling between UI logic, business logic and persistence logic; these separation helps you manage complexity when you build an application, because it enables you to focus on one aspect of the implementation at a time. It is lightweight, highly testable presentation; MVC pattern makes it easier to test applications than it is to test a Web Forms-based ASP.NET Web application ASP.NET MVC RTM now available (3/17/2009)

3

• • •

http://www.asp.net/mvc/ http://www.microsoft.com/downloads/details.aspx?FamilyID= 53289097-73ce-43bf-b6a6-35e00103cb4b&displaylang=en NET 3.5 SP1. Visual Studio 2008, Visual Studio 2008 SP1 or Visual Web Developer 2008 SP1 are required to use certain parts of this feature.

4

• • • •

in relation with persistence domain that implement the logic for data access and storage all business logic belongs in this model using ADO.NET, ADO.NET entity framework, Language-Integrated Query (LINQ), LINQ to SQL. • For example: a customer object retrieve information from database, write updated information back to the customers table in DB server

5

• components that display the application’s User Interface (UI) with information. • UI created from Model data for edit view, which is read-only • all UI logic belongs in the view • For example: if you want to display customer information populated into UI, current state of customer object from customers table retrieve information from database
6

• components that handles and response user interaction • work with model to retrieve information and select view to render with model data • input logic belongs to controller • For example: if you want to display customer information populated into UI, current state of customer object from customers table retrieve information from database
7

• The MVC framework does not replace Web Form model, consider carefully • You can use either one • Existing web Forms-based application, continue to work exactly as they always have
8

• easier to manage complexity by dividing an application into the model, the view, and the controller. • 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. • uses a Front Controller pattern that processes Web application requests through a single controller. This enables you to design an application that supports a rich routing infrastructure. • It provides better support for test-driven development (TDD). • It works well for Web applications that are supported by large teams of developers and Web designers who need a high degree of control over the application behavior. • Fine-grained control over HTML and JavaScript • Intuitive URLs
9

• References:
– http://www.asp.net/mvc – http://en.wikipedia.org

• Let’s create a simple ASP.NET MVC application on VS 2008

10


				
DOCUMENT INFO
Shared By:
Tags:
Stats:
views:40
posted:8/10/2009
language:English
pages:10