Framework, component & architecture of .NET

Introduction:
Visual Basic (VB) is thethird-generation event-driven programming language and integrated development environment(IDE) from Microsoftfor its COM programming model.VB is also considereda relatively easy to learn and use programming language, because of itsgraphical development features and BASIC heritage.

VisualBasic was derived from Basic and enables the rapid application development (RAD)of graphical user interface (GUI)applications, access to databases using Data Access Objects, Remote Data Objects, or ActiveX Data Objects, and creation of ActiveX controlsand objects. Scripting languages such as VBA and VBScript aresyntactically similar to Visual Basic, but perform differently.
Aprogrammer can put together an application using the components provided withVisual Basic itself. Programs written in Visual Basic can also use the Windows API,but doing so requires external function declarations.

Architecture
Common Language Infrastructure (CLI)

Thepurpose of the Common Language Infrastructure, or CLI, is to provide alanguage-neutral platform for application development and execution, includingfunctions for exception handling, garbage collection, security andinteroperability. By implementing the core aspects of the .NET Framework withinthe scope of the CLR, this functionality will not be tied to a single languagebut 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.
 
Assemblies

The CIL code is housed in .NETassemblies. As mandated by specification, assemblies are stored in the Portable Executable (PE) format, common on theWindows platform for all DLL and EXE files. The assembly consists of one ormore files, one of which must contain the manifest, which has the metadata forthe assembly. The complete name of an assembly (not to be confused with thefilename on disk) contains its simple text name, version number, culture, and public keytoken. The public key token is a unique hash generated when the assembly iscompiled, thus two assemblies with the same public key token are guaranteed tobe identical from the point of view of the framework. A private key can also bespecified known only to the creator of the assembly and can be used for strongnaming and to guarantee that the assembly is from the same author when a newversion of the assembly is compiled (required to add an assembly to the Global Assembly Cache).

Metadata

AllCIL is self-describing through .NETmetadata. The CLR checks the metadata to ensure that the correct method iscalled. Metadata is usually generated by language compilers but developers cancreate their own metadata through custom attributes. Metadata containsinformation about the assembly, and is also used to implement the reflective programming capabilitiesof .NET Framework

Security

.NEThas its own security mechanism with two general features: Code Access Security (CAS), and validation andverification. Code Access Security is based on evidence that is associated witha specific assembly. Typically the evidence is the source of the assembly(whether it is installed on the local machine or has been downloaded from theintranet or Internet). Code Access Security uses evidence to determine thepermissions granted to the code. Other code can demand that calling code isgranted a specified permission. The demand causes the CLR to perform a callstack walk: every assembly of each method in the call stack is checked for therequired permission; if any assembly is not granted the permission a securityexception is thrown.
Whenan assembly is loaded the CLR performs various tests. Two such tests arevalidation and verification. During validation the CLR checks that the assemblycontains valid metadata and CIL, and whether the internal tables are correct.Verification is not so exact. The verification mechanism checks to see if thecode does anything that is 'unsafe'. The algorithm used is quite conservative;hence occasionally code that is 'safe' does not pass. Unsafe code will only beexecuted if the assembly has the 'skip verification' permission, whichgenerally means code that is installed on the local machine.
.NETFramework uses AppDomains as a mechanism for isolating code runningin a process. AppDomains can be created and codeloaded into or unloaded from them independent of other AppDomains. This helpsincrease the fault tolerance of the application, as faults or crashes in oneAppDomains do not affect rest of the application. AppDomains can also beconfigured independently with different security privileges. This can helpincrease the security of the application by isolating potentially unsafe code.The developer, however, has to split the application into subdomains; it is notdone by the CLR.

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 managementitself. To this end, the memory allocated to instantiations of .NET types(objects) is done contiguousl from the managed heap, a poolof 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 consideredto be in use by the CLR. When there is no reference to an object, and it cannotbe reached or used, it becomes garbage. However, it still holds on to thememory allocated to it. .NET Framework includes a garbage collector which runsperiodically, on a separate thread from the application's thread, thatenumerates all the unusable objects and reclaims the memory allocated to them.
The.NET Garbage Collector (GC) is anon-deterministic, compacting, mark-and-sweep garbage collector. The GC runsonly when a certain amount of memory has been used or there is enough pressurefor memory on the system. Since it is not guaranteed when the conditions toreclaim memory are reached, the GC runs are non-deterministic. Each .NETapplication has a set of roots, which are pointers to objects on the managedheap (managed objects). These include references to static objects andobjects defined as local variables or method parameters currently in scope, aswell as objects referred to by CPU registers. When the GCruns, it pauses the application, and for each object referred to in the root,it recursivelyenumerates all the objects reachable from the root objects and marks them asreachable. It uses .NET metadata and reflection to discover theobjects encapsulated by an object, and then recursively walk them. It thenenumerates all the objects on the heap (which were initially allocatedcontiguously) using reflection. All objects not marked as reachable aregarbage. This is the mark phase  Since the memory held by garbage is not of anyconsequence, it is considered free space. However, this leaves chunks of freespace between objects which were initially contiguous. The objects are then compactedtogether, by using memcpy to copy them over to the free space to make them contiguous again.Anyreference to an object invalidated by moving the object is updated to reflectthe new location by the GC. The application is resumed after the garbagecollection is over.

Versions:

Microsoftstarted development on the .NET Framework in the late 1990s originally underthe name of Next Generation Windows Services (NGWS). By late 2000 the firstbeta versions of .NET 1.0 were released. 

.NET ARCHITECTURE:-

Framework:

.NET Framework 1.0

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

.NET Framework 1.1

Thisis the first major .NET Framework upgrade. It is available on its own as a redistributable package or in asoftware development kit, and was published on 3 April 2003. It is also part ofthe 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 aspart 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 8October 2013. Since .NET 1.1 is a component of Windows Server 2003, extendedsupport for .NET 1.1 on Server 2003 will run out with that of the OS -currently 14 July 2015.

.NET Framework 2.0

  • 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.

Changes in 2.0 in comparison with 1.1

  • Numerous API changes.
  • 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.
  • Full 64-bit support for both the x64 and the IA64 hardware platforms.
  • Language support for generics built directly into the .NET CLR. 
.NET Framework 3.0

.NETFramework 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 WindowsVista and Windows Server 2008 operating systems. It isalso available for Windows XP SP2 and Windows Server 2003 as a download. There are nomajor architectural changes included with this release; .NET Framework 3.0 usesthe Common Language Runtime of .NET Framework2.0. Unlike the previous major .NET releases there was no .NET CompactFramework release made as a counterpart of this version.
.NETFramework 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 4

Key focuses for this release are:
  • Parallel Extensions to improve support for parallel computing, which target multi-core or distributed systems. To this end, technologies like PLINQ (Parallel LINQ), a parallel implementation of the LINQ engine, and Task Parallel Library, which exposes parallel constructs via method calls, are included.
  • New Visual Basic .NET and C# language features, such as implicit line continuations, dynamic dispatch, named parameters, and optional parameters.
  • Support for Code Contracts.
  • Inclusion of new types to work with arbitrary-precision arithmetic (System.Numerics.BigInteger) and complex numbers.
Result

The framework and its components as well as its architecture have beenstudied.

0 Response to "Framework, component & architecture of .NET"

Post a Comment