Practical ASP.NET MVC 2 Rasmus Kromann-Larsen. This talk Introduction to ASP.NET MVC 2 Observations from my current project.

Slides:



Advertisements
Similar presentations
Introduction to ASP.NET MVC
Advertisements

INTRODUCTION TO ASP.NET MVC AND EXAMPLE WALKTHROUGH RAJAT ARYA EFECS - OIM DAWG – 4/21/2009 ASP.NET MVC.
Introduction to MVC Adding a View Page NTPCUG Tom Perkins, Ph.D.
John Culviner johnculviner.com DEMO CODE:
What’s New in ASP.NET 4.5 Ori Calvo, 2012 John Bryce Hi-Tech College
ASP.NET Web Forms vs. MVC Choosing the right one for web development Harish Ranganathan Senior Evangelist Microsoft Corporation.
Fabian Vilers Hands on ASP.NET MVC.
InfoPath Forms and Workflows in SP 2010 Wylde Solutions Sydney SharePoint User Group 18 September 2011 Sydney, Australia.
Tutorial -01. Objective In this session we will discuss about : 1.What is MVC? 2.Why MVC? 3.Advantages of MVC over ASP.NET 4.ASP.NET development models.
Virtual techdays INDIA │ august 2010 Building ASP.NET applications using SQL Server Compact Chaitanya Solapurkar │ Partner Technical Consultant,
AMS304: Introduction to the ASP.NET Model View Controller (MVC) Framework Scott Hanselman Eilon Lipton Microsoft Microsoft
Learning WebMatrix: Part 1 of 3 Akber Alwani
Storm-The-Castle an introduction to MVC, AR design pattern using Castle MonoRail and ActiveRecord rev 2 Date: 2009/10/04.
ASP.NET MVC 3 and Some 4 JaxCodeCamp August 2011.
Kay Herzam Herzam IT Consulting What‘s new in ASP.NET MS TechTalk.
Windows.Net Programming Series Preview. Course Schedule CourseDate Microsoft.Net Fundamentals 01/13/2014 Microsoft Windows/Web Fundamentals 01/20/2014.
Ori Calvo, 2010 Hi-Tech College
Sitefinity CMS Technical Overview & Developer’s Perspective
Ori Calvo, 2010 “If people want to have maximum reach across *all* devices then HTML will provide the broadest reach” Scott Guthrie,
Marc Ziss Z Consulting Code Name 'Oryx' Web application scaffolding Easy to dynamically display pages based on the data model of.
Building Web Sites with ASP.NET MVC Framework Noam King CTO Sela College
Introduction to ASP.NET 1www.tech.findforinfo.com.
Introduction to ASP.NET MVC Information for this presentation was taken from Pluralsight Building Applications with ASP.NET MVC 4.
WEBMATRIX Microsoft Pranav Rastogi.
Lap Around Visual Studio 2008 &.NET 3.5 Enhancements.
Jean-Claude Trachsel Senior Consultant Trivadis AG Building a Website with ASP.NET MVC.
Productivity with ReSharper Rasmus Kromann-Larsen.
Jonathan Canfield Mavin Lisa Giss Professor Kenytt D. Avery
George Gonsalves.  Free and lightweight web development tool.  Create, publish, and maintain your website  Optimized for Open Source  Designed for.
Jean-Claude Trachsel Senior Consultant Trivadis AG.
Active Server Pages (ASP), also known as Classic ASP or ASP Classic, was Microsoft's first server-side script engine for dynamically generated web pages.
ASP.NET MVC Intro class MainContoller { function Index() {... raw data HTML CSS JavaScript REQUEST RESPONSE.
What’s new in.NET Framework 3.5 SP1 for Web Developers Sarang S. Datye Consultant – Microsoft Global Services India. Harish Ranganathan Live – Web Developer.
Introduction to MVC Controllers NTPCUG Tom Perkins, Ph.D.
Jeff King Senior Program Manager Microsoft Session Code: WIA204.
J. Michael Palermo IV Director of Development Interface, USA WUX203.
Getting Started with ASP.NET MVC BRIJ BHUSHAN MISHRA.
2 ASP.NET MVC Scott Hanselman Senior Program Manager Microsoft.
Getting started with ASP.NET MVC Dhananjay
ASP.Net MVC Extensibility, scalability and testability Andrew Locatelli Woodcock.
ASP.NET MVC Telerik Academy
Introduction  “M” “V” “C” stands for “MODEL” “VIEW” “CONTROLLER”. ASP.NET MVC is an architecture to develop ASP.NET web applications in a different manner.
ASP.NET MVC An Introduction. What is MVC The Model-View-Controller (MVC) is an architectural pattern separates an application into three main components:
Virtual techdays INDIA │ 9-11 February 2011 SESSION TITLE Kamala Rajan S │ Technical Manager, Marlabs.
Jean-Claude Trachsel Senior Consultant, Trivadis AG The good news.
Model-View-Controller an introduction to MVC design pattern with Castle.MonoRail Presentation: v1.0 Prepared by: Chorn Sokun
Intro to MVC5 Bryan Soltis Bit-Wizards - Director of Technology & Research.
The New Face of ASP.NET ASP.NET MVC, Razor, and jQuery Ido Flatow | Senior Architect | Sela | This session is.
InfoPath Forms and Workflows in SP 2010 Wylde Solutions Sydney SharePoint User Group 18 September 2011 Sydney, Australia.
//liveVirtualacademy2011/ What’s New for ASP.NET 4.5 and Web Development in Visual Studio 11 Developer Preview Γιώργος Καπνιάς MVP, MCT, MCDP, MCDBA, MCTS,
INTRODUCTION TO MVC BY SUHA MNEIMNEH. WHAT’S THE AGENDA What is MVC? MVC components MVC vs web forms vs ASP.NET vocabulary When to create MVC application.
ASP.NET 2.0 Mohammed Abdelhadi Developer.NET Evangelist Microsoft Corporation.
© Copyright SELA software & Education Labs Ltd Baruch Hirsch St.Bnei Brak Israel
Introduction to ASP.NET MVC [Name] [ Address] [Blog URL]
1 Using MVC 6. MVC vs. ASP Web Forms Both run under ASP.NET Can coexist In Web Forms, browser requests page. xxx.aspx and xxx.aspx.cs on the server Page.
Introduction to ASP.NET 2.0
TechEd /1/2018 7:56 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
ASP.NET MVC Introduction
The Modern ASP.NET Tech Stack!
MVC in ASP.NET Core: The new kid on the block
Introduction to ASP.NET MVC
Building Modern Web Apps with ASP.NET MVC 6
ASP.NET Roadmap Mike Ormond Developer & Platform Group Microsoft Ltd
ASP.NEXT The ASP.NET 3.5 Extensions
What’s new in Visual Studio for web developers
MIX 09 2/28/2019 © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
7/19/2019 2:53 AM © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Introduction to ASP.NET Parts 1 & 2
ASP.NET Core Middleware Fundamentals
Introduction to ASP.NET MVC
Presentation transcript:

Practical ASP.NET MVC 2 Rasmus Kromann-Larsen

This talk Introduction to ASP.NET MVC 2 Observations from my current project

ASP.NET MVC Front-controller MVC framework Source available (MS-PL) Young – First preview –December 2007 – ASP.NET MVC 1 – March 2009 – ASP.NET MVC 2 – March 2010 Involves the community – ASP.NET MVC 1 – 5 previews, 1 beta, 1 RC – ASP.NET MVC 2 – 1 preview, 1 beta, 2 RCs

ASP.NET MVC Designed for – Separation of concerns – Testability – Extensibility Leans on existing ASP.NET infrastructure – Authentication, Sessions, Caching, etc, etc... Can be mixed with ASP.NET WebForms

ASP.NET MVC 2 Areas Strongly-typed html helpers Templates Better validation Asynchronous controllers Included in Visual Studio 2010

My impressions Neat – very close to web –... and jQuery is awesome Understand the magic... – Get the source!

Routing Engine MvcHandler (HttpHandler) Controller Factory Controller Controller Action Invoker Model Metadata Provider Model Binder Model Validator Action Method Action Result ViewEngine Filters ViewTemplates

Routing Engine MvcHandler (HttpHandler) Controller Factory Controller Controller Action Invoker Model Metadata Provider Model Binder Model Validator Action Method Action Result ViewEngine Filters ViewTemplates

Action Links Default – String based MvcFutures – Expression based T4MVC – T4 templates – David Ebbo

Action Links - Default Advantages Works in all scenarios Performance Disadvantages Many overloads Breaks easily

Action Links - MvcFutures Advantages Easy to use Disadvantages Areas Performance Syntax

Action Links – T4MVC Advantages Easy to use Discoverability Disadvantages Macro or add-in to run template Duplicated controller classes

When I’d use... Default – Very small sites or never MvcFutures – Small sites without areas T4MVC – Mostly everything else

Routing Engine MvcHandler (HttpHandler) Controller Factory Controller Controller Action Invoker Model Metadata Provider Model Binder Model Validator Action Method Action Result ViewEngine Filters ViewTemplates

Strongly-typed html helpers – Display and Editor templates Defaults templates – Included in MvcFutures as.ascx – Advice: Move into project Grab CodeTemplate T4 scaffolding too! Demo

Routing Engine MvcHandler (HttpHandler) Controller Factory Controller Controller Action Invoker Model Metadata Provider Model Binder Model Validator Action Method Action Result ViewEngine Filters ViewTemplates

Routing Available from.NET 3.5 SP1 Flexible – Test it! Also available for WebForms – Improved support in ASP.NET 4

Routing Current – /Family – /Family/Details/1 – /Family/Edit/1 Desired – /Family – /Family/1 – /Family/1/Edit

Routing Incoming urls – May match multiple routes Outgoing urls – Generated by UrlHelper – May not match the incoming url you think Demo

Routing Engine MvcHandler (HttpHandler) Controller Factory Controller Controller Action Invoker Model Metadata Provider Model Binder Model Validator Action Method Action Result ViewEngine Filters ViewTemplates

Other MVC Frameworks FubuMVC – Built on top of an IoC container – Heavy on composition, conventions Monorail – ”Predecessor” to ASP.NET MVC – Very extensible

Questions Blog: Mail:

My Stack ASP.NET MVC 2 jQuery StructureMap Fluent NHibernate NUnit T4MVC Git TeamCity

View Path Convention Views/[Controller]/[Action] Views/Shared/[Action] Views/[Controller]/[Editor|Display]Templates Views/Shared/[Editor|Display]Templates Can be changed via replacing ViewEngine, but breaks tooling

Model Binding Consists of – Actual model binding – Model validation – Model metadata 09/04/27/6-tips-for-asp-net-mvc-model- binding.aspx 09/04/27/6-tips-for-asp-net-mvc-model- binding.aspx

Routing Engine MvcHandler (HttpHandler) Controller Factory Controller Controller Action Invoker Model Metadata Provider Model Binder Model Validator Action Method Action Result ViewEngine Filters ViewTemplates