SlideShare ist ein Scribd-Unternehmen logo
1 von 25
MVC3 Development with Visual Studio 2010 Harish Ranganathan					@ranganh Senior Developer Evangelist Microsoft Corporation, India
A quick round trip MVC v 1.0 released in 2009  MVC 2 released in 2010 MVC 3 released in Jan 2011  MVC 3 Tools update in April 2011
What’s new in ASP.NET MVC 3 Razor View Engine Multiple View Engine Support Validation Improvements Dynamic ViewBag Global Filters New ActionResults Project Dialog Improvements VBHTML Support Task-based Helpers Improved Dependency Injection Porting MVC Script Libraries to jQuery Granular ValidateInput Add View Dialog Improvements Project Dialog Extensibility Improvements Improved Caching Support JSON Binding Support
What’s new in ASP.NET MVC 3 Razor View Engine Multiple View Engine Support Validation Improvements Dynamic ViewBag Global Filters New ActionResults Project Dialog Improvements VBHTML Support Task-based Helpers Improved Dependency Injection Porting MVC Script Libraries to jQuery Granular ValidateInput Add View Dialog Improvements Project Dialog Extensibility Improvements Improved Caching Support JSON Binding Support
Upgrading ASP.NET MVC 3 Application Upgrader tinyurl.com/upgrademvc3
demo Quick overview of MVC3 and Razor
Multiple View Engine Support
Multiple View Engine Support protected void Application_Start() { ViewEngines.Engines.Add(newSparkViewFactory());   … }
Razor Clean & Concise Based on Existing Languages Intellisense Code Colorization Unit Testing Support
Syntax Comparison Web Forms 6 transitions <ul> <% for (int i = 0; i < 10; i++) {%>     <li><%=i %></li> <%} %> </ul> <ul> @for (int i = 0; i < 10; i++) {      <li>@i</li> } </ul> Razor 2 transitions
Layouts View Layout <html> <head> 	<title>Title<title> </head> <body> 	@RenderSection("Menu") 	@RenderBody() </body> </html> @{ 	Layout="~/Views/Shared/_Layout.cshtml"; } @section Menu { 	<ul id="pageMenu"> 	<li>Item 1</li> 	<li>Item 2</li> </ul> }
Web Forms to Razor Open Source Razor Converter github.com/telerik/razor-converter
demo Razor Views
Global Filters No longer need attributes Applies to all actions on all controllers
Global Filters protected void Application_Start() { GlobalFilters.Filters.Add(new MyActionFilterAttribute());   … }
demo Global Action Filters
Dynamic ViewBag Accessible via properties Properties map to ViewData entries Late-bound
Dynamic ViewBag <head> <title>@ViewBag.Title<title> </head>
demo Dynamic ViewBag
JavaScript and AJAX JSON Binding jQuery Validation Unobstrusive JavaScript Separation of Presentation and Content No errors if AJAX isn’t supported RemoteAttribute
Client Validation web.config <configuration>     <appSettings>         	<add key=“ClientValidationEnabled" value="true"/>    	</appSettings> </configuration> code HtmlHelper.ClientValidationEnabled = true;
demo Validations
Resources ASP.NET MVC 3 http://www.asp.net/mvc/mvc3 Scott Gu’s Blog http://weblogs.asp.net/scottgu Phil Haack’s Blog http://haacked.com/
Contacts Blog http://geekswithblogs.net/ranganh Twitter @ranganh
© 2010 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.

Weitere ähnliche Inhalte

Was ist angesagt?

ASP.NET AJAX with Visual Studio 2008
ASP.NET AJAX with Visual Studio 2008ASP.NET AJAX with Visual Studio 2008
ASP.NET AJAX with Visual Studio 2008Caleb Jenkins
 
Event sourcing your React-Flux applications
Event sourcing your React-Flux applicationsEvent sourcing your React-Flux applications
Event sourcing your React-Flux applicationsMaurice De Beijer [MVP]
 
Unit testing and MVVM in Silverlight
Unit testing and MVVM in SilverlightUnit testing and MVVM in Silverlight
Unit testing and MVVM in SilverlightDevnology
 
Introduction to Google Guice
Introduction to Google GuiceIntroduction to Google Guice
Introduction to Google GuiceKnoldus Inc.
 
Practical Dynamic Actions - Intro
Practical Dynamic Actions - IntroPractical Dynamic Actions - Intro
Practical Dynamic Actions - IntroJorge Rimblas
 
Rest api code completion for javascript - dotjs 2015
Rest api code completion for javascript - dotjs 2015Rest api code completion for javascript - dotjs 2015
Rest api code completion for javascript - dotjs 2015johannes_fiala
 
Maurice de Beijer
Maurice de BeijerMaurice de Beijer
Maurice de BeijerCodeFest
 
ASP.NET AJAX Basics
ASP.NET AJAX BasicsASP.NET AJAX Basics
ASP.NET AJAX Basicspetrov
 
Integrating consumers IoT devices into Business Workflow
Integrating consumers IoT devices into Business WorkflowIntegrating consumers IoT devices into Business Workflow
Integrating consumers IoT devices into Business WorkflowYakov Fain
 
MongoDB.local Dallas 2019: MongoDB Stitch Tutorial
MongoDB.local Dallas 2019: MongoDB Stitch TutorialMongoDB.local Dallas 2019: MongoDB Stitch Tutorial
MongoDB.local Dallas 2019: MongoDB Stitch TutorialMongoDB
 
learn what React JS is & why we should use React JS .
learn what React JS is & why we should use React JS .learn what React JS is & why we should use React JS .
learn what React JS is & why we should use React JS .paradisetechsoftsolutions
 
Net35 Overview
Net35 OverviewNet35 Overview
Net35 Overviewllangit
 
Building Ajax apps with the Google Web Toolkit
Building Ajax apps with the Google Web ToolkitBuilding Ajax apps with the Google Web Toolkit
Building Ajax apps with the Google Web Toolkitvivek_prahlad
 

Was ist angesagt? (19)

ASP.NET AJAX with Visual Studio 2008
ASP.NET AJAX with Visual Studio 2008ASP.NET AJAX with Visual Studio 2008
ASP.NET AJAX with Visual Studio 2008
 
Event sourcing your React-Flux applications
Event sourcing your React-Flux applicationsEvent sourcing your React-Flux applications
Event sourcing your React-Flux applications
 
Unit testing and MVVM in Silverlight
Unit testing and MVVM in SilverlightUnit testing and MVVM in Silverlight
Unit testing and MVVM in Silverlight
 
Introduction to Google Guice
Introduction to Google GuiceIntroduction to Google Guice
Introduction to Google Guice
 
Practical Dynamic Actions - Intro
Practical Dynamic Actions - IntroPractical Dynamic Actions - Intro
Practical Dynamic Actions - Intro
 
Rest api code completion for javascript - dotjs 2015
Rest api code completion for javascript - dotjs 2015Rest api code completion for javascript - dotjs 2015
Rest api code completion for javascript - dotjs 2015
 
Flex in portal
Flex in portalFlex in portal
Flex in portal
 
Maurice de Beijer
Maurice de BeijerMaurice de Beijer
Maurice de Beijer
 
Itroducing Angular JS
Itroducing Angular JSItroducing Angular JS
Itroducing Angular JS
 
ASP.NET AJAX Basics
ASP.NET AJAX BasicsASP.NET AJAX Basics
ASP.NET AJAX Basics
 
Integrating consumers IoT devices into Business Workflow
Integrating consumers IoT devices into Business WorkflowIntegrating consumers IoT devices into Business Workflow
Integrating consumers IoT devices into Business Workflow
 
MongoDB.local Dallas 2019: MongoDB Stitch Tutorial
MongoDB.local Dallas 2019: MongoDB Stitch TutorialMongoDB.local Dallas 2019: MongoDB Stitch Tutorial
MongoDB.local Dallas 2019: MongoDB Stitch Tutorial
 
Mvc - Titanium
Mvc - TitaniumMvc - Titanium
Mvc - Titanium
 
learn what React JS is & why we should use React JS .
learn what React JS is & why we should use React JS .learn what React JS is & why we should use React JS .
learn what React JS is & why we should use React JS .
 
React js
React jsReact js
React js
 
Net35 Overview
Net35 OverviewNet35 Overview
Net35 Overview
 
Vaadin
VaadinVaadin
Vaadin
 
Asp.net mvc
Asp.net mvcAsp.net mvc
Asp.net mvc
 
Building Ajax apps with the Google Web Toolkit
Building Ajax apps with the Google Web ToolkitBuilding Ajax apps with the Google Web Toolkit
Building Ajax apps with the Google Web Toolkit
 

Ähnlich wie MVC3 Development with visual studio 2010

Advanced MVC3
Advanced MVC3Advanced MVC3
Advanced MVC3shobokshi
 
Build your website with angularjs and web apis
Build your website with angularjs and web apisBuild your website with angularjs and web apis
Build your website with angularjs and web apisChalermpon Areepong
 
Introduction to ASP.NET MVC
Introduction to ASP.NET MVCIntroduction to ASP.NET MVC
Introduction to ASP.NET MVCSunpawet Somsin
 
CTTDNUG ASP.NET MVC
CTTDNUG ASP.NET MVCCTTDNUG ASP.NET MVC
CTTDNUG ASP.NET MVCBarry Gervin
 
DataFX 8 (JavaOne 2014)
DataFX 8 (JavaOne 2014)DataFX 8 (JavaOne 2014)
DataFX 8 (JavaOne 2014)Hendrik Ebbers
 
Simple mvc4 prepared by gigin krishnan
Simple mvc4 prepared by gigin krishnanSimple mvc4 prepared by gigin krishnan
Simple mvc4 prepared by gigin krishnanGigin Krishnan
 
ASP.NET MVC Presentation
ASP.NET MVC PresentationASP.NET MVC Presentation
ASP.NET MVC Presentationivpol
 
Asp.Net Ajax Component Development
Asp.Net Ajax Component DevelopmentAsp.Net Ajax Component Development
Asp.Net Ajax Component DevelopmentChui-Wen Chiu
 
Spring MVC
Spring MVCSpring MVC
Spring MVCyuvalb
 
Head first asp.net mvc 2.0 rtt
Head first asp.net mvc 2.0 rttHead first asp.net mvc 2.0 rtt
Head first asp.net mvc 2.0 rttLanvige Jiang
 
Annotation-Based Spring Portlet MVC
Annotation-Based Spring Portlet MVCAnnotation-Based Spring Portlet MVC
Annotation-Based Spring Portlet MVCJohn Lewis
 
New Features Of Microsoft Visual Studio 2008 And .Net Framework 3.5 To Comsof...
New Features Of Microsoft Visual Studio 2008 And .Net Framework 3.5 To Comsof...New Features Of Microsoft Visual Studio 2008 And .Net Framework 3.5 To Comsof...
New Features Of Microsoft Visual Studio 2008 And .Net Framework 3.5 To Comsof...Shahzad
 
D22 Portlet Development With Open Source Frameworks
D22 Portlet Development With Open Source FrameworksD22 Portlet Development With Open Source Frameworks
D22 Portlet Development With Open Source FrameworksSunil Patil
 
D22 portlet development with open source frameworks
D22 portlet development with open source frameworksD22 portlet development with open source frameworks
D22 portlet development with open source frameworksSunil Patil
 
Google Web Toolkits
Google Web ToolkitsGoogle Web Toolkits
Google Web ToolkitsYiguang Hu
 

Ähnlich wie MVC3 Development with visual studio 2010 (20)

Advanced MVC3
Advanced MVC3Advanced MVC3
Advanced MVC3
 
Build your website with angularjs and web apis
Build your website with angularjs and web apisBuild your website with angularjs and web apis
Build your website with angularjs and web apis
 
Introduction to ASP.NET MVC
Introduction to ASP.NET MVCIntroduction to ASP.NET MVC
Introduction to ASP.NET MVC
 
CTTDNUG ASP.NET MVC
CTTDNUG ASP.NET MVCCTTDNUG ASP.NET MVC
CTTDNUG ASP.NET MVC
 
ASP.NET 4.0 Roadmap
ASP.NET 4.0 RoadmapASP.NET 4.0 Roadmap
ASP.NET 4.0 Roadmap
 
DataFX 8 (JavaOne 2014)
DataFX 8 (JavaOne 2014)DataFX 8 (JavaOne 2014)
DataFX 8 (JavaOne 2014)
 
Simple mvc4 prepared by gigin krishnan
Simple mvc4 prepared by gigin krishnanSimple mvc4 prepared by gigin krishnan
Simple mvc4 prepared by gigin krishnan
 
Walther Aspnet4
Walther Aspnet4Walther Aspnet4
Walther Aspnet4
 
ASP.NET MVC Extensibility
ASP.NET MVC ExtensibilityASP.NET MVC Extensibility
ASP.NET MVC Extensibility
 
Jsf presentation
Jsf presentationJsf presentation
Jsf presentation
 
ASP.NET MVC Presentation
ASP.NET MVC PresentationASP.NET MVC Presentation
ASP.NET MVC Presentation
 
Asp.Net Ajax Component Development
Asp.Net Ajax Component DevelopmentAsp.Net Ajax Component Development
Asp.Net Ajax Component Development
 
Spring MVC
Spring MVCSpring MVC
Spring MVC
 
Head first asp.net mvc 2.0 rtt
Head first asp.net mvc 2.0 rttHead first asp.net mvc 2.0 rtt
Head first asp.net mvc 2.0 rtt
 
Annotation-Based Spring Portlet MVC
Annotation-Based Spring Portlet MVCAnnotation-Based Spring Portlet MVC
Annotation-Based Spring Portlet MVC
 
New Features Of Microsoft Visual Studio 2008 And .Net Framework 3.5 To Comsof...
New Features Of Microsoft Visual Studio 2008 And .Net Framework 3.5 To Comsof...New Features Of Microsoft Visual Studio 2008 And .Net Framework 3.5 To Comsof...
New Features Of Microsoft Visual Studio 2008 And .Net Framework 3.5 To Comsof...
 
Mvc3 crash
Mvc3 crashMvc3 crash
Mvc3 crash
 
D22 Portlet Development With Open Source Frameworks
D22 Portlet Development With Open Source FrameworksD22 Portlet Development With Open Source Frameworks
D22 Portlet Development With Open Source Frameworks
 
D22 portlet development with open source frameworks
D22 portlet development with open source frameworksD22 portlet development with open source frameworks
D22 portlet development with open source frameworks
 
Google Web Toolkits
Google Web ToolkitsGoogle Web Toolkits
Google Web Toolkits
 

Kürzlich hochgeladen

CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 

Kürzlich hochgeladen (20)

CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 

MVC3 Development with visual studio 2010

  • 1. MVC3 Development with Visual Studio 2010 Harish Ranganathan @ranganh Senior Developer Evangelist Microsoft Corporation, India
  • 2. A quick round trip MVC v 1.0 released in 2009 MVC 2 released in 2010 MVC 3 released in Jan 2011 MVC 3 Tools update in April 2011
  • 3. What’s new in ASP.NET MVC 3 Razor View Engine Multiple View Engine Support Validation Improvements Dynamic ViewBag Global Filters New ActionResults Project Dialog Improvements VBHTML Support Task-based Helpers Improved Dependency Injection Porting MVC Script Libraries to jQuery Granular ValidateInput Add View Dialog Improvements Project Dialog Extensibility Improvements Improved Caching Support JSON Binding Support
  • 4. What’s new in ASP.NET MVC 3 Razor View Engine Multiple View Engine Support Validation Improvements Dynamic ViewBag Global Filters New ActionResults Project Dialog Improvements VBHTML Support Task-based Helpers Improved Dependency Injection Porting MVC Script Libraries to jQuery Granular ValidateInput Add View Dialog Improvements Project Dialog Extensibility Improvements Improved Caching Support JSON Binding Support
  • 5. Upgrading ASP.NET MVC 3 Application Upgrader tinyurl.com/upgrademvc3
  • 6. demo Quick overview of MVC3 and Razor
  • 8. Multiple View Engine Support protected void Application_Start() { ViewEngines.Engines.Add(newSparkViewFactory()); … }
  • 9. Razor Clean & Concise Based on Existing Languages Intellisense Code Colorization Unit Testing Support
  • 10. Syntax Comparison Web Forms 6 transitions <ul> <% for (int i = 0; i < 10; i++) {%> <li><%=i %></li> <%} %> </ul> <ul> @for (int i = 0; i < 10; i++) { <li>@i</li> } </ul> Razor 2 transitions
  • 11. Layouts View Layout <html> <head> <title>Title<title> </head> <body> @RenderSection("Menu") @RenderBody() </body> </html> @{ Layout="~/Views/Shared/_Layout.cshtml"; } @section Menu { <ul id="pageMenu"> <li>Item 1</li> <li>Item 2</li> </ul> }
  • 12. Web Forms to Razor Open Source Razor Converter github.com/telerik/razor-converter
  • 14. Global Filters No longer need attributes Applies to all actions on all controllers
  • 15. Global Filters protected void Application_Start() { GlobalFilters.Filters.Add(new MyActionFilterAttribute()); … }
  • 17. Dynamic ViewBag Accessible via properties Properties map to ViewData entries Late-bound
  • 18. Dynamic ViewBag <head> <title>@ViewBag.Title<title> </head>
  • 20. JavaScript and AJAX JSON Binding jQuery Validation Unobstrusive JavaScript Separation of Presentation and Content No errors if AJAX isn’t supported RemoteAttribute
  • 21. Client Validation web.config <configuration> <appSettings> <add key=“ClientValidationEnabled" value="true"/> </appSettings> </configuration> code HtmlHelper.ClientValidationEnabled = true;
  • 23. Resources ASP.NET MVC 3 http://www.asp.net/mvc/mvc3 Scott Gu’s Blog http://weblogs.asp.net/scottgu Phil Haack’s Blog http://haacked.com/
  • 25. © 2010 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.

Hinweis der Redaktion

  1. I have a demo for adding new views to this dialog.
  2. I have a demo for adding new views to this dialog.
  3. ASP.NET MVC 3 supports global action filters. Global action filters are applied to all actions in web application. For example, you can use global action filters for common security checks. They are registered in the global.asax file of the application. Therefore, you can run a filter for all controllers or controller actions, without adding the attribute to all of them. Additionally, you can run a filter only if certain conditions apply.