net framework
TRANSCRIPT
.NET Framework
Bijoy SinghalDeveloper Evangelist
Microsoft India
… v3.0, v3.5, v4.0
Developer’s Wish List…
• Easy to translate requirement into code• Easy to locate and fix issues• Easy manageability and future proofing• Easy handling of
– Data– Business Logic– User Interface
• Easy handling of– Security– Performance– Scalability
Top considerations of framework design
• Making Languages more productive• Providing APIs for complex patterns
– Caching– Add-ins– Concurrency– Synchronization– Scaffolding– Deployment
• Powerful Tools– .NET SDK Tools– Visual Studio
Key Areas of the Framework
Data• ADO.NET• ADO.NET Entity Framework• ADO.NET Data Services
Business Logic• Web Services – REST-ful, WS-*, WCF• Work Flows – WF• Management – IIS, Dublin,Oslo
User Interface• Desktop – Silverlight, WPF, XAML, XBAP, ASP.NET, AJAX, WinForms• Mobile – ASP.NET, WinForms
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
Additions to the Framework…
CLR
WCF, WPF, WF
LINQ
Velocity, MEF, MAF, MVC
PLINQ, DLR, Velocity, Sync Fr
What Is The .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
Core
Services
.NET Framework 4.0
Base Class Library
Common Language Runtime
Windows Workflow
Foundation
Managed Extensibility Framework
Data ServicesWindows
Communication Foundation
User Interface
Windows Presentation Foundation
ASP.NET(WebForms, MVC,
Dynamic Data)
Data Access
Entity Framework
LINQ
ADO.NET
Parallel Extensions
WinForms LINQ to SQL
LanguagesDynamic Language
Runtime
The goal of CLR 4.0Working 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
.NET 4.0
http://brad_abrams.members.winisp.net/Projects/PDC2008/DotNet4Poster/DotNetFramework4PosterDeepZoom.htm
Parallel Computing• Task Parallel Library (TPL)– Imperative Task Parallelism– Work-Stealing Algorithm for maximum efficiency– Higher-level abstraction (no more Thread
knowledge necessary)• Parallel Linq (PLINQ)– Declarative Data Parallelism (focus on the *what*, not the *how*)
– Simple Parallelism via Linq-To-Objects• Coordination Data Structures (CDS)– Common structures to help with parallelism
tasks
Managed Extensibility Framework - Summary
• System.ComponentModel.Composition• MEF Core Components:
– Catalog• Discovers and maintain extensions
– CompositionContainer• Coordinate creations and satisfy dependencies
– ComposablePart• Offer one or more exports• May depend on imports for extension it uses
• Create reusable components– Easy declaration/consumption of extensibility points– Watching a specific directory for new extensions
• No need to create infrastructure from scratch• MEF is dynamically composed
Code Contracts - Summary
• Foundation– Design by contract– Based on MSR’s SPEC#
• What does it bring?– Improved testability– Static verification– API Documentation
• How does it help?– Guarantee obligations on entry (parameter validations)– Guarantee property at exit (return value range)– Maintain property during execution (object invariance)
Garbage Collection - Summary
Server Garbage Collection – Algorithm maximizes overall throughput – fast – but all managed code has to be paused
while it runs.– In CLR 4.0, you can be notified before a Gen 2/ Large Object Heap collection. – Useful when you can do load balancing.
Workstation Garbage Collection• CLR 2.0:
– Can do most, but not all, of a Generation 2 collection without pausing managed code
– New allocations go on ephemeral segment – But can’t do Gen0 and Gen1 at same time as Gen2.
• New in CLR 4.0, we have Background Collection– Background Collection can do a Gen0 or Gen1 while doing Gen2– Only unusual circumstances now lead to long latency
Garbage Collection - Summary
Definite improvement in performance and scalability of the application
Lesser chance of getting OutOfMemoryException
Application health is optimum at all times.
Optimum consumption of the processing power.
On the server side you can load balance your application using GCNotifications.
Nothing really prevents your from using GCNotifications on workstations.
Dynamic Language Support• Dynamic keyword: – mark a property or variable as dynamic at
compile time. – at runtime the corresponding static type will be
assigned to that entity.• Dynamic Language Runtime– Interoperate and interact with the CLR using
dynamic languages– Get the power of .NET for dynamic languages
Dynamic in .NET 4.0 - Summary
• Dynamic Language Runtime– Added dynamism to .NET – Added runtime type checking– Full support for IronRuby, IronPython
• Dynamic Dispatch– Introduced new type – dynamic– Compiler merely packages information and defers binding
to runtime– Uses IDispatch interface– Create your own dynamic types using:
DynamicObject or IDynamicMetaObjectProvider
ASP.NET 4.0• ASP.NET MVC– Separation of Concerns, Testability– High control over market up
• ASP.NET Dynamic Data support for MVC– Easily Create Custom controls and views based on
data base• ASP.NET better CSS and ID
More Web Goodies… • ADO.NET Data Services– REST based exposure of relational data– Ability to go “offline”
• ASP.NET AJAX– JavaScript UI Templates and Data-binding– AJAX Control Toolkit Enhancements • Client-side controls
– DOM selection, manipulation and animation– Addition of jQuery
Some other interesting Enhancements
• CLR Enhancement– Side by Side In Process runtime (CLR)– Use ClrVer to see more.
• BCL Enhancements– BigInteger
• Arbitrary length integer supporting all mathematical operations.
– Tuples• Sequence of finite length
– System.Lazy<T>• Framework implements the pattern; Developer uses it.
Feedback / QnA• Your Feedback is Important!
Please take a few moments to fill out our feedback form
• Bijoy [email protected]
• Abhishek [email protected]
• Rishu [email protected]
• http://delhiitpro.groups.live.com• http://delhidevs.com
© 2006 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.