What is new in .NET Framework 4.0

News in .NET 4 and Visual Studio 2010 release wave – part two
  1. DLR – Dynamic Language Runtime – new runtime to support dynamic (non statically typed) languages like PHP, Ruby, Python, JavaScript, ..
  2. Parallel programming – Task Library and Plinq to work with parallelism without threads
    1. Software Transactional Memory – Transactions like access to shared memory structures (supports threading) makes parallel programming really easy.
      Sample wihtout of using STM.NET:

      static void Main()
        double myAccount;
        double yourAccount;
        myAccount = 1000;
        yourAccount = 500;
        double amountToTransfer = 150;
        myAccount -= amountToTransfer;
        yourAccount += amountToTransfer;

      And the same sample under STM.NET transaction:

      static void Main(string[] args)
          INstmObject<double> myAccount;
          INstmObject<double> yourAccount;
          myAccount = NstmMemory.CreateObject<double>(1000);
          yourAccount = NstmMemory.CreateObject<double>(500);
          using (INstmTransaction tx =
             double amountToTransfer = 150;
             myAccount.Write(myAccount.Read() – amountToTransfer);
             yourAccount.Write(yourAccount.Read() +
         Console.WriteLine("My account balance: {0}",
         Console.WriteLine("Your account balance: {0}",

    2. PLINQ – Parallel LINQ – Linq to objects with parallel extensions to use multiple threads
    3. Task Parallel Library and Coordination Data Structures to better utilize power of multi-processor and multi-core machines. Using parallel Tasks without need to work with threads.
    4. Synchronized colletions (new thread safe collections)
  3. Reactive framework (Linq to events) – New non blocking approach to events
  4. Code Contracts – Run time and Compile time code aspects checking support
  5. WCF 4.0 and WF 4.0 with better support for Web 2.0 technologies like REST, POX, ATOM.
  6. WCF 4.0 improvements
    1. RESTful enhancements – Simplifying the building of REST Singleton & Collection Services, ATOM Feed and Publishing Protocol Services, and HTTP Plain XML Services using WCF
    2. Messaging enhancements
      1. Transports – UDP, MQ, Local in-process
      2. Protocols – SOAP over UDP, WS-Discovery, WS-BusinessActivity, WS-I BP 1.2
    3. Duplex durable messaging
    4. Correlation enhancements
      1. Content and context driven, One-way support
    5. Declarative Workflow Services
      1. Seamless integration between WF and WCF and unified XAML model
      2. Build entire application in XAML, from presentation to data to services to workflow
  7. WF 4.0 Improvements
    1. Declarative Workflow Services
      1. Seamless integration between WF and WCF and unified XAML model
      2. Build entire application in XAML, from presentation to data to services to workflow
    2. Ten-fold improvement in performance
    3. New workflow flow-control models and pre-built activities
      1. Flowcharts, rules
      2. Expanded built-in activities – PowerShell, database, messaging, etc.
      3. Expanded built-in activities – PowerShell, database, messaging, etc.
    4. Enhancements in workflow modeling
      1. Persistence control, transaction flow, compensation support, data binding and scoping
      2. Rules composable and seamlessly integrated with workflow engine
    5. Updated visual designer
      1. Easier to use by end-users
      2. Easier to rehost by ISVs
      3. lity to debug XAML
  8. Complex number – support for computing with complex numbers
  9. System.Device.Location – Getting device geological location – mangitude and longitude, speed, acceleration on Windows 7
  10. Reactive framework (Rx) or Linq to Events – new framework for reacting to events via monades. Uses Observer instead of classical blocking Ienumerable/Iterator pattern for non blocking assynchronous operations.
  11. Stream.CopyTo – method to allow copying from stream to another stream
  12. Guid.TryParse, Version.TryParse and Enum.TryParse – better support for parsing types
  13. Enum.HasFlag – No need to use bit operators to find whether a enum flag is set
  14. Type equivalenceNo need for PIA assemblies at runtime – Compiler takes out needed types from Primary Interop Assemblies and copies them into produced assembly.
  15. Omitting ref – Compiler automatically generates reference types from values when needed to help COM developers out of lot of temporary ref variables.
  16. Variance, Covariance and Contravariance support
  17. Application Server (Dublin) – part of Windows Application Server platform
    1. Provide standard host for WF and WCF applications in IIS
    2. Application Server “Dublin” will initially be made available for download and use by Windows Server customers; later, “Dublin” will be included in future releases of Windows Server.
    3. Application Server “Dublin” will extend Internet Information Services (IIS) to provide a standard host for applications that use workflow or communications.
    4. It will provide support for Oslo modeling platform
    5. It will support existing .NET apps.
    6. It will support integration with BizTalk Server (in this context called "Integration Server").
    7. Pre-built developer services
      1. Message-based correlation
      2. Message forwarding service
      3. Content-based message routing
      4. Compensation service for long-running transactions
      5. Greater scalability and easier manageability
      6. Enable scale-out of stateful workflow applications
      7. Persisting and rehydrating state for high scalability
      8. Enhanced management and monitoring functions
      9. Tracking store for workflow events
  18. Supports “Oslo” modeling platform
  19. ASP.NET 4.0 Enhancements
    1. Web.config clarification (moves elements to machine.config) to minize huge web.config files
    2. AutoStart ASP.NET applications
  20. Automatically starts ASP.NET application without external client hit


This is series of articles News in .NET 4 and Visual Studio 2010 release wave

3 thoughts on “What is new in .NET Framework 4.0

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s