Visual Studio 11 und .NET 4.5 entdecken
Internet access:1. Connect “Radisson_Guest” network2. Open Internet Explorer3. Choose “Other login option”4. Log in as “Meeting delegate”5. Choose the meeting or room name6. Enter code: “tcMh – gTF5”7. Connect
Techtalk Agenda 12.01.2012
09:15 - 10:30 Uhr Visual Studio 11 und .NET 4.5 entdecken - Teil 2Ken Casada, Microsoft Schweiz
10:30 - 10:50 Uhr Pause
10:50 - 12:05 Uhr Visual Studio 11 und .NET 4.5 entdecken - Teil 1Hansjörg Scherer, Microsoft Schweiz
What’s new in .NET 4.5 ?Ken CasadaDeveloper EvangelistMicrosoft [email protected], Blog
Quick Reminder – What Is .NET
Base Class Libraries The CLRJIT & NGEN
Garbage Collector
Security Model
Exception Handling
Loader & Binder
Profiling& Debugging APIs
Entity Frame-work
ASP. NET
WCFAnd
more!WorkFlow
WPFWin
Forms
.NET Versions
• .NET 4.5 is an in-place update• You get it automatically with Windows 8 and Windows
Server 8
.NET 1.0 .NET 1.1 .NET 2.0
3.0
3.5
.NET 4.0
2002 2003 2005 20102005-08
4.5
-Win8
CLR 1.0 CLR 1.1 CLR 2.0 CLR 4.0
Call To Action (Today)
• Test your existing app and send any compatibility issues you may find to the Microsoft Connect web site
STEPS:1) Migrate your existing apps to .NET 4.02) If everything OK Migrate and test them
on .NET 4.5!!!
Language Improvements
C# and VB evolution
Managed Code
Generics
Language Integrated Query
Dynamic + (Language Parity)
C# 5.0 + VB 11.0Windows 8 Runtime + Asynchrony
C# 1.0 + VB 7.0
C# 2.0 + VB 8.0
C# 3.0 + VB 9.0
C# 4.0 + VB 10.0
Asynchronous programming is becoming the norm in modern,
connected applications
Async
demo
DEMO Summary: What is async?
• A new easier way to write connected apps• Two new Keywords: Await and Async in VB and C#• A new Task based design pattern for APIs• A new set of .NET Framework APIs
Entity Framework
Entity Framework Evolution (1)• EF 1
• Shipped with .NET 3.5 SP1• Features:
• Basic ORM support• Database First Workflow
• EF 4 • Shipped with .NET 4.0 and VS 2010• Features:
• Model First Workflow• POCO, FKs, Lazy Loading, T4 Code Generation, …
Developer Workflows
NewDatabase
ExistingDatabase
Designer Centric
Model First• Create .edmx model in
designer• Generate database from .edmx• Classes auto-generated
from .edmxDatabase First• Reverse engineer .edmx model• Classes auto-generated
from .edmx
Developer Workflows
NewDatabase
ExistingDatabase
Designer Centric
Code Centric
Model First• Create .edmx model in
designer• Generate database from .edmx• Classes auto-generated
from .edmxDatabase First• Reverse engineer .edmx model• Classes auto-generated
from .edmx
Code First• Define classes & mapping in
code• Database auto-created at
runtime
Code First• Define classes & mapping in
code(Reverse engineer tools available)
Code First
demo
Entity Framework Migrations
Product• Id: int• Name: max• UnitPrice:
decimal
codechange
update-database
add-migration
Product• Id: int• Name: 128• UnitPrice:
decimal
ChangeColumn( “Products", "Name", ca => ca.String( maxLength:128));
Migrations(Today in Beta 1)
demo
Entity Framework Evolution (2)• EF 4.2 (RTM)
• Shipped as a standalone release based on .NET 4.0 (available as NuGet package)• Features:
• Code First Workflow• Simplified DBContext API
• Migrations (Beta 1)• Available as a NuGet package• Will be part of EF 4.3 (not available yet!!!)
EF 4.3 = EF 4.2 + Migration RTM
Will .NET 4.5 includes EF 4.3 features?
Entity Framework 4.5 Features• Enums• Spatial Data• Table-Valued Functions• Sprocs with multiple result sets• Automatic compiled LINQ queries• Query optimization improvements• Multiple Diagram Support• Database Project integration
most of those features can be tried out by installing the EF June 2011 CTP
Entity Framework Resources
• Learning Resources• Main MSDN Page: http://msdn.com/ef• ASP.NET + EF Tutorials: http://
www.asp.net/entity-framework/tutorials• Blogs• ADO.NET Team Blog: http://blogs.msdn.com/adonet/• EF Design Blog: http://blogs.msdn.com/efdesign/
• Feature Voting: http://ef.mswish.net• Releases• EF Power Tools: http://tinyurl.com/efptctp1• June 2011 Data CTP: http://tinyurl.com/junectp
ASP.NET
ASP.NET Core Runtime and Framework
• Performance• Performance Improvement for ASP.NET Web Hosting• Faster ASP.NET Startup (multi-core JIT compilation, sharing
common assemblies)• Reduced memory footprint (tuning of GC with 1 single setting)
• Up to 35% performance in combination with Windows 8 Server (prefetching feature)
http://www.asp.net/vnext/overview/whitepapers/whats-new#_Toc_perf
ASP.NET Core Runtime and Framework
• ASP.NET 4.5 integrates the popular Microsoft AntiXSS Library
• New API to support Async• Support for WebSockets Protocol
More Info: http://www.asp.net/vnext/overview/whitepapers/whats-new#_Toc303354458
ASP.NET Bundling and MinificationToday
After applying Bundling and Minification
More Info: http://weblogs.asp.net/scottgu/archive/2011/11/27/new-bundling-and-minification-support-asp-net-4-5-series.aspx
Visual Studio 11 improvements for web devs• HTML Editor
• Smart Tasks, support WAI-ARIA accessibility standard,New HTML 5 snippets, better Intellisense, …
• http://www.asp.net/vnext/overview/whitepapers/whats-new#_Toc303354490
• JavaScript Editor• Code outlining, Go to Definition support, …• http://www.asp.net/vnext/overview/whitepapers/whats-new#_Toc303354500
• CSS Editor• Color Picker, CSS 3 support, custom region (/*#region Menu */ … /*#endregion */• http://www.asp.net/vnext/overview/whitepapers/whats-new#_Toc303354508
• Page Inspector
ASP.NET Web Form
• HTML 5 Updates• Ex: TextMode property of the TextBox control support new
HTML 5 input types like email, datetime• Validator Controls now support Unobstrusive
JavaScript for client-side validation logic• HTML Encoded Data-Binding Expressions
• Strongly Type Data Controls• Model Binding
ASP.NET Web Form- Strongly Type Data Controls- Model Binding
demo
ASP.NET MVC 4
• Fresh HTML 5 default project templates• Built-in support for mobile sites• New Mobile project template• Based on JQuery Mobile (for touch-optimized UI)
More Info: http://www.asp.net/whitepapers/mvc4-release-notes
ASP.NET MVC 4
demo
WPF
WPF
• Ribbon control
• Improved performance when displaying large amount of data
• MVVM Improvements• Designer improvements: VS11 has the same design
engine as Expression Blend
• More Info: http://msdn.microsoft.com/en-us/library/bb613588(v=vs.110).aspx
WCF
WCF• Configuration improvements:• Tooltips , Intellisense and compile-time validation in config
files (VS 11)• Generated client config files cleaned
Only non-default binding configuration will be generated
• WebSocket support for WCF based Services (just with W8)
new Bindings: NetHttpBinding and NetHttpsBinding
• New UDP Binding (fire and forget)• no out-of-the box support in .NET 4.0 (sample for that)
WCF
• Typical WSDL file generated from a WCF service
Inside WSDL definition additional files are being referenced (import directives)
WCF
• New in WCF 4.5: support for flat WSDL file
…all info are available in 1 single file(good for Interoperability)
WF
Workflow• Versioning• Contract First Services• C# Expressions• State machines (*)• Runtime Performance• Designer Improvements
• Performance• Usability• Better Integration with VS
(*) part of Update 4.0.1 for Microsoft .NET Framework 4:Runtime update (http://support.microsoft.com/kb/2495593)
More Info: http://msdn.microsoft.com/en-us/library/hh305677(v=vs.110).aspx
Q&A
© 2011 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.