Introduction to
ASP.NET MVC
@SirwanAfifi
What is ASP.NET MVC?
Web Development Framework
The Most Up-to-date Ideas and Techniques from Agile
Development
The Best Pa...
Understanding the History of ASP.NET
.NET
A multi-language managed code platform
(brand new at the time – a landmark in it...
• ASP.NET 1.0 was first released in 2002 (it was same thing with Webform)
• ASP.NET 2.0 was released in 2005 along with Vi...
ASP.NET Web Forms
What Is Wrong with ASP.NET Web Forms ?
Viewstate weight
Page life cycle
False sense of separation of concerns (SOC)
Limite...
MVC
MVC (cont.)
Model = HTML View= CSS Controller= Browser
ASP.NET MVC
ASP.NET MVC is a framework for building web applications that
applies the general Model
View Controller patter...
How ASP.NET MVC Fits in with ASP.NET?
• ASP.NET MVC 1 Overview : at the Austin ALT.NET conference in October 2007 in Redmond ScottGu
showed a group of developer...
• Razor View Engine
Razor is the first major update to rendering HTML since ASP.NET 1 shipped almost a decade ago.
The def...
Razor was designed specifically as a view engine syntax. It has one main focus: code-focused templating
for HTML generatio...
The Razor syntax is easier to type, and easier to read. Razor doesn’t have the XML-like heavy syntax
of the Web Forms view...
• Validation Improvements
Validation is an important part of building web applications, but it’s never fun. MVC 3 extended...
• MVC 4 Overview
• ASP.NET Web API : ASP.NET MVC development style but is tailored to writing HTTP services
• Enhancements...
• Enhancements to Default Project Templates
MVC 1.0 MVC 4.0
ASP.NET MVC 4 (cont.)
• Mobile Project Template Using jQuery Mobile
Responsive jQuery Mobile
ASP.NET MVC 4 (cont.)
• Display Modes
Display modes use a convention-based approach to allow selecting different views based on the
browser maki...
• Bundling and Minification
This system reduces requests to your site by combining several individual script references in...
Open Source Release
• MVC 5 Overview
• One ASP.NET
• ASP.Net Identity
• Bootstrap 3.0 in the MVC template
• Authentication Filters
• Filter ov...
• Includes new cloud-optimized versions of MVC, Web API, Web Pages, SignalR, and
Entity Framework.
• MVC, Web API, and Web...
Question?
Upcoming SlideShare
Loading in...5
×

Introduction to ASP.NET MVC

1,203

Published on

Introduction to ASP.NET MVC

Published in: Software, Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,203
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
53
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Introduction to ASP.NET MVC

  1. 1. Introduction to ASP.NET MVC @SirwanAfifi
  2. 2. What is ASP.NET MVC? Web Development Framework The Most Up-to-date Ideas and Techniques from Agile Development The Best Part of ASP.NET Platform It is a complete alternative to traditional ASP.NET Web Forms
  3. 3. Understanding the History of ASP.NET .NET A multi-language managed code platform (brand new at the time – a landmark in its own right) ASP.NET A way to host .NET applications in IIS, letting you interact With HTTP requests and responses ASP.NET Web Forms A set of UI components (pages, buttons, etc.) Pulse a stateful, object-oriented GUI Programming model
  4. 4. • ASP.NET 1.0 was first released in 2002 (it was same thing with Webform) • ASP.NET 2.0 was released in 2005 along with Visual Studio 2005 • ASP.NET MVC was announced in 2007 • ASP.NET 3.5 followed in 2008 and brought with it DynamicData, which enables you to rapidly generate data-driven applications in minutes. • ASP.NET 4 was released along with VS2010. At the same time ASP.NET MVC 4 was released • ASP.NET 4.5 was released along with VS2012 in 2012. This release included ASP.NET MVC 4.5 • ASP.NET 4.5.1 was released along with VS2013. MVC 5.0 • ASP.NET 4.5.2 Update 1,2 VS 2013 (MVC 5.1)
  5. 5. ASP.NET Web Forms
  6. 6. What Is Wrong with ASP.NET Web Forms ? Viewstate weight Page life cycle False sense of separation of concerns (SOC) Limited control over HTML Leaky abstraction Low testability
  7. 7. MVC
  8. 8. MVC (cont.) Model = HTML View= CSS Controller= Browser
  9. 9. ASP.NET MVC ASP.NET MVC is a framework for building web applications that applies the general Model View Controller pattern to the ASP.NET framework
  10. 10. How ASP.NET MVC Fits in with ASP.NET?
  11. 11. • ASP.NET MVC 1 Overview : at the Austin ALT.NET conference in October 2007 in Redmond ScottGu showed a group of developers “this cool thing I wrote on a plane”- codenamed (Scalene) • including code and unit tests • Was released in March 2009 • ASP.NET MVC 2 Overview : was released just one year later, in March 2010 • UI helpers with automatic scaffolding with customizable templates • Attribute-based model validation on both client and server • Strongly typed HTML helpers • Improved Visual Studio tooling • ASP.NET MVC 3 Overview : shipped just 10 months after MVC 2 • The Razor view engine • Support for .NET 4 Data Annotations • Improved model validation • Better JavaScript support with unobtrusive JavaScript, jQuery Validation, and JSON binding • Use of NuGet to deliver software and manage dependencies throughout the platform
  12. 12. • Razor View Engine Razor is the first major update to rendering HTML since ASP.NET 1 shipped almost a decade ago. The default view engine used in MVC 1 and 2 was commonly called the Web Forms view engine syntax in a Web Forms page is shown here :
  13. 13. Razor was designed specifically as a view engine syntax. It has one main focus: code-focused templating for HTML generation. Here’s how that same markup would be generated using Razor: ASP.NET MVC 3.0 Features
  14. 14. The Razor syntax is easier to type, and easier to read. Razor doesn’t have the XML-like heavy syntax of the Web Forms view engine. • Compact, expressive, and fluid • Not a new language : Razor is a syntax that lets you use your existing .NET coding skills in a template in a very intuitive way. • Easy to learn: Precisely because Razor is not a new language, it’s easy to learn. You know HTML, you know .NET; just type HTML and hit the @ sign whenever you need to write some .NET code. • Good IntelliSense ASP.NET MVC 3.0 Features (cont.)
  15. 15. • Validation Improvements Validation is an important part of building web applications, but it’s never fun. MVC 3 extended the validation support to cover most scenarios you’re likely to encounter. • .NET 4 Data Annotation Support : • Unobtrusive JavaScript using data- instead of something like onclick,… • jQuery Validation • JSON Binding : enabling your action methods to accept and model-bind data in JSON format. • Dependency Resolution : MVC 3 introduced a new concept called a dependency resolver, which greatly simplified the use of dependency injection in your applications. ASP.NET MVC 3.0 Features (cont.)
  16. 16. • MVC 4 Overview • ASP.NET Web API : ASP.NET MVC development style but is tailored to writing HTTP services • Enhancements to default project templates • Mobile project template using jQuery Mobile • Display Modes • Task support for Asynchronous Controllers • Bundling and minification ASP.NET MVC 4
  17. 17. • Enhancements to Default Project Templates MVC 1.0 MVC 4.0 ASP.NET MVC 4 (cont.)
  18. 18. • Mobile Project Template Using jQuery Mobile Responsive jQuery Mobile ASP.NET MVC 4 (cont.)
  19. 19. • Display Modes Display modes use a convention-based approach to allow selecting different views based on the browser making the request. The default view engine first looks for views with names ending with .Mobile.cshtml when the browser’s user agent indicates a known mobile device. ASP.NET MVC 4 (cont.)
  20. 20. • Bundling and Minification This system reduces requests to your site by combining several individual script references into a single request. ASP.NET MVC 4 (cont.)
  21. 21. Open Source Release
  22. 22. • MVC 5 Overview • One ASP.NET • ASP.Net Identity • Bootstrap 3.0 in the MVC template • Authentication Filters • Filter overrides • Attribute routing (my Article here) ASP.NET MVC 5
  23. 23. • Includes new cloud-optimized versions of MVC, Web API, Web Pages, SignalR, and Entity Framework. • MVC, Web API, and Web Pages will be merged into one framework, called MVC 6 • MVC 6 has no dependency on System.Web • vNext uses the Rosyln compiler to compile code dynamically • vNext is open source and cross platform • vNext is host agnostic A sneak peak or preview of ASP.NET vNext
  24. 24. Question?
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×