Whats New in .NET Framework 4
-
Upload
kumarcherukupally1243 -
Category
Documents
-
view
1.212 -
download
1
description
Transcript of Whats New in .NET Framework 4
![Page 1: Whats New in .NET Framework 4](https://reader033.fdocuments.in/reader033/viewer/2022061119/546aa5eeaf79595d298b484c/html5/thumbnails/1.jpg)
Lap Around the .NET Framework 4
NameTitleCompany
![Page 2: Whats New in .NET Framework 4](https://reader033.fdocuments.in/reader033/viewer/2022061119/546aa5eeaf79595d298b484c/html5/thumbnails/2.jpg)
A Look Back…A Look Back…
.NET 1.0 .NET 1.1 .NET 2.0
3.0
3.5
.NET 4
2002 2003 2008 CTP2005-08
CLR 1.0 CLR 1.1 CLR 2.0 CLR 4
SP1
![Page 3: Whats New in .NET Framework 4](https://reader033.fdocuments.in/reader033/viewer/2022061119/546aa5eeaf79595d298b484c/html5/thumbnails/3.jpg)
The .NET FrameworkThe .NET Framework
Base Class Libraries
The CLRJIT & NGEN
Garbage Collector
Security Model
Exception Handling
Loader & Binder
WPF Win Forms DLR ASP.NET WCF And
more!LINQ
![Page 4: Whats New in .NET Framework 4](https://reader033.fdocuments.in/reader033/viewer/2022061119/546aa5eeaf79595d298b484c/html5/thumbnails/4.jpg)
Client Applications
WPF 4MEF
Web Applications
Web Forms 4AJAX 4
Client/Server
WCF 4
![Page 5: Whats New in .NET Framework 4](https://reader033.fdocuments.in/reader033/viewer/2022061119/546aa5eeaf79595d298b484c/html5/thumbnails/5.jpg)
The Building Blocks…The Building Blocks…Parallel Computing
Task Parallel LibraryParallel LINQ
Data Access
Entity Framework 4Data Services 1.5
Runtime
DLR IntegrationType EquivalenceIn-Process SxS
![Page 6: Whats New in .NET Framework 4](https://reader033.fdocuments.in/reader033/viewer/2022061119/546aa5eeaf79595d298b484c/html5/thumbnails/6.jpg)
Web Forms 4 - Client IDWeb Forms 4 - Client ID
1) User Control (No ID)
2) User Control (“HeaderForm”)
Control Hierarchy3) Drop Down List (“States”)
Resulting Client IDs:1) ctl002) ctl00_HeaderForm3) ctl00_HeaderForm_States
![Page 7: Whats New in .NET Framework 4](https://reader033.fdocuments.in/reader033/viewer/2022061119/546aa5eeaf79595d298b484c/html5/thumbnails/7.jpg)
Web Forms 4 - RoutingWeb Forms 4 - Routing
Request:Products/Bikes
ASP.NET Routing
Route:Product/{name} -> Product.aspx
WebForms Page
File Name:Product.aspx
Route Values:Name = “Bikes”
Response
![Page 8: Whats New in .NET Framework 4](https://reader033.fdocuments.in/reader033/viewer/2022061119/546aa5eeaf79595d298b484c/html5/thumbnails/8.jpg)
ASP.NET WEB FORMS 4CLIENT ID / ROUTING
ASP.NET WEB FORMS 4CLIENT ID / ROUTING
![Page 9: Whats New in .NET Framework 4](https://reader033.fdocuments.in/reader033/viewer/2022061119/546aa5eeaf79595d298b484c/html5/thumbnails/9.jpg)
AJAX 4 - Client TemplatesAJAX 4 - Client Templates
Server-Side (WebForms):<ItemTemplate>
<li><%# Eval("Name") %></li></ItemTemplate>
Client-Side<ul class="sys-template">
<li>{{ Name }}</li></ul>
![Page 10: Whats New in .NET Framework 4](https://reader033.fdocuments.in/reader033/viewer/2022061119/546aa5eeaf79595d298b484c/html5/thumbnails/10.jpg)
AJAX 4 - DataContextAJAX 4 - DataContext
* DataContext includes change tracking automatically
ASMX
WCF
ADO.NETData Services
ASP.NET MVCJsonResult
Etc.
1. Request
2. JSON DataData
Context
3. Modify Data 4. Save Data
![Page 11: Whats New in .NET Framework 4](https://reader033.fdocuments.in/reader033/viewer/2022061119/546aa5eeaf79595d298b484c/html5/thumbnails/11.jpg)
ASP.NET AJAX 4CLIENT TEMPLATES /
DATACONTEXT
ASP.NET AJAX 4CLIENT TEMPLATES /
DATACONTEXT
![Page 12: Whats New in .NET Framework 4](https://reader033.fdocuments.in/reader033/viewer/2022061119/546aa5eeaf79595d298b484c/html5/thumbnails/12.jpg)
WPF 4WPF 4
Data Grid
Ribbon
Multi-Touch
Windows 7 Enhancements
![Page 13: Whats New in .NET Framework 4](https://reader033.fdocuments.in/reader033/viewer/2022061119/546aa5eeaf79595d298b484c/html5/thumbnails/13.jpg)
Managed Extensibility Framework?
Managed Extensibility Framework?
The Managed Extensibility Framework (MEF) is a new library in the .NET Framework that enables greater reuse of applications and components. Using MEF, .NET applications can make the shift from being statically compiled to dynamically composed
![Page 14: Whats New in .NET Framework 4](https://reader033.fdocuments.in/reader033/viewer/2022061119/546aa5eeaf79595d298b484c/html5/thumbnails/14.jpg)
Open/Closed PrincipleOpen/Closed Principle
Software entities should be open for extension,
but closed for modification.
![Page 15: Whats New in .NET Framework 4](https://reader033.fdocuments.in/reader033/viewer/2022061119/546aa5eeaf79595d298b484c/html5/thumbnails/15.jpg)
Known vs. Unknown
![Page 16: Whats New in .NET Framework 4](https://reader033.fdocuments.in/reader033/viewer/2022061119/546aa5eeaf79595d298b484c/html5/thumbnails/16.jpg)
CLIENT APPLICATIONSWPF 4 DATAGRID / MEF
CLIENT APPLICATIONSWPF 4 DATAGRID / MEF
![Page 17: Whats New in .NET Framework 4](https://reader033.fdocuments.in/reader033/viewer/2022061119/546aa5eeaf79595d298b484c/html5/thumbnails/17.jpg)
Entity Framework 4Entity Framework 4
Model-First
POCO
Lazy Loading
Foreign Keys
![Page 18: Whats New in .NET Framework 4](https://reader033.fdocuments.in/reader033/viewer/2022061119/546aa5eeaf79595d298b484c/html5/thumbnails/18.jpg)
A lot of new for WF/WCF 4A lot of new for WF/WCF 4
XAML-only workflows are the new defaultUnified model between WF, WCF, and WPF
Extended base activity librarySimplified WF programming modelSupport for arguments, variables, expressionsMajor improvements to WCF integrationRuntime and designer improvementsService discovery for WCFHosting & management via "Dublin“
![Page 19: Whats New in .NET Framework 4](https://reader033.fdocuments.in/reader033/viewer/2022061119/546aa5eeaf79595d298b484c/html5/thumbnails/19.jpg)
ADO.NET Data Services 1.5ADO.NET Data Services 1.5
Server EnhancementsRow countServer-side pagingFriendly feedsBLOB streams
Client EnhancementsRow CountWPF/SL data binding
![Page 20: Whats New in .NET Framework 4](https://reader033.fdocuments.in/reader033/viewer/2022061119/546aa5eeaf79595d298b484c/html5/thumbnails/20.jpg)
ADO.NET DATA SERVICESROW COUNT AND SERVER-SIDE
PAGING
ADO.NET DATA SERVICESROW COUNT AND SERVER-SIDE
PAGING
![Page 21: Whats New in .NET Framework 4](https://reader033.fdocuments.in/reader033/viewer/2022061119/546aa5eeaf79595d298b484c/html5/thumbnails/21.jpg)
The Parallel Computing Initiative
The Parallel Computing Initiative
Letting the brightest developers solve business problems, not concurrency problems.
“Concurrency for the masses”
![Page 22: Whats New in .NET Framework 4](https://reader033.fdocuments.in/reader033/viewer/2022061119/546aa5eeaf79595d298b484c/html5/thumbnails/22.jpg)
Parallel Computing with .NET 4Parallel Computing with .NET 4
1. Task Parallel Library (TPL)
2. Parallel LINQ (PLINQ)
3. Coordination Data Structures (CDS)
4. System.Threading Improvements
![Page 23: Whats New in .NET Framework 4](https://reader033.fdocuments.in/reader033/viewer/2022061119/546aa5eeaf79595d298b484c/html5/thumbnails/23.jpg)
Parallel LINQParallel LINQ
Parallel LINQ (PLINQ) enables developers to easily leverage manycore with a minimal impact to existing LINQ programming model
var q = from p in people where p.Name == queryInfo.Name && p.State == queryInfo.State && p.Year >= yearStart && p.Year <= yearEnd orderby p.Year ascending select p;
.AsParallel()
![Page 24: Whats New in .NET Framework 4](https://reader033.fdocuments.in/reader033/viewer/2022061119/546aa5eeaf79595d298b484c/html5/thumbnails/24.jpg)
PARALLEL COMPUTINGPARALLEL LINQ (PLINQ)
PARALLEL COMPUTINGPARALLEL LINQ (PLINQ)
![Page 25: Whats New in .NET Framework 4](https://reader033.fdocuments.in/reader033/viewer/2022061119/546aa5eeaf79595d298b484c/html5/thumbnails/25.jpg)
Why the DLR?Why the DLR?
Common Language Runtime
Statically-Typed
C#VB
RubyPython
Dynamically-Typed
![Page 26: Whats New in .NET Framework 4](https://reader033.fdocuments.in/reader033/viewer/2022061119/546aa5eeaf79595d298b484c/html5/thumbnails/26.jpg)
Why the DLR?Why the DLR?
Common Language Runtime
Statically-Typed
C#VB
RubyPython
Dynamically-Typed
Dynamic Language Runtime
![Page 27: Whats New in .NET Framework 4](https://reader033.fdocuments.in/reader033/viewer/2022061119/546aa5eeaf79595d298b484c/html5/thumbnails/27.jpg)
.NET Dynamic Programming.NET Dynamic Programming
PythonBinder
RubyBinder
COMBinder
JScriptBinder
ObjectBinder
Dynamic Language Runtime
Expression TreesDynamic Dispatch
Call Site Caching
IronPython
IronRuby C# VB.NET Others…
![Page 28: Whats New in .NET Framework 4](https://reader033.fdocuments.in/reader033/viewer/2022061119/546aa5eeaf79595d298b484c/html5/thumbnails/28.jpg)
Dynamically Typed ObjectsDynamically Typed Objects
Calculator calc = GetCalculator();int sum = calc.Add(10, 20);
object calc = GetCalculator();Type calcType = calc.GetType();object res = calcType.InvokeMember("Add", BindingFlags.InvokeMethod, null, new object[] { 10, 20 });int sum = Convert.ToInt32(res);
ScriptObject calc = GetCalculator();object res = calc.Invoke("Add", 10, 20);int sum = Convert.ToInt32(res);
dynamic calc = GetCalculator();int sum = calc.Add(10, 20);
Statically typed to be dynamic
Dynamic method invocation
Dynamic conversion
![Page 29: Whats New in .NET Framework 4](https://reader033.fdocuments.in/reader033/viewer/2022061119/546aa5eeaf79595d298b484c/html5/thumbnails/29.jpg)
DLR INTEGRATIONDLR INTEGRATION
![Page 30: Whats New in .NET Framework 4](https://reader033.fdocuments.in/reader033/viewer/2022061119/546aa5eeaf79595d298b484c/html5/thumbnails/30.jpg)
Type EquivalenceType Equivalence
Interop Assemblies translate between managed code and COM
For each interface, struct, enum, delegate, and member, contains a
managed equivalent with marshalling data
![Page 31: Whats New in .NET Framework 4](https://reader033.fdocuments.in/reader033/viewer/2022061119/546aa5eeaf79595d298b484c/html5/thumbnails/31.jpg)
However!However!
Primary Interop Assemblies cause many
pain points…
![Page 32: Whats New in .NET Framework 4](https://reader033.fdocuments.in/reader033/viewer/2022061119/546aa5eeaf79595d298b484c/html5/thumbnails/32.jpg)
Go Away, PIA!Go Away, PIA!
1. Compilers embed the portions of the interop assemblies that the add-ins actually use
2. Runtime ensures the embedded definitions of these types are considered equivalent
![Page 33: Whats New in .NET Framework 4](https://reader033.fdocuments.in/reader033/viewer/2022061119/546aa5eeaf79595d298b484c/html5/thumbnails/33.jpg)
CLR 4TYPE EQUIVALENCE
CLR 4TYPE EQUIVALENCE
![Page 34: Whats New in .NET Framework 4](https://reader033.fdocuments.in/reader033/viewer/2022061119/546aa5eeaf79595d298b484c/html5/thumbnails/34.jpg)
.NET Framework Compatibility.NET Framework Compatibility
.NET 4.0 is a highly compatible release
.NET 4.0 does not auto–roll forwardYou must add a configuration file with a specific switch to get 3.5 apps to run on 4.0
![Page 35: Whats New in .NET Framework 4](https://reader033.fdocuments.in/reader033/viewer/2022061119/546aa5eeaf79595d298b484c/html5/thumbnails/35.jpg)
.NET Framework Compatibility.NET Framework Compatibility
Hang on… if 4.0 is compatible, why not run 3.5 apps automatically on 4.0?
The BEST thing is always to prefer running on the version of the framework you built against
Contact [email protected] and submit your app for testing!
![Page 36: Whats New in .NET Framework 4](https://reader033.fdocuments.in/reader033/viewer/2022061119/546aa5eeaf79595d298b484c/html5/thumbnails/36.jpg)
CLR 2 - Existing Side-By-SideCLR 2 - Existing Side-By-Side
Host Process (i.e. Outlook)
.NET 2.0
2.0 add-in
3.0
3.5
3.0 add-in
3.5 add-in
1.1 add-in
.NET 1.1
![Page 37: Whats New in .NET Framework 4](https://reader033.fdocuments.in/reader033/viewer/2022061119/546aa5eeaf79595d298b484c/html5/thumbnails/37.jpg)
CLR 4 - In-Process Side-By-Side
CLR 4 - In-Process Side-By-Side
.NET 2.0.NET 4.0
2.0 add-in
3.0
3.5
Host Process (i.e. Outlook)
3.0 add-in
3.5 add-in
4.0 add-in
![Page 38: Whats New in .NET Framework 4](https://reader033.fdocuments.in/reader033/viewer/2022061119/546aa5eeaf79595d298b484c/html5/thumbnails/38.jpg)
QUESTIONS?QUESTIONS?
![Page 39: Whats New in .NET Framework 4](https://reader033.fdocuments.in/reader033/viewer/2022061119/546aa5eeaf79595d298b484c/html5/thumbnails/39.jpg)
© 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.