• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
ASP.NET MVC as the next step in web development
 

ASP.NET MVC as the next step in web development

on

  • 1,561 views

 

Statistics

Views

Total Views
1,561
Views on SlideShare
1,561
Embed Views
0

Actions

Likes
0
Downloads
15
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    ASP.NET MVC as the next step in web development ASP.NET MVC as the next step in web development Presentation Transcript

    • ASP.NET MVCas the next stepin web development Volodymyr Voytyshyn 08/27/2011
    • Goal What is ASP.NET MVC?
    • Contents About MVC Pattern ASP.NET Platform Sample Application ASP.NET MVC Project Concepts ASP.NET MVC Key Features MVC vs WebForms Conclusion
    • ABOUT MVC PATTERN
    • History of MVC Pattern Concept of MVC is described in 1979 by Trygve Reenskaug (Norway) One of the first version of MVC is implemented in Smalltallk-80 class library
    • Main Idea of MVC Separate view and data source View Model Controller
    • Classic MVC (Active Model) View Notify for Changes Get data Controller Model Mediator Data Source
    • Classic MVC (Passive Model) View Get data Controller Model Mediator Data Source
    • MVP View Presenter Model Mediator
    • MVP: Key Differences with Classic MVC Presenter knows all about View Presenter communicates with data source directly Events in Model and View removed Presenter implements main presentation logic Presenter is mediator between Model and View
    • ASP.NET PLATFORM
    • ASP.NET Web Forms Key Versions ASP.NET 4.0 2010 ASP.NET 3.5 2007 ASP.NET 2.0 2005 ASP.NET 1.0 2002 ASP 1998
    • ASP.NET MVC Key Versions ASP.NET MVC 3 2011 ASP.NET MVC 2 2010 ASP.NET MVC 1 2009 ASP.NET
    • ASP.NET Components Web Forms View Engine Razor View Engine ASP.NET ASP.NET Web Forms MVC ASP.NET Core Pages Caching Handlers Roles Controls Modules Security Profile Master Pages Globalization Membership Etc.
    • SAMPLE APPLICATION
    • Concept Project name: “Easy Reporting” Idea: time tracking system for developers
    • Key Use Casesuc Use Case Report w orking time Confirm dev elopers w orking time Dev eloper Manager Manage proj ects Manage tasks
    • Components cmp Component Presentation Layer ASP.NET «Web Application» «Class Library» Membership «use» «use» WebUI Castle Windsor ASP.NET MVC 3 «use» «use» Data Access Layer Entity Framework 4 «Class Library» «Class Library» DAL «use» Entities Repository Pattern Linq to Entities Data Layer MS SQL Server 2008 «database» ER
    • BASIC CONCEPTS OF MVC PROJECT
    • Typical MVC Project Structure
    • Simple Controller and Action ProjectController.cs Controller Action
    • Simple View Index.cshtml
    • Simple Client Page
    • MVC Implementation Mediator Controller Client View Action Model
    • ASP.NET MVC KEY FEATURES
    • Action Results ActionResult – base class of result of an action  View  File  Redirect  HTTP  JavaScript  Content  Json  Empty
    • Action Filters  Filter types:  Filter scope: – Authorization – Action Action Filter – Action – Controller – Result – Application – Exception Action  Standard filters: – Authorize – HttpGet – HttpPost Action Filter – OutputCache – HandleError
    • Action Filters: Example ProjectController.cs
    • View Engines Concept Razor ASP.NET MVC *.aspx / *.ascx / *.master Etc.
    • Passing data into View Model ViewData Action View ViewBag TempData
    • HTML Helpers HTML Helper – “server control” in ASP.NET MVC Classic HTML Helpers Declarative HTML Helpers
    • Partial Views Partial view – “user control” in ASP.NET MVC _Layout.cshtml Header.cshtml Footer.cshtml
    • Layout pages and sections Layout page – “master page” in ASP.NET MVC Section – “ContentPlaceHolder” in ASP.NET MVC
    • Routing Controller URL Routing Client Engine Action Params Default route - /controller/action/id
    • Dependency Injection IServiceLocator Setup MvcServiceLocator Implement Controller Factory Controller Service Locator Instantiate Implementation Action Filter View
    • Unit Testing Using Testable Inversion of Control Application principle  Can be tested: – Controllers – Routes – Html helpers – UI Models – View logic – Etc.
    • MVC Control LibrariesClient Side Controls Server Side Controls  JQuery IU  Telerik  DOJO  DevExpress  Etc.  Etc.
    • MVC VS WEBFORMS
    • When we do not need MVC? I need MVC, because … it is better than Web Forms … it implements MVC architecture … I want to escape from view state … I do not want automatically generated id in HTML … I want to get full control over HTML … I want more friendly URLs
    • MVC Benefits Automated testing Powerful AJAX client side Flexibility, extensibility, clarity Easy of learning and easy of using Clearly separated client side and server side
    • MVC Disadvantages Speed of development (particularly in early stages) … but you can win when you make changes in finished product
    • Conclusion
    • Contacts Volodymyr Voytyshyn 5 Knyahyni Olhy Str., Rivne 33000, Ukraine Tel: +38(066) 41 83 509 E-mail: vvoit@softserveinc.com voytyshyn@gmail.com Skype: voytyshin Thank You!Copyright © 2011 SoftServe, Inc.