2 ASP.NET MVC Scott Hanselman Senior Program Manager Microsoft.

Slides:



Advertisements
Similar presentations
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Advertisements

© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Windows 8 (1) (2) (3) Windows 8 (1) (2) (3)
Feature: Identity Management - Login © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
© 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Feature: Reprint Outstanding Transactions Report © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product.
Jess Chadwick Website Manager, Infragistics
Feature: Purchase Requisitions - Requester © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
MIX 09 4/15/ :14 PM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Feature: Payroll and HR Enhancements © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
ASP.NET 3.5 Mike Ormond Developer & Platform Group Microsoft Ltd
What’s new in ASP.NET 3.5? Mike Ormond Developer & Platform Group Microsoft Ltd
Co- location Mass Market Managed Hosting ISV Hosting.
Windows 7 Training Microsoft Confidential. Windows ® 7 Compatibility Version Checking.
Multitenant Model Request/Response General Model.
AMS304: Introduction to the ASP.NET Model View Controller (MVC) Framework Scott Hanselman Eilon Lipton Microsoft Microsoft
Feature: Purchase Order Prepayments II © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
var site="s15gizmodo" var site="s15gizmodo"
Feature: OLE Notes Migration Utility
Feature: Web Client Keyboard Shortcuts © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
CONTROL ASP.NET Services Caching Routing Localization … ASP.NET WebForms Control EcosystemControl Ecosystem Automatic StateAutomatic.
Feature: SmartList Usability Enhancements © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
Session 1.
Built by Developers for Developers…. © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
 Rico Mariani Architect Microsoft Corporation.
 Scott Hunter Program Manager Microsoft Corporation PC20.
 Bertrand Le Roy Senior Program Manager Lead Microsoft Corporation PC32.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Feature: Assign an Item to Multiple Sites © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
WinHEC /22/2017 © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Building Web Sites with ASP.NET MVC Framework Noam King CTO Sela College
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Feature: Print Remaining Documents © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
Connect with life Connect with life
WEB 304 An Overview of ASP.NET and Windows Workflow Foundation Kashif Alam Program Manager Developer Division Microsoft Corporation.
NEXT: Overview – Sharing skills & code.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Feature: Document Attachment –Replace OLE Notes © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product.
Feature: Suggested Item Enhancements – Sales Script and Additional Information © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows.
MVC A new Web Project Type for ASP.NET. An option. More control over your More control over your A more easily Testable Framework. Not for everyone.
Feature: Customer Combiner and Modifier © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
Feature: Employee Self Service Timecard Entry © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.

© Copyright SELA Software & Education Labs Ltd Baruch Hirsch St. Bnei Brak Israel Noam King CTO Sela College
customer.
Jeff King Senior Program Manager Microsoft Session Code: WIA204.
demo © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
demo Demo.
Feature: Void Historical/Open Transaction Updates © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product.
demo QueryForeign KeyInstance /sm:body()/x:Order/x:Delivery/y:TrackingId1Z
Feature: Suggested Item Enhancements – Analysis and Assignment © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and.
Top model AMERICA’S NEXT view controller. ScottGu Wrote The First Prototype of ASP.NET MVC While Flying A Plane In.
projekt202 © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
The CLR CoreCLRCoreCLR © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product.
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks.
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
Scott Guthrie

© Copyright SELA software & Education Labs Ltd Baruch Hirsch St.Bnei Brak Israel
Возможности Excel 2010, о которых следует знать
ASP.NEXT The ASP.NET 3.5 Extensions
Title of Presentation 12/2/2018 3:48 PM
8/04/2019 9:13 PM © 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Виктор Хаджийски Катедра “Металургия на желязото и металолеене”
Шитманов Дархан Қаражанұлы Тарих пәнінің
Title of Presentation 5/24/2019 1:26 PM
Presentation transcript:

2 ASP.NET MVC Scott Hanselman Senior Program Manager Microsoft

3 Hello Cheesy Scott Hanselman Senior Program Manager Microsoft

4 What’s the Point? This is not Web Forms 4.0 It’s about alternatives. Car vs. Motorcycle. Flexible Extend it. Or not. Fundamental Part of System.Web and isn’t going anywhere. Plays Well With Others Feel free to use NHibernate for Models, Brail for Views and Whatever for Controllers. Keep it simple and DRY

5 Goodness – Driving Goals Maintain Clean Separation of Concerns Easy Testing Red/Green TDD Highly maintainable applications by default Extensible and Pluggable Support replacing any component of the system

6 Goodness – Driving Goals Enable clean URLs and HTML SEO and REST friendly URL structures Great integration within ASP.NET All the same providers still work Membership, Session, Caching, etc. ASP.NET Designer Surface in VS2008

It’s still ASP.NET Providers still work Membership, Caching, Session, etc. Views leverage.aspx and.ascx But they don’t have to if you don’t want them to Within System.Web namespace Feature Sharing

8 3 Circles Model ControllerView

9 A Little More Detail ModelController View Browser requests /Products/ Route is determined Controller is activated Method on Controller is invoke Controller does some stuff Renders View, passing in custom ViewData URLs are rendered, pointing to other Controllers

What is MVC? Request ControllerController Step 1 Incoming request directed to Controller

What is MVC? ControllerController Model Step 2 Controller processes request and forms a data Model

What is MVC? ControllerController ViewView Step 3 Model is passed to View

What is MVC? ControllerController ViewView Step 4 View transforms Model into appropriate output format

What is MVC? ResponseResponse ControllerController ViewView Step 5 Response is rendered

15 Request Lifecycle Scott Hanselman Senior Program Manager Microsoft

16 Routing Scott Hanselman Senior Program Manager Microsoft

17 Extensibility Views Controllers Models Routes …are all Pluggable

18 ViewEngines View Engines render output You get WebForms by default Can implement your own MVCContrib has ones for Brail, Nvelocity NHaml is an interesting one to watch View Engines can be used to Offer new DSLs to make HTML easier Generate totally different mime/types Images, RSS, JSON, XML, OFX, VCards, whatever.

19 Views Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" AutoEventWireup="true" CodeBehind="List.aspx" Inherits="MvcApplication5.Views.Products.List" Title="Products" %> ( )

20 NHaml – Extreme Views %h2= ViewData.CategoryName %ul - foreach (var product in ViewData.Products) %li = product.ProductName.editlink = Html.ActionLink("Edit", new { Action="Edit", ID=product.ProductID }) = Html.ActionLink("Add New Product", new { Action="New" }) - foreach (var product in ViewData.Products) %li = product.ProductName.editlink = Html.ActionLink("Edit", new { Action="Edit", ID=product.ProductID }) = Html.ActionLink("Add New Product", new { Action="New" })

21 Testing Controller Actions No requirement to test within ASP.NET runtime. Use Moq or RhinoMocks or TypeMock Create Test versions of the parts of the runtime you want to stub

22 TDD Scott Hanselman Senior Program Manager Microsoft

23 Complete (ish) Application Scott Hanselman Senior Program Manager Microsoft

24 What’s the Point? This is not Web Forms 4.0 It’s about alternatives. Car vs. Motorcycle. Flexible Extend it. Or not. Fundamental Part of System.Web and isn’t going anywhere. Plays Well With Others Feel free to use NHibernate for Models, Brail for Views and Whatever for Controllers. Keep it simple and DRY

Choosing Between The Two

You Might be an MVC if… You want full control over markup You want a framework that enforces separation of concerns TDD/Unit Testing is a priority for you Control abstractions get in your way more than they help You like writing Javascript

You Might be a WebForm if… You like programming against controls that encapsulate UI and logic You like the WYSWIG designer and would rather avoid angle brackets You like keeping logic on the server rather than hand writing Javascript

Is ASP.NET MVC Ready for Release?

29

30 Resources Tech·TalksTech·Ed Bloggers Live SimulcastsVirtual Labs Evaluation licenses, pre-released products, and MORE! Developer’s Kit, Licenses, and MORE!

31 Resources for Developers

32 ASP.NET Community – Great Learning Content 219 Videos, 83 Tutorials, Starter Kits, Webcasts, Podcasts, suggested Books Questions? Need an Answer (Forums) Over 132,000 new questions a year 72% answered within 7-days Stay up-to-date with Blogs Download the latest alphas, betas, and releases Participate, Contribute, Summit, Learn ASP.NET Wiki, Control Gallery

33 Please complete an evaluation

34 Be well, write good code, and stay in touch

35 © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.