Saturday 21 November 2015

Dot Net FrameWork


Introduction:
 
Here I going to explain about basic of dot net framework it is include architecture, security, memory management and version. 
 
Explanation:

 Framework

The Microsoft .NET Framework is a software framework that can be installed on computers running Microsoft Windows operating systems. It includes a large library of coded solutions to common programming problems and a virtual machine that manages the execution of programs written specifically for the framework. The .NET Framework supports multiple programming languages in a manner that allows language interoperability, whereby each language can utilize code written in other languages; in particular, the .NET library is available to all the programming languages that .NET encompasses. The .NET Framework is a Microsoft offering and is intended to be used by most new applications created for the Windows platform. In order to be able to develop and not just run applications for the Microsoft .NET Framework 4.0, it is required to have Microsoft's SDK for Windows 7 and .NET Framework 4 (or newer) or Visual Studio 2010 installed on your computer.

The framework's Base Class Library provides a large range of features including user interface, data access, database connectivity, cryptography, web application development, numeric algorithms, and network communications. The class library is used by programmers, who combine it with their own code to produce applications.

Programs written for the .NET Framework execute in a software environment that manages the program's runtime requirements. Also part of the .NET Framework, this runtime environment is known as the Common Language Runtime (CLR). The CLR provides the appearance of an application virtual machine so that programmers need not consider the capabilities of the specific CPU that will execute the program. The CLR also provides other important services such as security, memory management, and exception handling. The class library and the CLR together constitute the .NET Framework.

Version 3.0 of the .NET Framework is included with Windows Server 2008 and Windows Vista. Version 3.5 is included with Windows 7, and can also be installed on Windows XP and the Windows Server 2003 family of operating systems. On April 12, 2010, .NET Framework 4 was released alongside Visual Studio 2010.

The .NET Framework family also includes two versions for mobile or embedded device use. A reduced version of the framework, the .NET Compact Framework, is available on Windows CE platforms, including Windows Mobile devices such as smartphones. Additionally, the .NET Micro Framework is targeted at severely resource-constrained devices.
 
Architecture

Common Language Infrastructure (CLI)
 
Main article: Common Language Infrastructure
The purpose of the Common Language Infrastructure (CLI), is to provide a language-neutral platform for application development and execution, including functions for exception handling, garbage collection, security, and interoperability. By implementing the core aspects of the .NET Framework within the scope of the CLR, this functionality will not be tied to a single language but will be available across the many languages supported by the framework. Microsoft's implementation of the CLI is called the Common Language Runtime, or CLR.

Security
 
.NET has its own security mechanism with two general features: Code Access Security (CAS), and validation and verification. Code Access Security is based on evidence that is associated with a specific assembly. Typically the evidence is the source of the assembly (whether it is installed on the local machine or has been downloaded from the intranet or Internet). Code Access Security uses evidence to determine the permissions granted to the code. Other code can demand that calling code is granted a specified permission. The demand causes the CLR to perform a call stack walk: every assembly of each method in the call stack is checked for the required permission; if any assembly is not granted the permission a security exception is thrown.
When an assembly is loaded the CLR performs various tests. Two such tests are validation and verification. During validation the CLR checks that the assembly contains valid metadata and CIL, and whether the internal tables are correct. Verification is not so exact. The verification mechanism checks to see if the code does anything that is 'unsafe'. The algorithm used is quite conservative; hence occasionally code that is 'safe' does not pass. Unsafe code will only be executed if the assembly has the 'skip verification' permission, which generally means code that is installed on the local machine.
.NET Framework uses Application Domains as a mechanism for isolating code running in a process. Application Domains can be created and code loaded into or unloaded from them independent of other Application Domains. This helps increase the fault tolerance of the application, as faults or crashes in one Application Domain do not affect the rest of the application. Application Domains can also be configured independently with different security privileges. This can help increase the security of the application by isolating potentially unsafe code. The developer, however, has to split the application into subdomains; it is not done by the CLR.Class library

Namespaces in the BCL

System
System. CodeDom
System. Collections
System. Diagnostics
System. Globalization
System. IO
System. Resources
System. Text
System. Text.RegularExpressions

The .NET Framework includes a set of standard class libraries. The class library is organized in a hierarchy of namespaces. Most of the built in APIs are part of either System.* or Microsoft.* namespaces. These class libraries implement a large number of common functions, such as file reading and writing, graphic rendering, database interaction, and XML document manipulation, among others. The .NET class libraries are available to all CLI compliant languages. The .NET Framework class library is divided into two parts: the Base Class Library and the Framework Class Library.
The Base Class Library (BCL) includes a small subset of the entire class library and is the core set of classes that serve as the basic API of the Common Language Runtime. The classes in mscorlib.dll and some of the classes in System.dll and System.core.dll are considered to be a part of the BCL. The BCL classes are available in both .NET Framework as well as its alternative implementations including .NET Compact Framework, Microsoft Silverlight and Mono.

The Framework Class Library (FCL) is a superset of the BCL classes and refers to the entire class library that ships with .NET Framework. It includes an expanded set of libraries, including Windows Forms, ADO.NET, ASP.NET, Language Integrated Query, Windows Presentation Foundation, Windows Communication Foundation among others. The FCL is much larger in scope than standard libraries for languages like C++, and comparable in scope to the standard libraries of Java.
 
Memory management

The .NET Framework CLR frees the developer from the burden of managing memory (allocating and freeing up when done); instead it does the memory management itself. To this end, the memory allocated to instantiations of .NET types (objects) is done contiguously  from the managed heap, a pool of memory managed by the CLR. As long as there exists a reference to an object, which might be either a direct reference to an object or via a graph of objects, the object is considered to be in use by the CLR. When there is no reference to an object, and it cannot be reached or used, it becomes garbage. However, it still holds on to the memory allocated to it. .NET Framework includes a garbage collector which runs periodically, on a separate thread from the application's thread, that enumerates all the unusable objects and reclaims the memory allocated to them.

The .NET Garbage Collector (GC) is a non-deterministic, compacting, mark-and-sweep garbage collector. The GC runs only when a certain amount of memory has been used or there is enough pressure for memory on the system. Since it is not guaranteed when the conditions to reclaim memory are reached, the GC runs are non-deterministic. Each .NET application has a set of roots, which are pointers to objects on the managed heap (managed objects). These include references to static objects and objects defined as local variables or method parameters currently in scope, as well as objects referred to by CPU registers. When the GC runs, it pauses the application, and for each object referred to in the root, it recursively enumerates all the objects reachable from the root objects and marks them as reachable. It uses .NET metadata and reflection to discover the objects encapsulated by an object, and then recursively walk them. It then enumerates all the objects on the heap (which were initially allocated contiguously) using reflection. All objects not marked as reachable are garbage. This is the mark phase. Since the memory held by garbage is not of any consequence, it is considered free space. However, this leaves chunks of free space between objects which were initially contiguous. The objects are then compacted together to make used memory contiguous again.Any reference to an object invalidated by moving the object is updated to reflect the new location by the GC. The application is resumed after the garbage collection is over.

The GC used by .NET Framework is actually generational. Objects are assigned a generation; newly created objects belong to Generation 0. The objects that survive a garbage collection are tagged as Generation 1, and the Generation 1 objects that survive another collection are Generation 2 objects. The .NET Framework uses up to Generation 2 objects. Higher generation objects are garbage collected less frequently than lower generation objects. This helps increase the efficiency of garbage collection, as older objects tend to have a larger lifetime than newer objects. Thus, by removing older (and thus more likely to survive a collection) objects from the scope of a collection run, fewer objects need to be checked and compacted.

Versions of .Net

Microsoft started development on the .NET Framework in the late 1990s originally under the name of Next Generation Windows Services (NGWS). By late 2000 the first beta versions of .NET 1.0 were released

The .NET Framework stack.

Version    Version Number    Release Date    Visual Studio    Default in Windows
1.0    1.0.3705.0    2002-02-13    Visual Studio .NET   
1.1    1.1.4322.573    2003-04-24    Visual Studio .NET 2003    Windows Server 2003
2.0    2.0.50727.42    2005-11-07    Visual Studio 2005   
3.0    3.0.4506.30    2006-11-06        Windows Vista, Windows Server 2008
3.5    3.5.21022.8    2007-11-19    Visual Studio 2008    Windows 7, Windows Server 2008 R2
4.0    4.0.30319.1    2010-04-12    Visual Studio 2010   
A more complete listing of the releases of the .NET Framework may be found on the List of .NET Framework versions.

.NET Framework 1.0

This is the first release of the .NET Framework, released on 13 February 2002 and available for Windows 98, Me, NT 4.0, 2000, and XP. Mainstream support by Microsoft for this version ended 10 July 2007, and extended support ended 14 July 2009.

.NET Framework 1.1

This is the first major .NET Framework upgrade. It is available on its own as a redistributable package or in a software development kit, and was published on 3 April 2003. It is also part of the second release of Microsoft Visual Studio .NET (released as Visual Studio .NET 2003). This is the first version of the .NET Framework to be included as part of the Windows operating system, shipping with Windows Server 2003. Mainstream support for .NET Framework 1.1 ended on 14 October 2008, and extended support ends on 8 October 2013. Since .NET 1.1 is a component of Windows Server 2003, extended support for .NET 1.1 on Server 2003 will run out with that of the OS - currently 14 July 2015. .NET 1.1 is the last available version for Windows NT 4.0.

Changes in 1.1 on comparison with 1.0

•Built-in support for mobile ASP.NET controls. Previously available as an add-on for .NET     Framework, now part of the framework.

•Security changes - enable Windows Forms assemblies to execute in a semi-trusted manner from the Internet, and enable Code Access Security in ASP.NET applications.

•Built-in support for ODBC and Oracle databases. Previously available as an add-on for .NET Framework 1.0, now part of the framework.

•.NET Compact Framework - a version of the .NET Framework for small devices.

•Internet Protocol version 6 (IPv6) support.

•Numerous API changes.

.NET Framework 2.0

Released with Visual Studio 2005, Microsoft SQL Server 2005.

•The 2.0 Redistributable Package can be downloaded for free from Microsoft, and was        published on 22 January 2006.

•The 2.0 Software Development Kit (SDK) can be downloaded for free from Microsoft.

•It is included as part of Visual Studio 2005 and Microsoft SQL Server 2005.

•Version 2.0 without any Service Pack is the last version with support for Windows 98 and Windows Me. Version 2.0 with Service Pack 2 is the last version with official support for Windows 2000 although there have been some unofficial workarounds published online to use a subset of the functionality from Version 3.5 in Windows 2000. Version 2.0 with Service Pack 2 requires Windows 2000 with SP4 plus KB835732 or KB891861 update, Windows XP with SP2 or later and Windows Installer 3.1 (KB893803-v2).

•It shipped with Windows Server 2003 R2 (not installed by default).

Changes in 2.0 in comparison with 1.1

•Generics

•Language support for generics built directly into the .NET CLR.

•Full 64-bit support for both the x64 and the IA64 hardware platforms.

•Numerous API changes.

•SQL Server integration - .NET 2.0, VS 2005, and SQL Server 2005 are all tied together. This means that instead of using T-SQL, one can build stored procedures and triggers in any of the .NET-compatible languages.

•A new hosting API for native applications wishing to host an instance of the .NET runtime. The new API gives a fine grain control on the behavior of the runtime with regards to multithreading, memory allocation, assembly loading and more (detailed reference). It was initially developed to efficiently host the runtime in Microsoft SQL Server, which implements its own scheduler and memory manager.

•Many additional and improved ASP.NET web controls.

•New data controls with declarative data binding.

•New personalization features for ASP.NET, such as support for themes, skins, master pages and webparts.

•.NET Micro Framework - a version of the .NET Framework related to the Smart Personal Objects Technology initiative.

•Membership provider

•Partial classes

•Nullable types

•Anonymous methods

•Data tables

.NET Framework 3.0

.NET Framework 3.0, formerly called WinFX  was released on 21 November 2006. It includes a new set of managed code APIs that are an integral part of Windows Vista and Windows Server 2008 operating systems. It is also available for Windows XP SP2 and Windows Server 2003 as a download. There are no major architectural changes included with this release; .NET Framework 3.0 uses the Common Language Runtime of .NET Framework 2.0. Unlike the previous major .NET releases there was no .NET Compact Framework release made as a counterpart of this version. Version 3.0 of the .NET Framework shipped with Windows Vista. It also shipped with Windows Server 2008 as an optional component (disabled by default).

.NET Framework 3.0 consists of four major new components:

•Windows Presentation Foundation (WPF), formerly code-named Avalon; a new user interface subsystem and API based on XML and vector graphics, which uses 3D computer graphics hardware and Direct3D technologies. See WPF SDK for developer articles and documentation on WPF.

•Windows Communication Foundation (WCF), formerly code-named Indigo; a service-oriented messaging system which allows programs to interoperate locally or remotely similar to web services.

•Windows Workflow Foundation (WF) allows for building of task automation and integrated transactions using workflows.

•Windows CardSpace, formerly code-named InfoCard; a software component which securely stores a person's digital identities and provides a unified interface for choosing the identity for a particular transaction, such as logging in to a website.

.NET Framework 3.5

Version 3.5 of the .NET Framework was released on 19 November 2007, but it is not included with Windows Server 2008. As with .NET Framework 3.0, version 3.5 uses the CLR of version 2.0. In addition, it installs .NET Framework 2.0 SP1, (installs .NET Framework 2.0 SP2 with 3.5 SP1) and .NET Framework 3.0 SP1 (installs .NET Framework 3.0 SP2 with 3.5 SP1), which adds some methods and properties to the BCL classes in version 2.0 which are required for version 3.5 features such as Language Integrated Query (LINQ). These changes do not affect applications written for version 2.0, however.
As with previous versions, a new .NET Compact Framework 3.5 was released in tandem with this update in order to provide support for additional features on Windows Mobile and Windows Embedded CE devices.

The source code of the Base Class Library in this version has been partially released (for debugging reference only) under the Microsoft Reference Source License.

Changes since version 3.0

•New language features in C# 3.0 and VB.NET 9.0 compiler

•Adds support for expression trees and lambda methods

•Extension methods

•Expression trees to represent high-level source code at runtime.

•Anonymous types with static type inference

•Language Integrated Query (LINQ) along with its various providers

•    LINQ to Objects

•    LINQ to XML

•    LINQ to SQL

•Paging support for ADO.NET

•ADO.NET synchronization API to synchronize local caches and server side datastores

•Asynchronous network I/O API.

•Peer-to-peer networking stack, including a managed PNRP resolver

•Managed wrappers for Windows Management Instrumentation and Active Directory APIs

•Enhanced WCF and WF runtimes, which let WCF work with POX and JSON data, and also expose WF workflows as WCF services. WCF services can be made stateful using the WF persistence model.

•Support for HTTP pipelining and syndication feeds.

•ASP.NET AJAX is included.

.NET Framework 4

Microsoft announced the .NET Framework 4 on 29 September 2008. The Public Beta was released on 20 May 2009. Some focuses of this release are:

•Parallel Extensions to improve support for parallel computing, which target multi-core or distributed systems. To this end, they plan to include technologies like PLINQ (Parallel LINQ), a parallel implementation of the LINQ engine, and Task Parallel Library, which exposes parallel constructs via method calls.

•New Visual Basic .NET and C# language features, such as statement lambdas, implicit line continuations, dynamic dispatch, named parameters, and optional parameters.

•Full support for IronPython, IronRuby, and F#.

•Support for a subset of the .NET Framework and ASP.NET with the "Server Core" variant of Windows Server 2008 R2.

•Support for Code Contracts.

•Inclusion of the Oslo modelling platform, along with the M programming language.

•Inclusion of new types to work with arbitrary-precision arithmetic (System.Numerics.BigInteger) and complex numbers (System.Numerics.Complex).

On 28 July 2009, a second release of the .NET Framework 4 beta was made available with experimental software transactional memory support. This functionality is not available in the final version of the framework.

On 19 October 2009, Microsoft released Beta 2 of the .NET Framework 4. At the same time, Microsoft announced the expected launch date for .NET Framework 4 as the 22 March 2010. This launch date was subsequently delayed to 12 April 2010.

On 10 February 2010, a release candidate was published: Version:RC.
On 12 April 2010, the final version of .NET Framework 4.0 was launched alongside the final release of Visual Studio 2010.

In conjunction with .NET Framework 4, Microsoft will offer a set of enhancements, codenamed Dublin, for Windows Server 2008 application server capabilities. Dublin will extend IIS to be a "standard host" for applications that use either WCF or WF.

No comments:

Post a Comment