Asp.net mvc
-
Upload
naga-harish-movva -
Category
Education
-
view
2.626 -
download
3
description
Transcript of Asp.net mvc
ASP.NET MVC
Rich and SEO Friendly Web Sites
Model
Controller
View
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
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
Model-View-Controller concept
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.
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.
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
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.)
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
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)
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