Asp.net mvc

11
ASP.NET MVC Rich and SEO Friendly Web Sites Model Controller View

description

This is about Asp.net mvc, it will small idea about ASP.NET MVC. Thanks

Transcript of Asp.net mvc

Page 1: Asp.net mvc

ASP.NET MVC

Rich and SEO Friendly Web Sites

Model

Controller

View

Page 2: Asp.net mvc

Agenda

• About MVC• About Model, View and Controller• What is ASP.NET MVC• How it works• Why ASP.NET MVC• Why not ASP.NET MVC• ASP.NET Forms vs ASP.NET MVC

Page 3: Asp.net mvc

MVC

• Model–View–Controller is an architectural pattern used in software engineering.

• The pattern isolates application logic for the user, from input and representation (GUI), permitting independent development, testing and maintenance of each.

• MVC used with JAVA and RUBY on RAILS.• Now in ASP.NET too

Page 4: Asp.net mvc

Model-View-Controller concept

Page 5: Asp.net mvc

Model-View-Controller

• Model the core information for an application. This includes the data and validation rules as well as data access and aggregation logic.

• View the representation of the application. In web application HTML markup.

• Controller the control-flow logic. It interacts with the Model and Views to control information and execution of the application.

Page 6: Asp.net mvc

ASP.NET MVC

• ASP.NET MVC is a part of the ASP.NET Web application framework.

• A new way to develop ASP.NET web site.• Quality coding promoted by Test Driven

Development (TDD) for strong unit testing.• ASP.NET MVC brings the power of this development

prototype to ASP.NET development, allowing us to use .NET development skills to build MVC applications.

Page 7: Asp.net mvc

Resulting Data

How ASP.NET MVC works

User (in browser)

Application

Controller

Model

View

HTTP Request

HTTP Response

Execution Parameters

GU

I View

Resu

lting

Data

Page 8: Asp.net mvc

Why ASP.NET MVC• Better support for unit test• Complete control over HTML Markup• Create SEO-friendly URLs

– E.g.:- http://mywebsite.com/products/car • Enables rich AJAX and jQuery integration• The resource wastefulness in standard ASP.NET forms• My personal feel ASP.NET MVC is Faster then ASP.NET Forms.

Because it will not create ViewState like ASP.NET Forms. • For Developers

– We can take advantage of Session, Application and ASP.NET provider models (Membership, Profile and etc.)

Page 9: Asp.net mvc

Why not ASP.NET MVC

• We can't take advantage of the ASP.NET server controls.

• We can't have the state management (ViewState).• For Developers

– Don't have time to make more sharp in C#/VB program skills!!

– No Postbacks, because all actions are handled by Controller.

– No page lifecycle events

Page 10: Asp.net mvc

ASP.NET Forms vs ASP.NET MVC

• ASP.NET Forms– We can use server controls.– Work well for small development team– Server generates pages and maintains the state– We know stuff already! (been around since 2002)

Page 11: Asp.net mvc

ASP.NET Forms vs ASP.NET MVC

• ASP.NET MVC– Supports raw HTML/JS (No server controls)– Better for large team of developers and designers– Manual state management (No viewstate)– It is newly released on April, 2009. We must be

trained.– SEO friendly URLs by default.– Best for Unit testing