.NET Framework: Difference between revisions

From Citizendium
Jump to navigation Jump to search
imported>Pat Palmer
mNo edit summary
 
(74 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{subpages}}
{{subpages}}
The '''.NET Framework''' is a bundle of interdependent programs required to create and run programs using the [[C_sharp|C# programming language]] on most versions of Microsoft Windows.  Microsoft began work on the platform in ? and formally launched the programming language in ?, after which its use grew rapidly across the computer industry. As of the end of 2006, the .NET Framework was in its 2nd major revision (version 2.0), with version 3.0 being readied for release along with the Windows Vista operating systen in early 2007.  
{{TOC|right}}
The '''.NET Framework''' (pronounced "dot net") is a bundle of interdependent [[program (software)|programs]] required to create and run programs using [[C_sharp|C#]] and multiple other [[programming languages]] on most versions of [[Microsoft Windows]][[Microsoft]] launched the framework in 2000, and since then, it has been  [[Common_Language_Specification|standardized]] and widely adopted as a platform by [[List_of_languages_using_the_.NET_Framework|many different programming languages]].  It has also been enabled for execution on the [[Linux]] operating systems, in addition to most versions of [[Microsoft Windows]].  
 
As of late 2012, version 4.5 of the .NET Framework has been released at the same time as the new Windows 8 operating system.  .NET executable programs may run as ''applications'' on a desktop or on a web server as part of a ''web application''.  The .NET Framework is also available in a reduced version for hand-held devices such as [[Smartphone|smart phones]].


==How the platform works==  
==How the platform works==  
The .NET Framework's centerpiece is an execution engine, also known as the [[Virtualization|virtual machine]] or [[runtime environment]], that has been implemented for most versions of Microsoft Windows [[operating system]]s.  As well, thousands of pre-written library classes, also called ''base classes'', are available on each type of Windows operating systemThe .NET runtime environment and the class libraries make all Windowws computer systems look alike so that programs written in the [[C_sharp|C# programming language]], or other programming languages that target the same runtime, can run identically on all of them.
The .NET Framework's centerpiece is an execution engine, also known as a [[Virtualization|virtual machine]] and sometimes called the [[common language runtime]] (CLR), that has been implemented for most versions of Microsoft Windows [[operating system]]s.  When downloading updates for [[Microsoft Windows]], the execution engine is identified as the ''.NET Framework'', although it is only a portion of the entire framework.  The .NET Framework component available through Windows Update also includes the thousands of pre-written library classes.  This .NET runtime environment, including the class libraries, makes all Windows computer systems look alike so that programs written in the [[C_sharp|C# programming language]], and several other programming languages that target the .NET Framework, can run identically on all of them.


The .NET Framework runtime environment hides the underlying operating system from the programmer]]
The .NET Framework runtime environment hides the underlying operating system from the [[programmer]]The platform consists of multiple programs, each of which provides a distinct portion of its overall capabilities.  The essential components in the platform are the [[C_sharp|C#]] [[source code]] [[compiler]], the [[.NET class libraries]], and the [[.NET runtime environment]].  The C# [[source code]] [[compiler]] converts C# [[source code]] (files with an extension of .cs) into intermediate code (files with an extension of .exe).  The runtime environment is a special program that takes as input .NET common language runtime programs (special .exe files) for ''execution'' according to the rules laid out in the .NET Framework specification.
The platform consists of multiple programs, each of which provides a distinct portion of its overall capabilities.  The essential components in the platform are the [[C_sharp|C#]] [[source code]] [[compiler]], the [[.NET class libraries]], and the [[.NET runtime environement]].  The C# [[source code]] [[compiler]] converts C# [[source code]] (files with an extension of .cs) into intermediate code (files with an extension of .???).  The runtime environment is a special program that takes as input .NET common language runtime programs (special .exe files) for ''execution'' according to the rules laid out in the .NET Framework specification.


The .NET Framework does not necessarily include an [[integrated development environment]]  
The .NET Framework does not necessarily include an [[integrated development environment]]  
([[IDE]]).  Microsoft produces and sells the Microsoft Visual Studio IDE, and provides free, downloadable reduced versions of it for learners.  Several other free IDE's exist.
([[IDE]]).  Microsoft produces and sells the Microsoft Visual Studio IDE, and provides free, reduced versions of it for learners.  Several other free IDE's exist.


===Bytecode and JIT compilation===
===Common Intermediate Language and JIT compilation===
C# programs initially compile down to an intermediate language; common language runtime programs are loaded and run by .NET runtime, also known as a virtual machine.  The .NET runtime is sophisticated; it implements the .NET intermediate language specification by means of a ''[[Just-in-time compilation|just-in-time (JIT) compiler]]'' that, at runtime, converts intermediate code into native machine code. JIT compilation occurs on a per method basis only the first time each method is called, after which the native code for that method remains cached in memory; this means that subsequent executions of that method run as fast as native programs.  Java programs tend to "warm up" after they have been executing for awhile, and in some cases they execute as efficiently as [[native code]] after an initial startup period.
C# programs initially compile down to Common Intermediate Language (CIL) code; these programs are loaded and run by .NET ''common language runtime'', or virtual machine.  The .NET runtime is sophisticated; it implements the .NET intermediate language specification by means of a ''[[Just-in-time compilation|just-in-time (JIT) compiler]]'' that, at runtime, converts CIL code into [[native code]]. JIT compilation occurs on a per method basis only the first time each method is called, after which the native code for that method remains cached in memory; this means that subsequent executions of that method run as fast as native programs.  .NET programs tend to "warm up" after they have been executing for awhile, and in some cases they execute as efficiently as [[native code]] after an initial startup period.


The .NET Framework also includes extensive libraries (pre-compiled into intermediate language) containing reusable code, as well as numerous ways for .NET applications to be deployed, including on a desktop machine for a single user, on a web server as a ''handler'' (returning "dynamic" information to web browsers), or on a web server as a [[web service]] endpoint (procedure callable across a network from any kind of platform).  There are several other components and utilities as well.
The .NET Framework also includes extensive libraries (pre-compiled into intermediate language) containing reusable code, as well as numerous ways for .NET applications to be deployed, including on a desktop machine for a single user, on a web server as a ''handler'' (returning "dynamic" information to web browsers), or on a web server as a [[web service]] endpoint (procedure callable across a network from any kind of platform).  There are several other components and utilities as well.
===Editions===
C# programs may execute as ''applications'' on a desktop or on a web server as part of ''web applications''.  C# and the .NET Framework are also available in a reduced version for hand-held devices such as smart phones.
===Versions===
*1.0
*1.1
*2.0
*3.0


===Associated file extensions===
===Associated file extensions===
* C# source files have an extension of .cs
Compiled .NET programs have an extension of ''.exe'' or ''.dll'' but differ in internal format from ''.exe'' or ''.dll'' files containing Intel [[native code]].  The .NET versions of such files are called ''assemblies'' rather than ''executables''.  .NET assemblies may contain, besides .NET intermediate code, encapsulated resources such as images.  When people say ''component'' or library, they usually mean a ''.dll'' file, which is a dynamically linked library that does not run ''standalone''; it only runs if called from within a running ''.exe'' program.  A summary of the .NET file extensions is shown here:
* .NET intermediate files (executable programs) have an extension of .exe (but differ in internal format from .exe files containing "native" code)
{| class="wikitable"
* .NET intermediate files (executable programs) must be loaded at runtime by a .NET Framework runtime
!Extension!!Contents!!Name!!Comments
** NET .exe files may contain byte codes, resources such as images, or metadata
|-
*when people say "component" or library, they usually mean a .dll file, which is a .NET program that does not have a "main" function entry point--it has methods that we can call, but it doesn't run "standalone"
|.cs||[[C sharp|C#]] [[source code]]||plain text file|| many other source languages possible
 
|-
==Competition with the Java platform==
|.exe ||metadata and intermediate code ||.NET assembly (standalone program) || binary file in PE format, containing [[CLR]] code
In 2000, Microsoft introduced the .NET framework, a new platform with a Java-like language ([[C sharp|C#]]) and associated development tools. The Java platform and the .NET framework have been competing vigorously on the desktop, but especially in the area of server technology.  Many [[software developer]]s (programmers) become expert on one or the other, but few have time to learn both.  The schism of understanding the two platforms has been widened due to misinformation and disinformation, with a fair amount of zealotry on the part of each system's defenders.
|-
|.dll||metadata and intermediate code|| .NET assembly (dynamically linked library) || binary file in PE format, containing [[CLR]] code
|}


From a historical viewpoint, the two systems may be seen as having different goalsA primary goal for Java was to enable a program to run on several different operating systems; this was accomplished by providing implementations of the Java virtual machine for all prevalent [[operating system|operating systems]], including members of the Unix family, Linux, Max OS X and most versions of Windows.
==Release History==
Microsoft started development on the .NET Framework in the late 90s and, by late 2000, the first beta versions of .NET were being releasedIn the following table, RTM is omitted  although it sometimes appears on official releases (it stands for ''Release to Manufacturing''):
{| class="wikitable"
!Version Name!!Version Number!!Release Date||
|-
|1.0 Beta 1||1.0.????.0||November 2000|Nov. 2000|| Microsoft Integrated Development Environment (IDE)
|-
|1.0 Beta 2||1.0.2914.0||Jun. 2001||
|-
|1.0 ||1.0.3705.0||Jan. 2002|| Visual Studio .NET v1.0
|-
|1.0 SP1||1.0.3705.209||Mar. 2002||
|-
|1.0 SP2||1.0.3705.288||Aug. 2002||
|-
|1.0 SP3||1.0.3705.6018||Aug. 2004||
|-
|1.1 ||1.1.4322.573||Apr. 2003||Visual Studio .NET v1.1
|-
|1.1 SP1||1.1.4322.2032||Aug. 2004||
|-
|1.1 SP1 for Windows Server 2003 ||1.1.4322.2300||Mar. 2005||
|-
|2.0 ||2.0.50727.42||Nov. 2005|| Visual Studio 2005
|-
|3.0 ||3.0.4506.30||Nov. 2006||
|-
|3.5 Beta 2||3.5.20706.1||Jul. 2007|| Visual Studio .NET 2008 Beta 2 (code name ''Orcas'')
|}


Microsoft has been widely criticized for only implementing its .NET runtime "only on Windows." Such criticism does not take into account that Windows is not a single operating system (at least not from the viewpoint of a programmer who must call routines in the operating system)Even before Microsoft Vista appeared in 2007, there were already approximately 35 versions of Windows, all with slightly different application programming interfaces (API's).  The difficulty of developing software for these many different Windows systems had led to a situation called "DLL Hell", where the wrong versions of dynamic link libraries (DLL's) were encountered by programs trying to runCreating the .NET framework solved this huge problem for Microsoft by making all versions of Windows alike to programmers.
==Microsoft Visual Studio .NET and the Windows Designer==
With each major release of the .NET Framework, Microsoft has also released a version of its integrated development environment (IDE), ''Visual Studio .NET''.  Visual Studio .NET is intended for developers who write programs in the [[C sharp|C#]] or Visual Basic .NET [[programming languages]]The popularity of both languages for Windows application programming has been increased by the presence of the Windows Designer in Visual Studio .NET.  The Windows Designer allows users to drag and drop components such as text boxes and labels onto a window (called a ''form'' in Microsoft terminology).  The Designer is really a code generator; it generates code to declare and instantiate components as a result of programmers dragging and dropping a visual representation of a component onto a form.


In fact, some .NET programs can run on non-Windows platforms.  Miguel de Icaza (co-creator of [[GNOME]]) has created an [[open source]] implementation of the .NET framework for Unix-like operating systems; it runs on [[Mac OS X]], [[Linux]] and [[Sun Microsystems|Sun's]] [[Solaris]])Called [[Mono]], this independent implementation of a "common language runtime" is based on .NET's ECMA/ISO standards<ref name="Mono Project Main page">{{cite web| url=http://www.mono-project.com/Main_Page | title="Mono Project Main page" | date=Retrieved 2007-04-25}}</ref> and is not under the jurisdiction or ownership of Microsoft.
The Windows Designer was patterned after a similar feature in the Visual Basic IDE in the early 1990's; the Designer was adopted by the C# IDE due to its enormous popularity as a design tool for Visual BasicThere is an equivalent graphical "Designer" feature in Visual Studio .NET for developing ASP.NET web forms.  When the .NET Framework first appeared, the Windows Designer was instrumental in gaining acceptance for the .NET Framework and the C# and VB.NET languages from the computer industry because of its helpfulness in rapid application development.


The .NET framework and the Java platform have diverged in various other ways, including that .NET was designed to allow many different programming languages to use its runtime and libraries (whereas the Java platform was not used fpr multiple languages until very recently).  There was no theoretical reason for Java being the only language that initially used the Java runtime.  It was only since perhaps 2006, in response to Microsoft's multi-language .NET strategy, that Sun finally began a push to get additional languages  "targeting" the Java runtime.
==Standardization==
The virtual machine specification for the .NET Framework has been standardized by the [[ECMA International]] (ECMA), and based on that standard, the open-source [[Mono]]<ref name="Mono">
{{cite web|url=http://mono-project.com/Main_Page|title="What is Mono?"|publisher=[[Mono]] open sourc project|
year=|accessdate=2007-04-02}}</ref> project has implemented a .NET runtime engine for Linux.  An important part of the ECMA standard is the [[Common Language Specification]], or CLS, consisting of the specifications which programmers must follow in order to assure that code they write will interwork with other languages.  There are 41 rules in the CLS specification, including just for example, that library components must not use case-sensitive symbols (since some programming languages are not case sensitive, like Visual Basic).  Components which comply with all rules of the CLS can be marked with a meta-tag claiming CLS-compliance, and can thus be treated as such by the runtime engines and by compilers and other utilitiesThe ECMA standard was also adopted in 2006 by the International Standards Organization (ISO).


===Platform comparison===
==Competition with the [[Java platform]]==
See a [[Comparison_of_Java_and_.NET]].


<ul>
==Languages that target the .NET Framework==
<li>Java was the model
See the [[List of languages using the .NET Framework]].
for Microsoft when it created C# in 2002<ul>
<li>Java and C# code look very similar; it is fairly easy to switch
between the two</li>
</ul>
</li><li>Java is cross-platform; .NET is cross-language:<ul>
<li>Java provides freedom from <i>all</i> OS differences, by making
necessary cross-platform compromises; Java does
    <b>not</b> provide cross-<i>language</i> calling</li>
<li>.NET makes 36 versions of Windows alike for programmers; it eliminates the "DLL hell" which formerly
occurred when installing Windows applications</li>
<li>.NET libraries can be used by any of the .NET compiled languages (of
which there are dozens); libraries can be written in any .NET language</li>
</ul>
</li><li>the two platforms compete fiercely in the world wide web<ul>
<li>JSP's require Apache web servers (Linux or Unix); these are HTML
interlaced with code</li>
<li>&nbsp;&nbsp;&nbsp; called "servlets" if all code</li>
<li>ASP's require
Microsoft's IIS6 web server; these are HTML interlaced with code</li>
<li>&nbsp;&nbsp;&nbsp; called "web handlers" if all code</li>
<li>both Linux and Microsoft web servers use load-balancing across mirrored web
farms to scale up</li>
<li>so-called "dynamic" languages such as Ruby are seen by
some as the next stage beyond Java and .NET</li>
</ul></li>
<li>it's an arms race!</li>
</ul>


==References==
==References==
<references />
{{reflist}}


[[Category:Reviewed Passed]]
[[Category:CZ Live]]
[[Category:CZ Live]]
[[Category:Computers Workgroup]]
[[Category:Computers Workgroup]][[Category:Suggestion Bot Tag]]

Latest revision as of 13:10, 19 June 2024

This article is developing and not approved.
Main Article
Discussion
Related Articles  [?]
Bibliography  [?]
External Links  [?]
Citable Version  [?]
 
This editable Main Article is under development and subject to a disclaimer.

The .NET Framework (pronounced "dot net") is a bundle of interdependent programs required to create and run programs using C# and multiple other programming languages on most versions of Microsoft Windows. Microsoft launched the framework in 2000, and since then, it has been standardized and widely adopted as a platform by many different programming languages. It has also been enabled for execution on the Linux operating systems, in addition to most versions of Microsoft Windows.

As of late 2012, version 4.5 of the .NET Framework has been released at the same time as the new Windows 8 operating system. .NET executable programs may run as applications on a desktop or on a web server as part of a web application. The .NET Framework is also available in a reduced version for hand-held devices such as smart phones.

How the platform works

The .NET Framework's centerpiece is an execution engine, also known as a virtual machine and sometimes called the common language runtime (CLR), that has been implemented for most versions of Microsoft Windows operating systems. When downloading updates for Microsoft Windows, the execution engine is identified as the .NET Framework, although it is only a portion of the entire framework. The .NET Framework component available through Windows Update also includes the thousands of pre-written library classes. This .NET runtime environment, including the class libraries, makes all Windows computer systems look alike so that programs written in the C# programming language, and several other programming languages that target the .NET Framework, can run identically on all of them.

The .NET Framework runtime environment hides the underlying operating system from the programmer. The platform consists of multiple programs, each of which provides a distinct portion of its overall capabilities. The essential components in the platform are the C# source code compiler, the .NET class libraries, and the .NET runtime environment. The C# source code compiler converts C# source code (files with an extension of .cs) into intermediate code (files with an extension of .exe). The runtime environment is a special program that takes as input .NET common language runtime programs (special .exe files) for execution according to the rules laid out in the .NET Framework specification.

The .NET Framework does not necessarily include an integrated development environment (IDE). Microsoft produces and sells the Microsoft Visual Studio IDE, and provides free, reduced versions of it for learners. Several other free IDE's exist.

Common Intermediate Language and JIT compilation

C# programs initially compile down to Common Intermediate Language (CIL) code; these programs are loaded and run by .NET common language runtime, or virtual machine. The .NET runtime is sophisticated; it implements the .NET intermediate language specification by means of a just-in-time (JIT) compiler that, at runtime, converts CIL code into native code. JIT compilation occurs on a per method basis only the first time each method is called, after which the native code for that method remains cached in memory; this means that subsequent executions of that method run as fast as native programs. .NET programs tend to "warm up" after they have been executing for awhile, and in some cases they execute as efficiently as native code after an initial startup period.

The .NET Framework also includes extensive libraries (pre-compiled into intermediate language) containing reusable code, as well as numerous ways for .NET applications to be deployed, including on a desktop machine for a single user, on a web server as a handler (returning "dynamic" information to web browsers), or on a web server as a web service endpoint (procedure callable across a network from any kind of platform). There are several other components and utilities as well.

Associated file extensions

Compiled .NET programs have an extension of .exe or .dll but differ in internal format from .exe or .dll files containing Intel native code. The .NET versions of such files are called assemblies rather than executables. .NET assemblies may contain, besides .NET intermediate code, encapsulated resources such as images. When people say component or library, they usually mean a .dll file, which is a dynamically linked library that does not run standalone; it only runs if called from within a running .exe program. A summary of the .NET file extensions is shown here:

Extension Contents Name Comments
.cs C# source code plain text file many other source languages possible
.exe metadata and intermediate code .NET assembly (standalone program) binary file in PE format, containing CLR code
.dll metadata and intermediate code .NET assembly (dynamically linked library) binary file in PE format, containing CLR code

Release History

Microsoft started development on the .NET Framework in the late 90s and, by late 2000, the first beta versions of .NET were being released. In the following table, RTM is omitted although it sometimes appears on official releases (it stands for Release to Manufacturing):

Version Name Version Number Release Date
1.0 Beta 1 1.0.????.0 Nov. 2000 Microsoft Integrated Development Environment (IDE)
1.0 Beta 2 1.0.2914.0 Jun. 2001
1.0 1.0.3705.0 Jan. 2002 Visual Studio .NET v1.0
1.0 SP1 1.0.3705.209 Mar. 2002
1.0 SP2 1.0.3705.288 Aug. 2002
1.0 SP3 1.0.3705.6018 Aug. 2004
1.1 1.1.4322.573 Apr. 2003 Visual Studio .NET v1.1
1.1 SP1 1.1.4322.2032 Aug. 2004
1.1 SP1 for Windows Server 2003 1.1.4322.2300 Mar. 2005
2.0 2.0.50727.42 Nov. 2005 Visual Studio 2005
3.0 3.0.4506.30 Nov. 2006
3.5 Beta 2 3.5.20706.1 Jul. 2007 Visual Studio .NET 2008 Beta 2 (code name Orcas)

Microsoft Visual Studio .NET and the Windows Designer

With each major release of the .NET Framework, Microsoft has also released a version of its integrated development environment (IDE), Visual Studio .NET. Visual Studio .NET is intended for developers who write programs in the C# or Visual Basic .NET programming languages. The popularity of both languages for Windows application programming has been increased by the presence of the Windows Designer in Visual Studio .NET. The Windows Designer allows users to drag and drop components such as text boxes and labels onto a window (called a form in Microsoft terminology). The Designer is really a code generator; it generates code to declare and instantiate components as a result of programmers dragging and dropping a visual representation of a component onto a form.

The Windows Designer was patterned after a similar feature in the Visual Basic IDE in the early 1990's; the Designer was adopted by the C# IDE due to its enormous popularity as a design tool for Visual Basic. There is an equivalent graphical "Designer" feature in Visual Studio .NET for developing ASP.NET web forms. When the .NET Framework first appeared, the Windows Designer was instrumental in gaining acceptance for the .NET Framework and the C# and VB.NET languages from the computer industry because of its helpfulness in rapid application development.

Standardization

The virtual machine specification for the .NET Framework has been standardized by the ECMA International (ECMA), and based on that standard, the open-source Mono[1] project has implemented a .NET runtime engine for Linux. An important part of the ECMA standard is the Common Language Specification, or CLS, consisting of the specifications which programmers must follow in order to assure that code they write will interwork with other languages. There are 41 rules in the CLS specification, including just for example, that library components must not use case-sensitive symbols (since some programming languages are not case sensitive, like Visual Basic). Components which comply with all rules of the CLS can be marked with a meta-tag claiming CLS-compliance, and can thus be treated as such by the runtime engines and by compilers and other utilities. The ECMA standard was also adopted in 2006 by the International Standards Organization (ISO).

Competition with the Java platform

See a Comparison_of_Java_and_.NET.

Languages that target the .NET Framework

See the List of languages using the .NET Framework.

References

  1. "What is Mono?". Mono open sourc project. Retrieved on 2007-04-02.