SlideShare a Scribd company logo
1 of 18
ASP.NET MVC: A (Microsoft) Web Coder's Salvation
ASP.NET MVC: A (Microsoft) Web Coder's Salvation
ASP.NET MVC: A (Microsoft) Web Coder's Salvation
ASP.NET MVC: A (Microsoft) Web Coder's Salvation
ASP.NET MVC: A (Microsoft) Web Coder's Salvation
ASP.NET MVC: A (Microsoft) Web Coder's Salvation
ASP.NET MVC: A (Microsoft) Web Coder's Salvation
ASP.NET MVC: A (Microsoft) Web Coder's Salvation
ASP.NET MVC: A (Microsoft) Web Coder's Salvation
ASP.NET MVC: A (Microsoft) Web Coder's Salvation
ASP.NET MVC: A (Microsoft) Web Coder's Salvation
ASP.NET MVC: A (Microsoft) Web Coder's Salvation
ASP.NET MVC: A (Microsoft) Web Coder's Salvation
ASP.NET MVC: A (Microsoft) Web Coder's Salvation
ASP.NET MVC: A (Microsoft) Web Coder's Salvation
ASP.NET MVC: A (Microsoft) Web Coder's Salvation
ASP.NET MVC: A (Microsoft) Web Coder's Salvation
ASP.NET MVC: A (Microsoft) Web Coder's Salvation

More Related Content

Viewers also liked

Viewers also liked (8)

Intertextuality
IntertextualityIntertextuality
Intertextuality
 
Intercanvi
IntercanviIntercanvi
Intercanvi
 
Fundamentos de Microeconomía
Fundamentos de MicroeconomíaFundamentos de Microeconomía
Fundamentos de Microeconomía
 
OrchardCMS module development
OrchardCMS module developmentOrchardCMS module development
OrchardCMS module development
 
61594881 feasibility-study-template
61594881 feasibility-study-template61594881 feasibility-study-template
61594881 feasibility-study-template
 
Y6 华文 单元 4 听读教材
Y6 华文 单元 4 听读教材Y6 华文 单元 4 听读教材
Y6 华文 单元 4 听读教材
 
Thematic analysis
Thematic analysisThematic analysis
Thematic analysis
 
Model View Controller (MVC)
Model View Controller (MVC)Model View Controller (MVC)
Model View Controller (MVC)
 

More from Jay Harris

Bullets Kill People: Building Effective Presentations
Bullets Kill People: Building Effective PresentationsBullets Kill People: Building Effective Presentations
Bullets Kill People: Building Effective PresentationsJay Harris
 
Dethroning Grunt: Simple and Effective Builds with gulp.js
Dethroning Grunt: Simple and Effective Builds with gulp.jsDethroning Grunt: Simple and Effective Builds with gulp.js
Dethroning Grunt: Simple and Effective Builds with gulp.jsJay Harris
 
Test driven node.js
Test driven node.jsTest driven node.js
Test driven node.jsJay Harris
 
node.js Module Development
node.js Module Developmentnode.js Module Development
node.js Module DevelopmentJay Harris
 
The Geek's Guide to SEO
The Geek's Guide to SEOThe Geek's Guide to SEO
The Geek's Guide to SEOJay Harris
 
Going for Speed: Testing for Performance
Going for Speed: Testing for PerformanceGoing for Speed: Testing for Performance
Going for Speed: Testing for PerformanceJay Harris
 
Dev Basics: The ASP.NET Page Life Cycle
Dev Basics: The ASP.NET Page Life CycleDev Basics: The ASP.NET Page Life Cycle
Dev Basics: The ASP.NET Page Life CycleJay Harris
 

More from Jay Harris (7)

Bullets Kill People: Building Effective Presentations
Bullets Kill People: Building Effective PresentationsBullets Kill People: Building Effective Presentations
Bullets Kill People: Building Effective Presentations
 
Dethroning Grunt: Simple and Effective Builds with gulp.js
Dethroning Grunt: Simple and Effective Builds with gulp.jsDethroning Grunt: Simple and Effective Builds with gulp.js
Dethroning Grunt: Simple and Effective Builds with gulp.js
 
Test driven node.js
Test driven node.jsTest driven node.js
Test driven node.js
 
node.js Module Development
node.js Module Developmentnode.js Module Development
node.js Module Development
 
The Geek's Guide to SEO
The Geek's Guide to SEOThe Geek's Guide to SEO
The Geek's Guide to SEO
 
Going for Speed: Testing for Performance
Going for Speed: Testing for PerformanceGoing for Speed: Testing for Performance
Going for Speed: Testing for Performance
 
Dev Basics: The ASP.NET Page Life Cycle
Dev Basics: The ASP.NET Page Life CycleDev Basics: The ASP.NET Page Life Cycle
Dev Basics: The ASP.NET Page Life Cycle
 

Recently uploaded

Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxfnnc6jmgwh
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observabilityitnewsafrica
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Nikki Chapple
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 

Recently uploaded (20)

Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 

Editor's Notes

  1. There was a time when everything was moving towards the desktop. This “Internet” thing was new and cool, but there was no way it would ever last. And no one knew how to code for the web, so to make web development easy and familiar, they made ASP.NET to be just like coding for a desktop. It used the same patterns, the same event-based model, and the same stateful approach. But the web isn't stateful, its only events are GET and POST, and it is nothing like a desktop, so we tortured ourselves for years forcing a square peg through a round hole. The time has come for redemption, and its name is ASP.NET MVC. This session will cover how to write and test an application in MVC, how it differs from ASP.NET, and will discuss some of the new features of ASP.NET MVC 2. Spend an hour discovering how coding for the web is supposed to be--how it is today--and end your misery. Salvation awaits.
  2. In 1994, Netscape released Netscape Navigator 1.0, and though it is not the first graphical browser, it takes off with a speed and enthusiasm greater than any browser before it. The popularity of the web explodes...
  3. Jay Harris is a .NET developer in Southeast Michigan, and is independent software consultant for his company, Arana Software (http://www.aranasoft.com). He has been developing on the web for 15 years, since he abandoned VB3 for JavaScript because he didn't have to wait for a compile. With a career focus on end-user experience, he is a strong advocate of practices and processes that improve quality through code, ranging from automated testing, continuous integration, and performance analysis, to designing applications from the perspective of the user instead of the database. Jay is also active in the developer community beyond speaking, including serving as President of Ann Arbor .Net Developers (http://www.aadnd.org) and as an organizer for Lansing Give Camp and Come Jam With Us. When not coding, he is usually blogging to http://www.cptloadtest.com or playing games on his Xbox 360.
  4. First, the MVC pattern. It is made up of three components: The Model, the View, and the Controller. The Model is the Business Entity. It is responsible for its own internal custom logic, such as validating itself, and is responsible for how to save and retrieve itself. Model is the “How” in an application. The Controller interprets user interactions. It takes user input, such as parameters in a URL or data from a submitted form, and figures out what needs to be done. In ASP.NET MVC, given a URL of “~/Employee/Edit/42”, the Controller understands that the user wants to load and Edit the Employee with an id of 42. Controller will then tell the Employee Model to load id 42, then pass the returned Model to the appropriate View. Controller is the “What” in an application. The View handles display and presentation. It is responsible for taking whatever Model was passed to it by the Controller, and displaying the data appropriately. Given identical lists of Employees, a Last Name Search Results view may display the Employees in a grid with the Last Name as the first column, but the Hire Date Search Results view may place the Hire Date column first. View is the “Where” in an application. The lines on this diagram indicate the direction of data flow in the pattern. Data is passed from the Model to the View via the Controller. The controller requests an instance of the model and passes that instance on to the View. Once the View has the instance, it can access data and properties on the model for Display.
  5. A Nintendo Wii makes a great example of MVC in the real world. The Game Disk is a Model; it knows all of its own business logic, and how to save and retrieve game data from the save file. But, it knows nothing of the Wii or your TV. The Wii (both the head unit and the Wiimote) is the Controller; it knows how to interpret user actions, tell the Model what to do, then pass the signal on to your TV. Finally, the TV is your view, taking the signal passed to it from the Wii and displaying it, but it knows nothing of the Wii itself, only of the signal being passed.
  6. All components are modular & replaceable. Crayons, colored pencils, permanent markers, and paint are all Models to create artwork in a coloring book. Coloring Books are the view to display that artwork, but to a small child, markers work just as well in a coloring book as they do all over the walls of the house, and to a parent covering up that marker on the wall, paint can be applied to that wall just as it can to a fence, the house, or even an easel. The artist is your controller, accepting a model and passing it to the view, but that artist can be you, me, a 5-year-old child, Leonardo DaVinci, or Bob Ross; each is capable of putting crayon to paper.
  7. In MVC, each component has its own responsibility and each component is modular and independent. This allows each component to be very testable...testable without the influence of the other two components.
  8. It’s 1994. No one knows how to code for web, but we thought the web was cool. So, we cheered. Developers everywhere grab a free Geocities or Tripod account, and create web pages that look like ransom notes, plastered with animated Lava Lamp graphics. But we soon dreamed of sites where we could check the stock prices or our bank accounts in real time, but static HTML could’t do this. We needed something more.
  9. 1997. Microsoft releases dynamic web coding with Active Server Pages, or ASP. (Now called Classic ASP.) We could make dynamic sites to check our bank balances, and everyone cheered. But it mashed all of our code together into one big ugly untestable page. We still couldn’t code for the web, but we knew we needed something different.
  10. 2002. The launch of ASP.NET. This separated our Model from our Controller (the ASPX Code Behind) and our View (the ASPX Code-in-Front, the HTML), increasing testability. Since we didn’t know how to code for the web, they made it just like coding for desktop, with many different events and a very stateful platform. We knew how to code for the desktop, so we cheered. But the design didn’t fit, since the web only has two events, GET and POST, and is definitely not stateful. And we still couldn’t separate our View from our Controller for testing. So, we still didn’t know how to code for the web, but we knew we needed something different.
  11. 2009. Microsoft releases the ASP.NET MVC framework. Finally, the web was the web. The design matched the stateless web environment. The design matched the web’s event model. And we had full separation of concerns. We cheered. Now we can learn how to code for the web.
  12. ...and 2010 brings ASP.NET MVC, version 2, with strong typing, model validation, and attributes for simplifying our code.
  13. Demo. The code walkthrough is available on Jay Harri’s blog: http://tinyurl.com/AspNetMvcWalkthrough
  14. Open question period.
  15. Primary Resource: ASP.NET MVC 2 in Action is THE book for learning the new framework. Don’t bother with any other books. This is the only one you need.
  16. A few other resources are available online. - Microsoft’s site will give you more information, and some more depth into using ASP.NET MVC. - The source code can be fully downloaded from CodePlex. - And finally, MVC Contrib is an awesome collection of MVC utilities to make coding and testing your projects even easier.
  17. Feel free to contact Jay Harris using email, twitter, or through my blog. He will try and answer your ASP.NET MVC questions.