You are on page 1of 15

Introduction to

ASP.NET MVC

Eng. Khaled Musaied


Oct 2010

Agenda
What

is ASP.NET MVC?
ASP.NET MVC Power.
ASP.NET Web Forms vs. ASP.NET MVC
ASP.NET MVC Parts:
Model
Controller
View
Router

What is ASP.NET MVC?


New

Web Application (Presentation


Layer).
Based on Model-View-Controller
Design Pattern.

ASP.NET MVC Power


Complete

control on HTML.
Smooth Web 2.0 Development .
SEO-friendly URLs.
Easy Test Driven Development
(TDD).
Stateless.

ASP.NET Web Forms vs.


ASP.NET MVC
ASP.NET

Web Forms

Advantages:
Fast Development.
Windows Application Development Experience.
Event Driven.
View State.
Web Controls.

Disadvantages:
Hard to Control HTML.
Unfriendly URLs.
Single Form tag in single page.

ASP.NET Web Forms vs.


ASP.NET MVC
ASP.NET

MVC

Advantages:
Model-View-Controller Design Pattern.
Web Application Development Experience.
Easy to control HTML.
Friendly URLs (SEO).
Disadvantages:
Stateless.
More Development Time.

ASP.NET MVC Parts


Model

( Data Object).
Controller (Control Application
Actions).
View (Renders HTML).
Router (URL Mapping).

Model

Controller

View

View output (Web


Forms)

C
LE
H
TM AN
L

View output (MVC)

Routers
Default
Value

URL

http://yoursite.com/Securit
y/Login
http://yoursite.com/Login

http://yoursite.com/Products/
Details/58
http://yoursite.com/Products/
58
Regular Expression
http://yoursite.com/Customers/Details
.aspx?id=21
http://yoursite.com/Customers/Details
/21

Demos
Hello

World Demo.
Single Form Demo.
Two Forms Demo.
JavaScript Demo.
Routers Demo.

Th@nk$

Q/A

You might also like