Upgrade to Pro — share decks privately, control downloads, hide ads and more …

MVC in de praktijk

devNetNoord
September 29, 2011

MVC in de praktijk

devNetNoord 1, sessie 1

devNetNoord

September 29, 2011
Tweet

More Decks by devNetNoord

Other Decks in Technology

Transcript

  1. www.devNetNoord.nl Agenda • Introductie MVC • Patterns, tips & trucs

    – Simplified example anti-pattern – Seperation of concerns principle – Single responsibility principle – Loose coupling pattern – Inversion of control principle – Dependency Injection pattern – Models – DRY principle – REST – Javascript & jQuery
  2. www.devNetNoord.nl ASP.NET MVC • Framework voor web development Browser Presentation

    Layer UI Process Components UI Components Business Layer Business Workflow Application Facade Business Workflow Business Workflow Data Layer Data Access Components Service Agents Data Sources Services Security Operational Management Communication
  3. www.devNetNoord.nl ASP.NET MVC • Framework voor web development Browser Presentation

    Layer UI Process Components UI Components Business Layer Business Workflow Application Facade Business Workflow Business Workflow Data Layer Data Access Components Service Agents Data Sources Security Operational Management Communication Services
  4. www.devNetNoord.nl ASP.NET MVC • Onderdeel van ASP.NET ASP.NET Web Forms

    ASP.NET MVC ASP.NET Web Forms View Engine Razor View Engine ASP.NET Web Pages
  5. www.devNetNoord.nl ASP.NET MVC • Nadruk op HTML, CSS & javascript

    Browser Presentation Layer UI Process Components UI Components HTML CSS Javascript Client Server
  6. www.devNetNoord.nl Patterns, tips & trucs • Seperation of concerns principle

    • Single responsibility principle – Solution – Project
  7. www.devNetNoord.nl • Seperation of concerns principle • Single responsibility principle

    Patterns, tips & trucs • Model View Controller pattern – Model – View – Controller • Fat controller anti-pattern DEMO
  8. www.devNetNoord.nl Patterns, tips & trucs • Loose coupling pattern •

    Inversion of control principle • Dependency Injection pattern
  9. www.devNetNoord.nl Patterns, tips & trucs • DRY principle – Partial

    views & actions – ActionResult – Validaties • Required • StringLength • RegularExpression • Remote DEMO
  10. www.devNetNoord.nl Patterns, tips & trucs • REST – Resources •

    HTML • XML • JSON • CSV, Excel • … ? – HTTP • Methods GET, POST< PUIT, DELETE) • Status codes • Content type DEMO
  11. www.devNetNoord.nl Patterns, tips & trucs • Javascript & jQuery –

    Unobtrusive – Graceful degredation of progressive enhancement – Script services