Microsoft keep updating the .Net framework. feature to ease developers life..Net framework 3.0 was major release in which many component gets added like WPF, WCF, WWF etc. by Microsoft where as .Net framework 4.0 release was focused on improving newly added components , security , compatibility etc.
below are feature wise difference between .Net Framework 3.0 vs .Net Framework 4.0
.Net Framework 3.0 and 3.5
.Net Framework 3.0 and 3.5 is an extension to the existing .Net framework 2.0. .NET Framework 3.0 is a major release and added new components such as WPF, WCF, WWF, etc.
.NET framework 3.0 uses the same CLR with some newly added libraries.
.NET Framework 3.0 and 3.5 consists of below mentioned components and features:
- Windows Presentation Foundation (WPF) – Windows Presentation Foundation (WPF) is a UI framework that uses to create desktop applications.
- Windows Communication Foundation (WCF) – Windows Communication Foundation (WCF) is a framework to build service-oriented applications.
- Windows Workflow Foundation (WWF) – Windows Workflow Foundation (WWF) provides an API to create an in-process workflow engine, and designer to implement long-running processes as workflows.
- Windows CardSpace (WCS) – Windows CardSpace (WCS), is Microsoft’s now-canceled client software use to the Identity Metasystem.
- Auto Implemented Property – Declare a private instance backing field, and interfaces may not declare instance fields.
- Implicit Typed local variable – Declare variables without specifying the .Net type explicitly.
- Implicitly Typed Arrays – Not required to specify the array type explicitly, Instead, the compiler decides upon the type to use based upon the array’s initial values.
- Anonymous Types – anonymous type provides an efficient way to define methods and functions.
- Extension Methods – The extension method is used to extend the functionality of the existing type.
- Object and Collection Initializers – Collection initializers allow initializing the elements of the collection at run time
- Lambda Expressions – used to specify an anonymous or unnamed method.
.Net Framework 4.0 and 4.5
.Net Framework 4.0 and 4.5 is an extension to the existing .Net framework 3.5. .NET Framework 4.0 release focused on security, compatibility, API, workflow models, Enhancement in WPF, WCF, WWF etc.
.NET Framework 4.0 and 4.5 consists of below mentioned features:
- WPF Enhancement – Added new controls, provided graphic and animation support, browser application supports XBAP’S, property binding feature etc.
- WCF Enhancement – Extended support to Web.Routing, removed configuration-based activation, IIS binding support, Workflow services, support to WS- Discvoery etc.
- WWF Enhancement – extended built in library, improvement in workflow activity model, new flow-control activities like flow-control structures, Flowchart, TryCatch, Switch<T> etc.
- ASP.NET Enhancement –Added new controls, extended support for client-based Ajax applications, deployment, new feature in MVC.
- Application Compatibility and Deployment – extended support to application those are build on older .net framework version.
- Security – Improvement in Machine-wide security policy and Security transparency.
- Parallel Computing – improve support for parallel computing which target multi-core or distributed systems.
- Task Parallel Library (TPL) – Allows to create concurrent, asynchronous tasks without having to work with threads, locks, or the thread pool.
- Parallel LINQ (PLINQ)– Parallel implementation of LINQ to Objects that significantly improves performance in many scenarios.
- Parallel Diagnostic Tools – Tools to diagnostic parallel stacks, and concurrency views in the Visual Studio.
- Dynamic Language Runtime – environment that adds a set of services for dynamic languages to the common language runtime (CLR).
- Tuples – A generic data structure that holds an ordered set of items of heterogeneous types.
- Managed Extensibility Framework (MEF) – A new library to build extensible and composable applications.
- ADO.NET Improvement – Improvement in relational databases by abstraction.