SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Andere mochten auch

Andere mochten auch (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)
 

Mehr von 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
 

Mehr von 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
 

Kürzlich hochgeladen

Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 

Kürzlich hochgeladen (20)

Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 

Hinweis der Redaktion

  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.