Posts

Showing posts with the label MVC

ASP.NET MVC: Benefits

Back to Home 1) Separation of Concerns - Model: Model is associated with Views and a Controller (Bussiness Entity) - View: Views are the components that display on User Interface (UI) - Controller: Controller is an input control 2) Each component has one responsibility - SRP – Single Responsibility Principle - DRY – Don’t Repeat Yourself 3) More easily testable - TDD – Test-driven development 4) Helps with concurrent development - Performing tasks concurrently - One developer works on views - Another works on controllers 5) Replace any component of the system - Interface-based architecture 6) Almost anything can be replaced or extended - Model binders (request data to CLR objects) - Action/result filters (e.g. OnActionExecuting) - Custom action result types - View engine (Razor, WebForms, NHaml, Spark) - View helpers (HTML, AJAX, URL, etc.) 7) REST-like URLs - /accounts/details ...

ASP.NET MVC Version History

Back to Home ASP.NET MVC 1.0 | .NET Framework : 3.5 | Visual Studio: 2008  Released on 13 March 2009 WebForm View Engine HTML Helpers View Data URL Routing Partial View  Action Filters ASP.NET MVC 2.0  | .NET Framework : 3.5 & 4.0 | Visual Studio: 2008 & 2010 Released on 10 March 2010 Data Annotation Async Controller ASP.NET MVC 3.0  | .NET Framework : 4.0 | Visual Studio: 2010  Released on 13 January 2011 Razor View Engine View Bag ASP.NET MVC 4.0  | .NET Framework : 4.0 & 4.5 | Visual Studio: 2010 & 2012  Released on15 August 2012 WebAPI Bundling & Minification DB Migration Mobile ASP.NET MVC 5.0  | .NET Framework : 4.5 & 4.5.1 | Visual Studio: 2013  Released on17 October 2013 Bootstrap ASP.NET Indentity Back to Home

MVC Request Execution Stages - Life Cycle

Image
Back to Home Execution Stages: For web: HTTP request for Application Incoming request routed to Controller (Perform Routing) The controller processes request and create presentation Model The controller also selects appropriate result (view) Model is passed to View View transforms Model into an appropriate output format (HTML) The response is rendered (HTTP response) Image Courtesy: SlideShare.net  Back to Home

Overview of MVC

Overview of the ASP.NET MVC - Introduction to ASP.NET MVC -  ASP.NET MVC Version History -  Life Cycle of MVC request -  Role of Model, View, and Controller -  Works Behaviour of ASP.NET MVC -  Benefits MVC Architecture - Razor View Engine - Essential Language Features & Helpers - Basic Helpers - Strongly-Typed Helpers - Creating Custom Helpers - Declarative Helpers The MVC Pattern - The MVC Design Pattern - Working with Controllers - Model Templates - MVC State Management - Working with URLs and Routing (URL Routing) - Bundling and Minification Working with Controllers - Controller Actions - Controller and ActionResult Types - Passing Data from View to Controller - Action Filters & Custom Action Filter - Action Selectors HttpGet and HttpPost Razor Views - Razor View Engines and Syntax - Working with Layout Pages - Views & Partial Vi...

Introduction to ASP.Net MVC

Image
Back to Home Model-View-Controller (MVC) is a software architecture pattern. Originally formulated in the late 1970s by Trygve Reenskaug as part of the Smalltalk, MVC architecture works on code reusability and separation of concerns. It was originally developed for desktop Then adapted for internet applications. The Model is the application object, the View is UI presentation, and the Controller defines the way the user reacts to user input from UI. MODEL: - Set of classes that describe the data we are working with - Rules for how the data can be changed and manipulated - May contain data validation rules - Often encapsulate data stored in a database as well as the code used to manipulate the data Most likely a Data Access Layer of some kind VIEW: - Defines how the application’s user interface (UI) will be displayed - Support master views (layouts)  - Support sub-views (partial views or controls) - Web: Template to dynamically generate HTML CONTR...