.NET Framework
Saturday, 5 January 2013
.NET Framework
The .NET Framework (pronounced dot net) is a software framework developed by Microsoft that runs primarily on Microsoft Windows. It includes a ample library and provides accent interoperability (each accent can use cipher accounting in added languages) beyond several programming languages. Programs accounting for the .NET Framework assassinate in a software ambiance (as assorted to accouterments environment), accepted as the Common Accent Runtime (CLR), an appliance basic apparatus that provides casework such as security, anamnesis management, and barring handling. The chic library and the CLR calm aggregate the .NET Framework.
The .NET Framework's Base Chic Library provides user interface, abstracts access, database connectivity, cryptography, web appliance development, numeric algorithms, and arrangement communications. Programmers aftermath software by accumulation their own antecedent cipher with the .NET Framework and added libraries. The .NET Framework is advised to be acclimated by a lot of new applications created for the Windows platform. Microsoft aswell produces an chip development ambiance abundantly for .NET software alleged Visual Studio.
History
Microsoft started development of the .NET Framework in the backward 1990s, originally beneath the name of Next Generation Windows Services (NGWS). By backward 2000 the aboriginal beta versions of .NET 1.0 were released.
Windows XP (including account packs) does not appear with any adaptation of the .NET Framework installed.[2] Adaptation 3.0 of the .NET Framework is included with Windows Server 2008 and Windows Vista. Adaptation 3.5 is included with Windows 7, and can aswell be installed on Windows XP and the Windows Server 2003 ancestors of operating systems.[3] On 12 April 2010, .NET Framework 4 was appear alongside Visual Studio 2010.
The .NET Framework ancestors aswell includes two versions for adaptable or anchored accessory use. A bargain adaptation of the framework, the .NET Compact Framework, is accessible on Windows CE platforms, including Windows Adaptable accessories such as smartphones. Additionally, the .NET Micro Framework is targeted at acutely resource-constrained devices.
Design features
Interoperability
Because computer systems frequently crave alternation amid newer and earlier applications, the .NET Framework provides agency to admission functionality implemented in newer and earlier programs that assassinate alfresco the .NET environment. Admission to COM apparatus is provided in the System.Runtime.InteropServices and System.EnterpriseServices namespaces of the framework; admission to added functionality is accomplished application the P/Invoke feature.
Common Accent Runtime engine
The Accepted Accent Runtime (CLR) serves as the beheading engine of the .NET Framework. All .NET programs assassinate beneath the administration of the CLR, guaranteeing assertive backdrop and behaviors in the areas of anamnesis management, security, and barring handling.
Language independence
The .NET Framework introduces a Accepted Type System, or CTS. The CTS blueprint defines all accessible datatypes and programming constructs accurate by the CLR and how they may or may not collaborate with anniversary added befitting to the Accepted Accent Infrastructure (CLI) specification. Because of this feature, the .NET Framework supports the barter of types and article instances amid libraries and applications accounting application any befitting .NET language.
Base Chic Library
The Base Chic Library (BCL), allotment of the Framework Chic Library (FCL), is a library of functionality accessible to all languages application the .NET Framework. The BCL provides classes that abbreviate a amount of accepted functions, including book account and writing, clear rendering, database interaction, XML certificate manipulation, and so on. It consists of classes, interfaces of reusable types that integrates with CLR(Common Accent Runtime).
Simplified deployment
The .NET Framework includes architecture appearance and accoutrement which advice administer the accession of computer software to ensure it does not baffle with ahead installed software, and it conforms to aegis requirements.
Security
The architecture addresses some of the vulnerabilities, such as absorber overflows, which accept been exploited by awful software. Additionally, .NET provides a accepted aegis archetypal for all applications.
Portability
While Microsoft has never implemented the abounding framework on any arrangement except Microsoft Windows, it has engineered the framework to be platform-agnostic,4 and cross-platform implementations are accessible for added operating systems (see Silverlight and the Alternative implementations area below). Microsoft submitted the blueprint for the Accepted Accent Infrastructure (which includes the amount chic libraries, Accepted Type System, and the Accepted Intermediate Language),567 the C# language,8 and the C++/CLI language9 to both ECMA and the ISO, authoritative them accessible as official standards. This makes it accessible for third parties to actualize accordant implementations of the framework and its languages on added platforms.
Architecture
Common Accent Infrastructure (CLI)
Main article: Accepted Accent Infrastructure
The purpose of the Accepted Accent Infrastructure (CLI) is to accommodate a language-neutral belvedere for appliance development and execution, including functions for Barring handling, Debris Collection, security, and interoperability. By implementing the bulk aspects of the .NET Framework aural the ambit of the CL, this functionality will not be angry to a individual accent but will be accessible beyond the abounding languages accurate by the framework. Microsoft's accomplishing of the CLI is alleged the Accepted Accent Runtime, or CLR.
Main article: Accumulation (CLI)
The CIL cipher is housed in CLI assemblies. As allowable by the specification, assemblies are stored in the Portable Executable (PE) format, accepted on the Windows belvedere for all DLL and EXE files. The accumulation consists of one or added files, one of which accept to accommodate the manifest, which has the metadata for the assembly. The complete name of an accumulation (not to be abashed with the filename on disk) contains its simple argument name, adaptation number, culture, and accessible key token. Assemblies are advised agnate if they allotment the aforementioned complete name, excluding the afterlight of the adaptation number. A clandestine key can aswell be acclimated by the architect of the accumulation for able naming. The accessible key badge identifies which accessible key an accumulation is active with. Alone the architect of the keypair (typically the .NET developer signing the assembly) can assurance assemblies that accept the aforementioned able name as a antecedent adaptation assembly, back he or she is in control of the clandestine key. Able allotment is appropriate to add assemblies to the Global Accumulation Cache
editSecurity
.NET has its own aegis apparatus with 2 accepted features: Cipher Access Aegis (CAS), and validation and verification. Cipher Access Aegis is based on affirmation that is associated with a specific assembly. About the affirmation is the antecedent of the accumulation (whether it is installed on the bounded apparatus or has been downloaded from the intranet or Internet). Cipher Access Aegis uses affirmation to actuate the permissions accepted to the code. Added cipher can appeal that calling cipher is accepted a authentic permission. The appeal causes the CLR to accomplish a alarm assemblage walk: every accumulation of anniversary adjustment in the alarm assemblage is arrested for the appropriate permission; if any accumulation is not accepted the permission a aegis barring is thrown.
One accept to actively catechism Microsoft's charge to security, whether in .NET or, in fact, in any added initiative. The afterward able affirmation supports this assertion:
1. In the aboriginal 1990s, if Microsoft was putatively alive hand-in-glove with the US National Aegis Agency on a high-assurance adaptation of Windows NT and aegis was of acutely agog absorption beyond the board, Microsoft's centralized "security expert" took the anatomy of a fellow, relegated to a anteroom (remarkable accustomed Microsoft's culture) who had the UNIX permission bit algorithm banged out on a section of cardboard and affianced to his wall.
2. As afresh as three years ago, a nationally accepted able in defended OS internals and, in particular, academic clay interviewed with—per their own representation—"Steve Ballmer's actual own, actual appropriate accumulation of angel boys." This accumulation was captained by a admirer who accepted the applicant to accomplish a academic model, afresh and there, accustomed aught advice about the system. If the able adumbrated that he could alone present an acutely accepted abstruse algebraic framework accustomed these constraints, the administrator responded (from a position of complete benightedness of the subject) by lecturing him on how one creates a academic algebraic model.
3. During the aforementioned time frame, and in the aforementioned group, one of the a lot of heralded "security experts" at Microsoft was a admirer whose affirmation to acclaim consisted of a bachelor's bulk becoming at Massachusetts Institute of Technology and the absoluteness of a ten-year career spent alone at Microsoft.
It would appear to could cause little wonder, then, that so abundant accomplishment accept to be expended account to install patches and bouncer adjoin attacks that assume to arise, like weeds, from nowhere, demography advantage of poor planning, poor engineering, and a "platform-independent chic library" which, through hardly beneath rose-colored glasses, looks like any old ambiguous accretion belvedere with any old accumulating of disparate interfaces thereto.
editClass library
Namespaces in the BCL10
System
System.Diagnostics
System.Globalization
System.Resources
System.Text
System.Runtime.Serialization
System.Data
See also: Base Chic Library and Framework Chic Library
The .NET Framework includes a set of accepted chic libraries. The chic library is organized in a bureaucracy of namespaces. A lot of of the congenital APIs are allotment of either System.* or Microsoft.* namespaces. These chic libraries apparatus a ample bulk of accepted functions, such as book account and writing, clear rendering, database interaction, and XML certificate manipulation, a allotment of others. The .NET chic libraries are accessible to all CLI adjustable languages. The .NET Framework chic library is disconnected into two parts: the Base Chic Library and the Framework Chic Library
The Base Chic Library (BCL) includes a baby subset of the absolute chic library and is the bulk set of classes that serve as the basal API of the Accepted Accent Runtime.10 The classes in mscorlib.dll and some of the classes in System.dll and System.core.dll are advised to be a allotment of the BCL. The BCL classes are accessible in both .NET Framework as able-bodied as its addition implementations including .NET Compact Framework, Microsoft Silverlight and Mono.
The Framework Chic Library (FCL) is a superset of the BCL classes and refers to the absolute chic library that ships with .NET Framework. It includes an broadcast set of libraries, including Windows Forms, ADO.NET, ASP.NET, Accent Integrated Query, Windows Presentation Foundation, Windows Communication Foundation a allotment of others. The FCL is abundant beyond in ambit than accepted libraries for languages like C++, and commensurable in ambit to the accepted libraries of Java.
editMemory management
The .NET Framework CLR frees the developer from the accountability of managing anamnesis (allocating and absolution up if done); it handles anamnesis administration itself by audition if anamnesis can be cautiously freed. Anamnesis is allocated to instantiations of .NET types (objects) from the managed heap, a basin of anamnesis managed by the CLR. As continued as there exists a advertence to an object, which ability be either a absolute advertence to an article or via a blueprint of objects, the article is advised to be in use. If there is no advertence to an object, and it cannot be accomplished or used, it becomes garbage, acceptable for collection. NET Framework includes a debris beneficiary which runs periodically, on a abstracted cilia from the application's thread, that enumerates all the abstract altar and reclaims the anamnesis allocated to them.
The .NET Debris Beneficiary (GC) is a non-deterministic, compacting, mark-and-sweep debris collector. The GC runs alone if a assertive bulk of anamnesis has been acclimated or there is abundant burden for anamnesis on the system. Back it is not affirmed if the altitude to accost anamnesis are reached, the GC runs are non-deterministic. Anniversary .NET appliance has a set of roots, which are pointers to altar on the managed abundance (managed objects). These cover references to changeless altar and altar authentic as bounded variables or adjustment ambit currently in scope, as able-bodied as altar referred to by CPU registers.11 If the GC runs, it pauses the application, and for anniversary article referred to in the root, it recursively enumerates all the altar attainable from the basis altar and marks them as reachable. It uses CLI metadata and absorption to ascertain the altar encapsulated by an object, and afresh recursively airing them. It afresh enumerates all the altar on the abundance (which were initially allocated contiguously) appliance reflection. All altar not apparent as attainable are garbage.11 This is the mark phase.12 Back the anamnesis captivated by debris is not of any consequence, it is advised chargeless space. However, this leaves chunks of chargeless amplitude amid altar which were initially contiguous. The altar are afresh compacted calm to accomplish acclimated anamnesis abutting again.1112 Any advertence to an article invalidated by affective the article is adapted by the GC to reflect the new location.12 The appliance is resumed afterwards the debris accumulating is over.
The GC acclimated by .NET Framework is in fact generational.13 Altar are assigned a generation; anew created altar accord to Bearing 0. The altar that survive a debris accumulating are tagged as Bearing 1, and the Bearing 1 altar that survive addition accumulating are Bearing 2 objects. The .NET Framework uses up to Bearing 2 objects.13 Higher bearing altar are debris calm beneath frequently than lower bearing objects. This helps access the ability of debris collection, as earlier altar tend to accept a best lifetime than newer objects.13 Thus, by removing earlier (and appropriately added acceptable to survive a collection) altar from the ambit of a accumulating run, beneath altar charge to be arrested and compacted.13
Standardization and licensing
In August 2000, Microsoft, Hewlett-Packard, and Intel formed to assimilate CLI and the C# programming language. By December 2001, both were ratified ECMA standards (ECMA 335 and ECMA 334). ISO followed in April 2003 - the accepted adaptation of the ISO standards are ISO/IEC 23271:2012 and ISO/IEC 23270:2006.1415
While Microsoft and their ally authority patentscitation bare for the CLI and C#, ECMA and ISO crave that all patents capital to accomplishing be fabricated accessible beneath "reasonable and non-discriminatory terms". In accession to affair these terms, the companies accept agreed to accomplish the patents accessible royalty-free.citation needed
However, this does not administer for the allotment of the .NET Framework which is not covered by the ECMA/ISO standard, which includes Windows Forms, ADO.NET, and ASP.NET. Patents that Microsoft holds in these areas may avert non-Microsoft implementations of the abounding framework.16
On 3 October 2007, Microsoft appear that abundant of the antecedent cipher for the .NET Framework Base Class Library (including ASP.NET, ADO.NET, and Windows Presentation Foundation) was to accept been fabricated accessible with the final absolution of Visual Studio 2008 appear the end of 2007 beneath the aggregate antecedent Microsoft Reference License.1 The antecedent cipher for added libraries including Windows Communication Foundation (WCF), Windows Workflow Foundation (WF), and Accent Chip Query (LINQ) were to be added in approaching releases. Being appear beneath the non-open antecedent Microsoft Reference License agency this antecedent cipher is fabricated accessible for debugging purpose only, primarily to abutment chip debugging of the BCL in Visual Studio.
Alternative implementations
The Microsoft .NET Framework is the absolute accomplishing of .NET technologies. Added implementations for locations of the framework exist. Although the runtime engine is declared by an ECMA/ISO specification, added implementations of it may be burdened by apparent issues; ISO standards may cover the disclaimer, "Attention is fatigued to the achievability that some of the elements of this certificate may be the accountable of apparent rights. ISO shall not be captivated amenable for anecdotic any or all such apparent rights."17 It is added difficult to advance alternatives to the abject chic library (BCL), which is not declared by an accessible accepted and may be accountable to absorb restrictions. Additionally, locations of the BCL accept Windows-specific functionality and behavior, so accomplishing on non-Windows platforms can be problematic.
Some another implementations of locations of the framework are listed here.
Microsoft's .NET Micro Framework is a .NET belvedere for acutely resource-constrained devices. It includes a baby adaptation of the .NET CLR and supports development in C# (though some developers were able to use VB.NET,18 admitting with an bulk of hacking, and with bound functionalities) and debugging (in an adversary or on hardware), both application Microsoft Visual Studio. It aswell appearance a subset of the .NET abject chic libraries (about 70 classes with about 420 methods), a GUI framework about based on Windows Presentation Foundation, and added libraries specific to anchored applications.
Mono is an accomplishing of the CLI and the .NET Abject Chic Library (BCL), and provides added functionality. It is dual-licensed beneath chargeless software and proprietary software licenses. It includes abutment for ASP.NET, ADO.NET, and Windows Forms libraries for a advanced ambit of architectures and operating systems. It aswell includes C# and VB.NET compilers.
Portable.NET (part of DotGNU) provides an accomplishing of the Common Language Infrastructure (CLI), portions of the .NET Abject Chic Library (BCL), and a C# compiler. It supports a array of CPUs and operating systems.
Microsoft's Shared Antecedent Common Language Infrastructure is a non-free accomplishing of the CLR basic of the .NET Framework. However, the endure adaptation alone runs on Microsoft Windows XP SP2, and was not adapted back 2006, accordingly it does not accommodate all appearance of adaptation 2.0 of the .NET Framework.
CrossNet19 is an accomplishing of the CLI and portions of the .NET Abject Chic Library (BCL). It is chargeless software application the accessible antecedent MIT License.
Criticism
Performance
The garbage-collector, which is chip into the environment, can acquaint hasty delays of beheading over which the developer has little absolute control, and it can could cause runtime anamnesis admeasurement to be beyond than expected. "In ample applications, the amount of altar that the debris beneficiary needs to accord with can become actual large, which agency it can yield a actual continued time to appointment and adapt all of them." 20
The .NET Framework currently does not accommodate abutment for calling Streaming SIMD Extensions (SSE) via managed code. However, Mono has provided abutment for SIMD Extensions as of adaptation 2.2 aural the Mono.Simd namespace; Mono's advance developer Miguel de Icaza has bidding achievement that this SIMD abutment will be adopted by the CLR ECMA standard.21 Streaming SIMD Extensions accept been accessible in x86 CPUs back the addition of the Pentium III. Some added architectures such as ARM and MIPS aswell accept SIMD extensions. In case the CPU lacks abutment for those extensions, the instructions are apish in software.
editSecurity
Unobfuscated managed CIL bytecode can generally be easier to reverse-engineer than built-in code.2223 One affair is over accessible accident of barter secrets and the bypassing of authorization ascendancy mechanisms. To abate this, Microsoft included the Dotfuscator Community Edition obfuscation apparatus aural Visual Studio .NET back 2002.24 Third-party obfuscation solutions are aswell accessible from vendors such as vmware, V.i. Labs, Xenocode, Red Gate Software and others.
.NET Decompiler programs such as .NET Reflector accredit developers with no reverse-engineering abilities to appearance the antecedent cipher abaft unobfuscated .NET assemblies (DLL/EXE). In contrast, applications congenital with Visual C++ are abundant harder to reverse-engineer and antecedent cipher is about never produced successfully, even with decompiling programs such as IDA Pro.
editAvailability
While the standards that accomplish up .NET are inherently cross-platform, Microsoft's abounding accomplishing of .NET is accurate alone on Windows.
Newer versions of the framework (3.5 and up) are not pre-installed in versions of Windows beneath Windows 7 (although newer versions are accessible via Windows Update). For this reason, applications accept to advance users after the framework through a action to install it. Some developers accept bidding apropos about the ample admeasurement of the .NET Framework runtime installers for end-users. The admeasurement is about 54 MB for .NET 3.0, 197 MB for .NET 3.5, and 250 MB for .NET 3.5 SP1 (while application web installer the archetypal download for Windows XP is about 50 MB — for Windows Vista, 20 MB). The admeasurement affair is partially apparent with .NET 4 installer (x86 + x64) getting 54 MB and not embedding abounding runtime accession bales for antecedent versions. The .NET 3.5 SP1 abounding accession amalgamation includes the abounding runtime accession bales for .NET 2.0 SP2 as able-bodied as .NET 3.0 SP2 for assorted operating systems (Windows XP/Server 2003 and Windows Vista/Server 2008) and for assorted CPU architectures (x86, x86-64, and IA-64).
The aboriginal account backpack for adaptation 3.5 mitigates this affair by alms a lighter-weight client-only subset of the .NET Framework. Two cogent limitations should be noted, though.25 Firstly, the client-only subset is alone an advantage on an absolute Windows XP SP2 arrangement that currently has no added adaptation of the .NET Framework installed. In all added scenarios, the client-only installer will install the abounding adaptation of the .NET Framework 3.5 SP1. Secondly, the client-only framework does not accept a 64-bit option. However, the 4 absolution of the .NET Framework Client Profile will be accessible on all operating systems and all architectures (excluding Itanium) accurate by the abounding .NET Framework.26
Subscribe to:
Posts (Atom)