Professional Documents
Culture Documents
Whats New in NET Framework 4
Whats New in NET Framework 4
Presentation Outline:
.NET Framework History and Packaging New BCL Improvements Code Contracts Type Equivalence/No-PIA In-Process SxS
A Look Back
.NET 1.1
2003 CLR 1.1
.NET 2.0
2005-08 CLR 2.0
.NET 4
2008 CTP! CLR 4
WPF
Win Forms
DLR
ASP.NE T
WCF
LINQ
And more!
The CLR
JIT & NGEN Garbage Collector Security Model Exception Handling Loader & Binder
Faster
Threading Parallel Extensions Garbage Collection Profiling
Faster
Threading Parallel Extensions Garbage Collection Profiling
Design By Contract
Code Contracts introduce a way to specify contractual information that is not represented by a method or types signature alone.
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
Why Contracts?
There upset about that? But its the best gift in the hole world. Theyre upset about that? But its the best gift in the whole world.
Why Contracts?
A Contract contains
Pre-conditions - must be true before public Rational(int numerator, int denominator)
{ Contract.Requires(denominator > 0); }
A Contract contains
Code Contracts
Type Equivalence Interop Assemblies translate between managed code and COM
For each interface, struct, enum, delegate, and member, contains a managed equivalent with marshalling data
However!
Primary Interop Assemblies cause many pain points
Go Away, PIA!
1. Compilers embed the portions of the interop assemblies that the addins actually use 3. Runtime ensures the embedded definitions of these types are considered equivalent
No-PIA
Faster
Threading Parallel Extensions Garbage Collection Profiling
Code from an Outlook addin our executives used .NET 1.1 just slightly faster for starting threads No Executives at Microsoft could use their mail Bug wasnt our fault but no one cares