1 / 34

Les nouveautés du Framework .NET 4.5

Les nouveautés du Framework .NET 4.5. Ken Casada Technical Evangelist, Microsoft Switzerland kcasada@microsoft.com. Quick Reminder – What is .NET?. Entity Frame-work. ASP. NET. WCF. WPF. Win Forms. Work Flow. And more!. The CLR. Base Class Libraries. Profiling& Debugging APIs.

dmitri
Download Presentation

Les nouveautés du Framework .NET 4.5

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Les nouveautés duFramework .NET 4.5 Ken Casada Technical Evangelist, Microsoft Switzerland kcasada@microsoft.com

  2. Quick Reminder – What is .NET? Entity Frame-work ASP. NET WCF WPF Win Forms Work Flow And more! The CLR Base Class Libraries Profiling& Debugging APIs JIT & NGEN Garbage Collector Security Model Exception Handling Loader & Binder

  3. .NET Versions .NET Framework 4.5 is an in-place update You get it automatically with Windows 8 and Windows Server 2012 3.5 4.5 3.0 .NET 1.0 .NET 1.1 .NET 2.0 .NET 4.0 -12 2002 2003 2005 2010 -08 CLR 1.0 CLR 1.1 CLR 2.0 CLR 4.0

  4. Migrating to .NET 4.5 Steps: • Migrate your existing apps to .NET 4.0 • If everything OK  Migrate to .NET 4.5 • Refer to .NET 4.5 Migration Guidance (http://msdn.microsoft.com/en-us/library/ff657133.aspx)

  5. Language Improvements Chapter 1/6

  6. C# and VB evolution C# 5.0 + VB 11.0 Windows 8 Runtime + Asynchrony C# 4.0 + VB 10.0 Dynamic + (Language Parity) C# 3.0 + VB 9.0 Language Integrated Query C# 2.0 + VB 8.0 Generics C# 1.0 + VB 7.0 Managed Code

  7. Asynchronous programming is becoming the norm in modern, connected applications

  8. DEMO Async

  9. 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

  10. Entity Framework Chapter 2/6

  11. 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 Visual Studio 2010 • Features:  Model First Workflow  POCO, FKs, Lazy Loading, T4 Code Generation, …

  12. Developer Workflows Designer Centric New Database • Model First • Create .edmx model in designer • Generate database from .edmx • Classes auto-generated from .edmx Existing Database • Database First • Reverse engineer .edmx model • Classes auto-generated from .edmx

  13. Developer Workflows Designer Centric Code Centric New Database • Model First • Create .edmx model in designer • Generate database from .edmx • Classes auto-generated from .edmx • Code First • Define classes & mapping in code • Database auto-created at runtime Existing Database • Database First • Reverse engineer .edmx model • Classes auto-generated from .edmx • Code First • Define classes & mapping in code(Reverse engineer tools available)

  14. DEMO Code First

  15. Entity Framework Migrations • Product • Id: int • Name: 128 • UnitPrice: decimal • Product • Id: int • Name: max • UnitPrice: decimal ChangeColumn( “Products", "Name", ca => ca.String( maxLength:128)); code change update-database add-migration

  16. DEMO Migrations

  17. Entity Framework 5 Features only with .NET 4.5 apps • Enums • Spatial Types • Table-Valued Functions • Sprocs with multiple result sets • Automatic compiled LINQ To Entities queries (by just upgrading to .NET 4.5, 6x faster) with both .NET 4.0 and .NET 4.5 apps • CodeFirst and Migrations • Query optimization improvements • Multiple Diagram Support (Visual Studio 2012 feature)

  18. Entity Framework 4.5 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/ Releases EF Power Tools Beta 2 (VS2012 Tools menu  Extensions and updates) http://blogs.msdn.com/b/adonet/archive/2012/04/09/ef-power-tools-beta-2-available.aspx EF 6.0 Alpha 1  http://blogs.msdn.com/b/adonet/archive/2012/10/30/ef6-alpha-1-available-on-nuget.aspx

  19. ASP.NET Chapter 3/6

  20. ASP.NET Core Runtime and Framework Performance • Performance Improvements for ASP.NET Web Hosting • Faster ASP.NET Startup (multi-core JIT compilation sharing common assemblies) • Reduced memory footprint • Up to 35% performance in combination with Windows Server 2012(prefetching feature) More Info: http://www.asp.net/vnext/overview/whitepapers/whats-new#_Toc_perf

  21. ASP.NET Bundling and Minification Today AfterapplyingBundling and Minification More Info: http://weblogs.asp.net/scottgu/archive/2011/11/27/new-bundling-and-minification-support-asp-net-4-5-series.aspx

  22. ASP.NET Web Form Main Improvements • HTML 5 Updates • Ex: TextModeproperty of the TextBox control supportsnew HTML 5 input types like email, datetime • ValidatorControlsnowsupport Unobstrusive JavaScript for client-side validation logic • HTML Encoded Data-BindingExpressions • Strongly Type Data Controls • Model Binding

  23. DEMO ASP.NET Web Form Strongly Type Data Controls Model Binding

  24. ASP.NET MVC 4 Main Improvements • Fresh HTML 5 default projecttemplates • Built-in support for mobile sites • New Mobile projecttemplate • Based on Jquery Mobile (for touch-optimized UI) More Info: http://www.asp.net/whitepapers/mvc4-release-notes

  25. DEMO ASP.NET MVC 4

  26. WPF Chapter 4/6

  27. WPF Main Improvements • Ribbon control • Improved performance whendisplaying large amount of data • MVVM Improvements • Designer improvements: VS2012 has the same design engine as Expression Blend More Info: http://msdn.microsoft.com/en-us/library/bb613588(v=vs.110).aspx

  28. WCF Chapter 5/6

  29. WCF Configuration improvements • Tooltip, Intellisense and compile-time validation in config files (VS 2012) • Generated client config files cleaned: only non-default binding configuration will be generated WebSocket support for WCF based Services • Just with W8 • New Binding: NetHttpBinding and NetHttpsBinding New UDP Binding (fire and forget) • Tip: no out-of-the-box support in .NET 4.0 (sample for that)

  30. WCF Typical WSDL file generated from a WCF service Inside WSDL definition additional files are being referenced (import directives)

  31. WCF New in WCF 4.5: support for flat WSDL file …all info are available in 1 single file (good for interoperability)

  32. WF Chapter 6/6

  33. Workflow • Versioning • Contract First Services • C# Expressions • State machines (*) • Runtime Performance • Designer Improvements • Performance • Usability • Better Integration with VS (*) part of Update 4.0.3 for Microsoft .NET Framework 4: Runtime update (http://support.microsoft.com/kb/2600214) More Info: http://msdn.microsoft.com/en-us/library/hh305677(v=vs.110).aspx

  34. Q&A

More Related