Your SlideShare is downloading. ×
ASP.NET MVC
ASP.NET MVC
ASP.NET MVC
ASP.NET MVC
ASP.NET MVC
ASP.NET MVC
ASP.NET MVC
ASP.NET MVC
ASP.NET MVC
ASP.NET MVC
ASP.NET MVC
ASP.NET MVC
ASP.NET MVC
ASP.NET MVC
ASP.NET MVC
ASP.NET MVC
ASP.NET MVC
ASP.NET MVC
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

ASP.NET MVC

3,814

Published on

Published in: Technology
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
3,814
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
207
Comments
0
Likes
3
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. ASP.NET MVC Under the Hood
    Paul Stovell
    Readify
  • 2. Agenda
    ASP.NET MVC 101
    ASP.NET MVC Pipeline
    Controller Factories
    Action Invokers
    Model Binders
    Action Filters
    Action Results
    View Engines
  • 3. Introducing ASP.NET MVC
  • 4. GET /
    View
    Controller
    Model
  • 5. ASP.NET MVC Pipeline
  • 6. ASP.NET Request Pipeline
    Module
    Module
    Module
    Handler
    public interface IHttpHandler
    {
    void ProcessRequest(
    HttpContext context);
    boolIsReusable { get; }
    }
    Handler
    Internet
    Handler
    Handler
    Handler
  • 7. Web Forms
    <%@ Page Language="C#"
    CodeBehind="Default.aspx.cs"
    Inherits="Sample.DefaultPage"
    %>
    <div>
    <asp:TextBoxrunat="server" />
    </div>
    PreInit
    Init
    InitComplete
    PreLoad
    Load
    Control Events
    LoadComplete
    PreRender
    SaveStateComplete
    Render
    Unload
    namespace ASP {
    public class default_aspx
    : Sample.DefaultPage,
    System.Web.IHttpHandler
    {
  • 8. MVC Pipeline
    Internet
    Module
    Module
    Controller Factory
    Routing
    Controller.Execute()
    MvcHandler
    Action Invoker
    View Engine
  • 9. MVC Pipeline: Controller Factories
    public interface IControllerFactory
    {
    IControllerCreateController(
    RequestContextrequestContext,
    string controllerName);
    void ReleaseController(
    IController controller);
    }
  • 10. MVC Pipeline: Controllers
    public interface IController
    {
    void Execute(
    RequestContextrequestContext);
    }
    Controller
    IActionInvoker
  • 11. MVC Pipeline: Action Invoker
    public interface IActionInvoker
    {
    boolInvokeAction(
    ControllerContextcontrollerContext,
    string actionName);
    }
  • 12. MVC Pipeline: Action Invoker
    Action Invoker
    Find Action
    Authorization Filters
    Request Validation
    Model Binders
    Pre-Action Filters
    Invoke
    Post-Action Filters
    Execute Action Result
  • 13. MVC Pipeline: Model Binders
    public interface IModelBinder
    {
    object BindModel(
    ControllerContextcontrollerContext,
    ModelBindingContextbindingContext);
    }
  • 14. MVC Pipeline: Action Filters
    public interface IActionFilter
    {
    void OnActionExecuting(
    ActionExecutingContextfilterContext);
    void OnActionExecuted(
    ActionExecutedContextfilterContext);
    }
  • 15. MVC Pipeline: Action Results
    public abstract class ActionResult
    {
    public abstract void ExecuteResult(
    ControllerContext context);
    }
    ViewResultBase
    RedirectResult
    JsonResult
    FileResult
    ViewResult
    PartialViewResult
  • 16. MVC Pipeline: View Engines
    public interface IViewEngine
    {
    ViewEngineResultFindPartialView(
    ControllerContextcontrollerContext,
    string partialViewName,
    booluseCache);
    ViewEngineResultFindView(
    ControllerContextcontrollerContext,
    string viewName,
    string masterName,
    booluseCache);
    void ReleaseView(
    ControllerContextcontrollerContext,
    IView view);
    }
  • 17. Summary
  • 18. Q&A
    www.asp.net/mvc
    http://www.mokosh.co.uk/page/VsCommands.aspx
    Paul Stovell
    paul.stovell@readify.net
    www.paulstovell.com

×