TechDays 2012 IT Pro Template; - Microsoft_1_

Document Sample
TechDays 2012 IT Pro Template; - Microsoft_1_ Powered By Docstoc
					Developer Day




Les nouveautés du
Ken Casada
Framework .NET 4.5
Technical Evangelist, Microsoft Switzerland
kcasada@microsoft.com
Quick Reminder – What is .NET?

   Entity
                ASP.                            Win         Work     And
  Frame-                      WCF      WPF
                NET                            Forms        Flow     more!
   work



     Base Class Libraries           The CLR            Profiling& Debugging
                                                                APIs

   JIT &          Garbage           Security    Exception          Loader &
   NGEN           Collector          Model      Handling            Binder
.NET Versions

.NET Framework 4.5 is an in-place update
You get it automatically with Windows 8 and Windows Server 2012



                                                         3.5
                                                         3.0        4.5

       .NET 1.0                .NET 1.1                .NET 2.0   .NET 4.0

         2002                     2003                 2005-08    2010 -12


        CLR 1.0                 CLR 1.1                CLR 2.0    CLR 4.0
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)
Language Improvements
Chapter 1/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
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
Chapter 2/6
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, …
Developer Workflows
               Designer Centric




            Model First
   New      § Create .edmx model in designer
            § Generate database from .edmx
 Database
            § Classes auto-generated from .edmx


            Database First
 Existing   § Reverse engineer .edmx model
 Database   § Classes auto-generated from .edmx
Developer Workflows
               Designer Centric                            Code Centric




            Model First                           Code First
   New      § Create .edmx model in designer      § Define classes & mapping in code
            § Generate database from .edmx        § Database auto-created at runtime
 Database
            § Classes auto-generated from .edmx


            Database First                        Code First
 Existing   § Reverse engineer .edmx model        § Define classes & mapping in code
 Database   § Classes auto-generated from .edmx      (Reverse engineer tools available)
Code First
DEMO
Entity Framework Migrations

Product                  Product                  ChangeColumn(
                                                    “Products",
• Id: int                • Id: int
                                                    "Name",
• Name: max              • Name: 128                ca => ca.String(
• UnitPrice: decimal     • UnitPrice: decimal         maxLength:128));




                code change             add-migration          update-database
Migrations
DEMO
Entity Framework Evolution (2)
EF 4.1  EF 4.2  EF 4.3.1
§ Shipped as a standalone release based on .NET 4.0
  (available as NuGet package)
§ Features:
            àCode First Workflow
            Simplified DBContext API
            àMigrations


EF 5
§ Shipped as the EntityFramework NuGet package (Install EF 5 and not EF 4.1, 4.2, 4.3.1)
§ Can be used for applications targeting .NET 4.0 and 4.5
§ Fully compatible with Visual Studio 2010 and Visual Studio 2012
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)
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
ASP.NET 3/6
Chapter
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
ASP.NET Core Runtime and
Framework
Additional Improvements…
§ 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 Minification
Today




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
VS2012 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
Main Improvements
§ HTML 5 Updates
         § Ex: TextMode property of the TextBox control supports
               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
DEMO Web Form
• Strongly Type Data Controls
• Model Binding
ASP.NET MVC 4
Main Improvements
§ 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
DEMO MVC 4
WPF
Chapter 4/6
WPF
Main Improvements
§ Ribbon control

§ Improved performance when
  displaying 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
WCF
Chapter 5/6
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)
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
Chapter 6/6
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
Q&A

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:0
posted:6/27/2013
language:Unknown
pages:37