Whats new in .net framework 4
-
Upload
pramod-chavan -
Category
Technology
-
view
369 -
download
2
Transcript of Whats new in .net framework 4
![Page 1: Whats new in .net framework 4](https://reader036.fdocuments.in/reader036/viewer/2022062320/558fc91b1a28ab64198b45c4/html5/thumbnails/1.jpg)
Visual Studio 2010and
.NET Framework 4
Training Workshop
Visual Studio 2010and
.NET Framework 4
Training Workshop
![Page 2: Whats new in .net framework 4](https://reader036.fdocuments.in/reader036/viewer/2022062320/558fc91b1a28ab64198b45c4/html5/thumbnails/2.jpg)
What’s New In.NET Framework 4
What’s New In.NET Framework 4
NameTitleOrganizationEmail
![Page 3: Whats new in .net framework 4](https://reader036.fdocuments.in/reader036/viewer/2022062320/558fc91b1a28ab64198b45c4/html5/thumbnails/3.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 CTP!2005-08
CLR 1.0 CLR 1.1 CLR 2.0 CLR 4
SP1
![Page 4: Whats new in .net framework 4](https://reader036.fdocuments.in/reader036/viewer/2022062320/558fc91b1a28ab64198b45c4/html5/thumbnails/4.jpg)
What Is The .NET Framework?What Is The .NET Framework?
Base Class Libraries
The CLRJIT & NGEN
Garbage Collector
Security Model
Exception Handling
Loader & Binder
WPFWin
FormsDLR
ASP.NET
WCFAnd
more!LINQ
![Page 5: Whats new in .net framework 4](https://reader036.fdocuments.in/reader036/viewer/2022062320/558fc91b1a28ab64198b45c4/html5/thumbnails/5.jpg)
Base Class Library Improvements
Base Class Library Improvements
NumericsBigInteger, Complex
Data StructuresTupleSortedSet<T>, ISet<T>
I/OMemory-Mapped FileUnified Cancellation Model
![Page 6: Whats new in .net framework 4](https://reader036.fdocuments.in/reader036/viewer/2022062320/558fc91b1a28ab64198b45c4/html5/thumbnails/6.jpg)
The goal of CLR 4The goal of CLR 4
Working Better Together…
Faster…
With Fewer Bugs…
In-Proc SxS
Native/Managed InteropDLR Integration
Managed Extensibility Framework
Threading Parallel Extensions
Garbage Collection Profiling
Code Contracts DebuggingCorrupted State Exceptions
![Page 7: Whats new in .net framework 4](https://reader036.fdocuments.in/reader036/viewer/2022062320/558fc91b1a28ab64198b45c4/html5/thumbnails/7.jpg)
The goal of CLR 4The goal of CLR 4
Working Better Together…
Faster…
With Fewer Bugs…
In-Proc SxS
DLR Integration
Parallel Extensions
Garbage Collection Profiling
Code Contracts DebuggingCorrupted State Exceptions
Managed Extensibility Framework
Threading
Native/Managed Interop
![Page 8: Whats new in .net framework 4](https://reader036.fdocuments.in/reader036/viewer/2022062320/558fc91b1a28ab64198b45c4/html5/thumbnails/8.jpg)
Design By ContractDesign By Contract
Code Contracts introduce a way to specify contractual information that is not represented by a method or type’s signature alone.
![Page 9: Whats new in .net framework 4](https://reader036.fdocuments.in/reader036/viewer/2022062320/558fc91b1a28ab64198b45c4/html5/thumbnails/9.jpg)
What is a Contract?What is a Contract?
A contract is…
an exchange of promises between two or more parties to do, or refrain from doing, an act which is enforceable in a court of law.
- Wikipedia
![Page 10: Whats new in .net framework 4](https://reader036.fdocuments.in/reader036/viewer/2022062320/558fc91b1a28ab64198b45c4/html5/thumbnails/10.jpg)
Why Contracts?Why Contracts?
There upset about that? But its the best gift in the hole world.
They’re upset about that? But it’s the best gift in the whole world.
![Page 11: Whats new in .net framework 4](https://reader036.fdocuments.in/reader036/viewer/2022062320/558fc91b1a28ab64198b45c4/html5/thumbnails/11.jpg)
Why Contracts?Why Contracts?
Just because something compiles, doesn’t mean it works…
![Page 12: Whats new in .net framework 4](https://reader036.fdocuments.in/reader036/viewer/2022062320/558fc91b1a28ab64198b45c4/html5/thumbnails/12.jpg)
A Contract contains…A Contract contains…
Pre-conditions - must be true beforepublic Rational(int numerator, int denominator){Contract.Requires(denominator > 0); …}
Post-conditions -must be true afterpublic string GetPassword(){Contract.Ensures(Contract.Result<string>() != null); … return password;}
![Page 13: Whats new in .net framework 4](https://reader036.fdocuments.in/reader036/viewer/2022062320/558fc91b1a28ab64198b45c4/html5/thumbnails/13.jpg)
A Contract contains…A Contract contains…
Invariants - must always be true[ContractInvariantMethod]protected void ObjectInvariant(){Contract.Invariant(denominator > 0);}
![Page 14: Whats new in .net framework 4](https://reader036.fdocuments.in/reader036/viewer/2022062320/558fc91b1a28ab64198b45c4/html5/thumbnails/14.jpg)
Code ContractsCode Contracts
![Page 15: Whats new in .net framework 4](https://reader036.fdocuments.in/reader036/viewer/2022062320/558fc91b1a28ab64198b45c4/html5/thumbnails/15.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 16: Whats new in .net framework 4](https://reader036.fdocuments.in/reader036/viewer/2022062320/558fc91b1a28ab64198b45c4/html5/thumbnails/16.jpg)
Primary Interop Assemblies cause many
pain points…
However!However!
![Page 17: Whats new in .net framework 4](https://reader036.fdocuments.in/reader036/viewer/2022062320/558fc91b1a28ab64198b45c4/html5/thumbnails/17.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 18: Whats new in .net framework 4](https://reader036.fdocuments.in/reader036/viewer/2022062320/558fc91b1a28ab64198b45c4/html5/thumbnails/18.jpg)
No-PIANo-PIA
![Page 19: Whats new in .net framework 4](https://reader036.fdocuments.in/reader036/viewer/2022062320/558fc91b1a28ab64198b45c4/html5/thumbnails/19.jpg)
Existing Side-By-Side (SxS)Existing Side-By-Side (SxS)
.NET 2.0
2.0 add-
in
3.0
3.5
Host Process (i.e. Outlook)
3.0 add-
in
3.5 add-
in
1.1 add-
in
.NET 1.1
![Page 20: Whats new in .net framework 4](https://reader036.fdocuments.in/reader036/viewer/2022062320/558fc91b1a28ab64198b45c4/html5/thumbnails/20.jpg)
In-Process Side-By-Side (SxS)In-Process Side-By-Side (SxS)
.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 21: Whats new in .net framework 4](https://reader036.fdocuments.in/reader036/viewer/2022062320/558fc91b1a28ab64198b45c4/html5/thumbnails/21.jpg)
The goal of CLR 4.0The goal of CLR 4.0
Working Better Together…
Faster…
With Fewer Bugs…
In-Proc SxS
Native/Managed InteropDLR Integration
Managed Extensibility Framework
Threading Parallel Extensions
Garbage Collection Profiling
Code Contracts DebuggingCorrupted State Exceptions
![Page 22: Whats new in .net framework 4](https://reader036.fdocuments.in/reader036/viewer/2022062320/558fc91b1a28ab64198b45c4/html5/thumbnails/22.jpg)