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

"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfjimielynbastida
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 

Recently uploaded (20)

Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 

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.