.Net 4.0 currently in beta (means some features covered below are subjected to change by final release) slated to release by end of 2009 with Visual Studio 2010. Some of the key server side features that can help enterprise adopt 4.0 are as follows
New optimized Common Language runtime with CLR 4.0. CLR 4.0 can work alongside CLR 2.0. This was not possible with earlier versions of CLR. If application host x is built using.net 1.1 excel add-ins and on the same machine if somebody has installed application host y built using .net 2.0 add-ins then both the applications used to run using highest version of CLR which is 2.0 in this case. Until now since only one CLR was loaded in the process, If application x is badly written and crashes due to some internal reason then application y also used to crash because both applications were using same CLR.
With .Net 4, first time introduced is In-process side by side CLR, each add-in hosts get to use the version of .NET that it was built and tested with. Installing .NET 4 on a machine won’t cause add-ins or applications to start using it, by default. Which means installing .NET 4 will have least impact on existing running .net applications.
CLR 4.0 is also designed for efficient and faster Garbage collection. In earlier CLR versions, when Server GC was scheduled to start all the other threads were stalled for GC to execute and complete. Workstation GC is an exception, which has support for Concurrent collection which can do most of Gen 0 and Gen1 but not all of Gen 2 collection.
Server GC of 4.0 has the ability to work in background, without stopping the ongoing managed thread, and can do Gen 0, Gen 1 collection at the same time as Gen 2,with positive influence on overall performance. Additionally the 4.0 GC can be configured to notify to the main program before embarking on collection and after completing the collection.
Efficient thread management using optimized thread pool, support for debugging dumps from Visual studio, improved interop with Windows APIs are some of the other important CLR design improvements.
Truley exploiting the power of multi core CPUs is now possible through introduction of newly designed Parallel APIs. Developers no more have to deal with threads, locks, work allocation and scheduling. Framework introduced Task Parallel library (TPL) is designed to execute C# application logic in parallel where as PINQ is designed to execute Database logic in parallel.They take the responsibility of allocation work to multiple cores of CPU depending on their availability maximizing parallel execution of a program
First time inclusion of Dynamic Language Runtime (DLR) and Dynamic languages like Iron Python and Iron Ruby. DLR is a thin layer on top of CLR with set of services like Shared dynamic type system, standard hosting model and support to generate fast dynamic code for Dynamic languages.
Easier application extensibility, modularity and highest reuse ever is now possible by using Managed Extensibility Framework (MEF).MEF helps composing applications at runtime establishing true plug and play model. It truly demonstrates the in-flight engine replacement by automatic runtime discovery and dynamic incorporation of .net assembly or module.
Inclusion of Functional programming support through F#. Applications having highly computational mathematical program, support of function library and also object oriented constructs are good candidates for F# implementation
Windows Workflow is redesigned to improve performance by ten folds. New Workflow designer with XAML based Workflow design and debugging, addition of several workflow activities and models like flowchart, database messaging, PowerShell, persistence, compensation support, rules composition, data binding and scoping are some of the new additions.
Improved RSS/ATOM feeds, REST, POX, AJAX support in WCF will help easily implement some of the Web 2.0 principles. Slimmer WCF configuration, .svc less activation-no need to write URL rewrite module for WCF services now, routing service, announcement service to let consumer know whether the service is online or offline, inclusion of WS-Discovery and a few other WS-* protocols, seamless integration between WF and WCF and enabling a unified XAML model.
Now developers can build an entire application in declarative XAML code from presentation to data to services to workflow.
Exposing data through web services using ADO.NET Data Services (earlier “Astoria”) was available with .net 3.5 sp1 and further built upon in 4.0 with features like Paging, streaming support for blobs, Web friendly Feeds, row count for entity, etc.
Data Services provides a REST style interface to SQL Server database tables and make it addressable like collections through URIs similar to Azure tables or SQL Data services in Cloud thus making the data access easily portable from on-premise to Cloud back-ends.
Leap in support for Object Relational mapping by way of ADO.NET Entity Framework. Earlier shipped with .Net 3.5 SP1
Support for Distributed Caching scenarios using “Velocity”, read more about Velocity here.
Windows Application server “Dublin” acts as a standard host for Windows Workflow and services and also supports “OSLO” modeling platform. All this with improved monitoring, greater Performance, Scalability and Reliability.
While the above is tip of what 4.0 has in offer for enterprises, enterprises embarking on new .net development initiatives should start planning new application development using .Net 4.0