Asp.Net MVC Framework

Description

An Introducition to ASP.NET MVC by Alan Dean.Model-View-Controller (MVC) is a well-known design pattern The original 1978 implementation is described in depth in the influential 1992 paper “Applications Programming in Smalltalk-80: How to use Model-View-Controller (MVC)” by Steve Burbeck

Comments
Would you like to comment?

Sign In if already a member, or Join Now for a free account.

Presentation Transcript Presentation Transcript

Introducing ASP.NET MVC : Introducing ASP.NET MVC Alan Dean, Senior Technologist

MVC consists of three kinds of objects : MVC consists of three kinds of objects

Slide7 : Controller Model View

Slide10 : Controller View Model handleEvent service update getData

Separation of Concerns (SoC) : Separation of Concerns (SoC)

MVC Web Frameworks : MVC Web Frameworks

.NET MVC Web Frameworks : .NET MVC Web Frameworks

Demo : Demo Create a new ASP.NET MVC Solution

HTTP Request Flow : HTTP Request Flow HTTP Response GET /Home/Index HTTP/1.1 HTTP Request Route Handler Controller Model View

HTTP Request Flow : HTTP Request Flow public class Global : HttpApplication { protected void Application_Start(object sender, EventArgs e) { RouteTable.Routes.Add(new Route { Url = "[controller]/[action]/[id]", Defaults = new { action = "Index", id = (string)null }, RouteHandler = typeof(MvcRouteHandler) }); } } HTTP Response Route Handler HTTP Request Controller Model View

HTTP Request Flow : HTTP Request Flow public class HomeController : Controller { [ControllerAction] public void Index() { CompanyInfo companyInfo = new CompanyInfo(); companyInfo.CompanyName = "Your company name here"; RenderView("Index", companyInfo); } } HTTP Response Controller HTTP Request Route Handler Model View

HTTP Request Flow : HTTP Request Flow public class CompanyInfo { public string CompanyName { get; set; } } HTTP Response Model HTTP Request Route Handler Controller View

HTTP Request Flow : HTTP Request Flow public partial class Index : ViewPage { } Response View <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Index.aspx.cs" Inherits="MvcApplication.Views.Home.Index" %> <%= this.ViewData.companyName %> <%= Html.ActionLink(“Homepage", "Index", "Home") %>

Welcome!
HTTP Request Route Handler Controller Model

HTTP Request Flow : HTTP Request Flow HTTP/1.1 200 OK Content-Type: text/html Your company name here Index

Welcome!
HTTP Request Route Handler Controller Model View HTTP Response

Wiki : Wiki A wiki is software that allows users to create, edit, and link web pages easily

Wiki Database : Wiki Database

Wiki HTTP API : Wiki HTTP API

GET : GET

POST : POST

PUT : PUT

DELETE : DELETE

REST: The Web Used Correctly : REST: The Web Used Correctly

REST is an Architectural Style : REST is an Architectural Style

Deriving REST : Deriving REST

Uniform Interface : Uniform Interface

Benefits of REST : Benefits of REST

Zubair Masoodi
Web 2.0 developer
User
1 Members Recommend this Teacher

Related Online Classes

Biswadip Goswami
Your First asp.Net Project - Part 1 by Biswadip
Tue, December 23, 08 7:00 PM
(IST)
Copyrights © 2009 authorGEN. All rights reserved.