Saturday, July 16, 2011
What is .NET?
I was having lunch recently with a colleague when he asked, “Are you still messing around with that .NET stuff?” I could tell by the tone of his voice that he—like many computer users—still viewed .NET with suspicion.
And perhaps with good reason. Purposefully kept separate from the Windows operating system, the 22MB Microsoft .NET Framework is an hour download on dialup and four minutes on broadband. For .NET developers, this extra step adds one more hurdle for a potential customer to overcome when purchasing our software.
So in this article I attempt to demystify .NET, encourage you to download the latest version of the .NET Framework so you can run the latest and greatest .NET software, and help convince Microsoft that it needs to ensure every PC user has the newest .NET.
What is Microsoft .NET?
Microsoft .NET is simply something you need on your Windows PC to run our software.
OK, really, what is .NET?
Microsoft .NET (pronounced “dot net”) is a software component that runs on the Windows operating system. .NET provides tools and libraries that enable developers to create Windows software much faster and easier. .NET benefits end-users by providing applications of higher capability, quality and security. The .NET Framework must be installed on a user’s PC to run .NET applications.
This is how Microsoft describes it: “.NET is the Microsoft Web services strategy to connect information, people, systems, and devices through software. Integrated across the Microsoft platform, .NET technology provides the ability to quickly build, deploy, manage, and use connected, security-enhanced solutions with Web services. .NET-connected solutions enable businesses to integrate their systems more rapidly and in a more agile manner and help them realize the promise of information anytime, anywhere, on any device.” See Microsoft for more information.
What is the .NET architecture?
Microsoft .NET consists of four major components:
* Common Language Specification (CLS) – blue in the diagram below
* Framework Class Library (FCL) – red
* Common Language Runtime (CLR) – green
* .NET Tools – yellow
.NET Architecture
At the base of the diagram in gray is the operating system, which technically can be any platform but typically is Microsoft Windows 2000 or greater, accessed through the Win32 API (Application Programming Interface).
Common Language Specification (CLS)
The CLS is a common platform that integrates code and components from multiple .NET programming languages. In other words, a .NET application can be written in multiple programming languages with no extra work by the developer (though converting code between languages can be tricky).
.NET includes new object-oriented programming languages such as C#, Visual Basic .NET, J# (a Java clone) and Managed C++. These languages, plus other experimental languages like F#, all compile to the Common Language Specification and can work together in the same application.
Framework Class Library (FCL)
The FCL is a collection of over 7000 classes and data types that enable .NET applications to read and write files, access databases, process XML, display a graphical user interface, draw graphics, use Web services, etc. The FCL wraps much of the massive, complex Win32 API into more simple .NET objects that can be used by C# and other .NET programming languages.
Common Language Runtime (CLR)
The CLR is the execution engine for .NET applications and serves as the interface between .NET applications and the operating system. The CLR provides many services such as:
* Loads and executes code
* Converts intermediate language to native machine code
* Separates processes and memory
* Manages memory and objects
* Enforces code and access security
* Handles exceptions
* Interfaces between managed code, COM objects, and DLLs
* Provides type-checking
* Provides code meta data (Reflection)
* Provides profiling, debugging, etc.
.NET Tools
Visual Studio .NET is Microsoft’s flagship tool for developing Windows software. Visual Studio provides an integrated development environment (IDE) for developers to create standalone Windows applications, interactive Web sites, Web applications, and Web services running on any platform that supports .NET.
In addition, there are many .NET Framework tools designed to help developers create, configure, deploy, manage and secure .NET applications and components.
What is the history of .NET?
.NET started as a classic Microsoft FUD operation. In the late 1990s, Microsoft had just successfully fought off a frontal assault on its market dominance by killing the Netscape Web browser with its free Internet Explorer. But Microsoft was facing a host of new challenges, including serious problems with COM, C++, DLL hell, the Web as a platform, security, and strong competition from Java, which was emerging as the go-to language for Web development.
Microsoft started building .NET in the late 90s under the name “Next Generation Windows Services” (NGWS). Bill Gates described .NET as Microsoft’s answer to the “Phase 3 Internet environment, where the Internet becomes a platform in its own right, much like the PC has traditionally been… Instead of a world where Internet users are limited to reading information, largely one screen at a time, the Phase 3 Internet will unite multiple Web sites running on any device, and allow users to read, write and annotate them via speech, handwriting recognition and the like,” Gates said. We are certainly approaching that vision.
Microsoft announced .NET to the world in June 2000 and released version 1.0 of the .NET framework in January 2002. Microsoft also labeled everything .NET including briefly Office to demonstrate its commitment and dominance on this new thing called the Web. But out of that grand FUD campaign emerged the very capable and useful .NET development environment and framework for both the Web and Windows desktop.
What are the benefits of .NET?
.NET provides the best platform available today for delivering Windows software. .NET helps make software better, faster, cheaper, and more secure. .NET is not the only solution for developing Web software—Java on Linux is a serious alternative. But on the Windows desktop, .NET rules.
For developers, .NET provides an integrated set of tools for building Web software and services and Windows desktop applications. .NET supports multiple programming languages and Service Oriented Architectures (SOA).
For companies, .NET provides a stable, scalable and secure environment for software development. .NET can lower costs by speeding development and connecting systems, increase sales by giving employees access to the tools and information they need, and connect your business to customers, suppliers and partners.
For end-users, .NET results in software that’s more reliable and secure and works on multiple devices including laptops, Smartphones and Pocket PCs.
Why are you (this blog author) developing in .NET?
The Mini-Tools developers were impressed with the Microsoft .NET technology and development platform and felt it provided the best environment with which to build and deliver innovative desktop and Web software for Windows. All of our software is written in C# for .NET on Windows.
Why should I install .NET on my computer?
Because many new software applications require .NET. Having the latest version already installed on your computer enables you run new .NET applications immediately as they become available.
Which versions of .NET are available?
The newest version available today is NET v3.0, but most PC users have v2.0 installed.
Although .NET v3.0 is now available, Windows Update is not automatically installing it, hence few people have it. People who purchase new PCs with Windows Vista pre-installed will receive the latest .NET v3.0 but there may be some versioning issues. Microsoft released a beta version of .NET v3.5 in April 2007.
Following are the production versions of .NET:
Version Name-- Version Number-- Release Date
1.0-- 1.0.3705.0-- 2002-01-05
1.0 SP1 -- 1.0.3705.209-- 2002-03-19
1.0 SP2-- 1.0.3705.288 -- 2002-08-07
1.0 SP3 -- 1.0.3705.6018 -- 2004-08-31
1.1 -- 1.1.4322.573-- 2003-04-01
1.1 SP1 -- 1.1.4322.2032-- 2004-08-30
2.0-- 2.0.50727.42-- 2005-11-07
3.0-- 3.0.4506.30-- 2006-11-06
How do I know if I already have .NET?
We have queried your Web browser, and it tells us that you have the following .NET versions installed on your PC (note this only works for Internet Explorer):
Another way to check if you have .NET:
1. Click Start on your Windows desktop.
2. Select Control Panel.
3. Double-click Add or Remove Programs.
4. When the Add/Remove window appears, scroll through the list of applications and try to find Microsoft .NET Framework. There you will see which versions of .NET are installed on your PC.
Where can I get .NET?
Microsoft .NET is available as a FREE download from Microsoft.
Why is .NET separate from the Windows operating system?
Another way to ask this question is, "Why doesn't Microsoft ensure every Windows PC has the latest version of .NET installed?" Since .NET is so important to Windows, and Microsoft delivers both .NET and Windows, why doesn't Microsoft simply make .NET part of Windows?
Just my theory, but it probably stems from the Sun vs. Microsoft bad blood over Java. Sun and Microsoft got into a legal spat, Microsoft stopped shipping Java with Windows, and so now Java is a separate download for Windows users. As a result, perhaps Microsoft is wary of appearing monopolistic, hence they maintain the .NET Framework as a separate download too.
Why is this a problem? Because it is a large file that must be downloaded and installed separately, naturally many people view .NET with suspicion or at least hesitation. And this provides an inconvenience and yet another barrier for a potential customer purchasing our .NET software. So here's my plea.
Comparison of C Sharp and Java
Standardization
The two platforms, their programming libraries, their binary formats, and their runtime environments have largely been governed by very different means.
The .NET platform as a whole has not been standardized. International standards organizations Ecma International and ISO/IEC define the standard for the .NET executable environment (known as the Common Language Infrastructure, or CLI), and .NET executable format (known as Common Intermediate Language, or CIL), but excluding most of the foundation classes (the Base Class Library, or BCL). This formal committee-based standardization process is in keeping with the way very popular languages like COBOL, Fortran and C have been standardized in the past. The standards do not include many new libraries that Microsoft has implemented on top of the standard framework, such as those for accessing databases, or building GUI and Web applications, such as Windows Forms, ASP.NET and ADO.NET.
To date, no part of Java has been standardized by Ecma International, ISO/IEC, ANSI, or any other third-party standards organization. While Sun Microsystems has unlimited and exclusive legal rights to modify and license its Java trademarks, Sun voluntarily participates in a process called the Java Community Process (JCP) that allows interested parties to propose changes to any of Sun's Java technologies (from language and tools to API) via forums, consultation exercises and expert groups. The JCP requires a membership fee for commercial contributors, while non-commercial contributors and individuals can join for free.
Within the rules of the JCP anyone can bring forward a proposal for a new Platform Edition Specifications or suggest changes to the Java language. All proposals are reviewed and voted on by interested JCP members at various stages throughout their lifecycle, however when it comes to including changes into the standard reference implementations (Java SE, Java EE and Java ME) modifications may be subject to rejection by Sun, who retain ultimate power of veto.
Java standards are maintained by a suite of test applications which examine every aspect of a given Java implementation against a rigorous specification. Only if an implementation passes the tens of thousands of individual tests can it use the trademarked name "Java", and associated logos and brands.
License
Java
The primary implementation of the Java platform is available as an Open Source implementation called OpenJDK.
While "Java" is an Oracle trademark, and only Sun can license the name "Java", numerous free software projects exist that are compatible with Sun Java. Most notably, GNU Classpath and GCJ provide a free software class library and a compiler that are partially compatible with the current version of Sun Java.[1] Sun announced on November 13, 2006 that all Java source code, excluding closed-source code for which they do not retain rights, will be released under a modified version of the GPL,[2] and released two fundamental parts of the JRE and JDK: HotSpot and the javac compiler under the GPL.[3][4]
Following their promise, Sun released the complete source code of the Class library under GPL on May 8, 2007, except some limited parts that were licensed by Sun from 3rd parties who did not want their code to be released under an open-source license[5] (see also Free Java implementations). Sun's goal is to replace the parts that remain closed with alternative implementations and make the class library completely open.
In June 2008, Red Hat announced[6] that the IcedTea project has passed the rigorous Java TCK, indicating a fully functional open-source implementation of the Java platform.
.NET
Microsoft's .NET CLI executable environment, and some of the corresponding class library, have been standardized and can be freely implemented without a license. A few standards-compliant free software environments have been implemented, such as the Mono Project and DotGNU. The Mono Project has also implemented many of Microsoft's non-standard libraries by examining Microsoft materials, similar to GNU Classpath and Java.
Microsoft is currently distributing a shared source version of its .NET runtime environment for academic use, however it is only supported on Windows 7 and has not been updated after .NET 4.0.[7]
The Mono project aims to avoid infringing on any patents or copyrights, and to the extent that they are successful, the project can be safely distributed and used under the GPL. On November 2, 2006, Microsoft and Novell announced a joint agreement whereby Microsoft promised not to sue Novell or its customers for patent infringement.[8] According to a statement on the blog of Mono project leader Miguel de Icaza, this agreement only extends to Mono for Novell developers and users.[9] Because of the possible threat of Microsoft patents, the FSF recommends that people avoid creating software that depends on Mono or C#.[10][11]
The Microsoft/Novell agreement was criticized by some in the open source community because it violates the principles of giving equal rights to all users of a particular program (see Agreement with Microsoft and Mono and Microsoft's patents).
Unbalanced scales.svg
The neutrality of this section is disputed. Please see the discussion on the talk page. Please do not remove this message until the dispute is resolved. (February 2011)
In response to the Microsoft/Novell agreement the Free Software Foundation revised its GNU General Public License to close the loophole used by Microsoft and Novell to bypass the GPL's very restrictive provisions on patent deals.[12] The FSF also stated that by selling coupons for Novell's Linux software, the mechanism by which Microsoft circumvented the GNU license, it considers Microsoft to be a Linux vendor, and thereby subject to the full terms and conditions laid out in the GPL.[12]
Community
Oracle retains exclusive and unlimited legal rights to its Java intellectual properties, and the Java community is subject to those rights.
While Microsoft has developed C# and .NET without a formal community contribution system, the language and some parts of the executable format and runtime have been standardized and freely distributed through Ecma and ISO in an open and vendor-neutral process, rather than a process that retains veto and copy rights for Microsoft. However, the standards do not include many new libraries that Microsoft has implemented on top of the standard framework (see Standardization). Numerous C# and CLI community software projects, help and documentation sites, and discussion forums are under active development and maintenance.
Microsoft is distributing a shared source release (version 1.0) of the .NET virtual machine that can be compiled and used on Windows, FreeBSD, Mac OS X, and other platforms.[13] An updated version (2.0) is currently available, but the only officially supported platform is Windows.[14] A community port to Linux of the 1.0 shared source .NET virtual machine is also available.[15] In March 2003, O'Reilly Media published a book about Microsoft's shared source .NET runtime.[16]
Traditional computer applications
Desktop applications
Although Java's AWT (Abstract Windowing Toolkit) and Swing libraries are not shy of features, Java has struggled to establish a foothold in the desktop market. Sun Microsystems has also been slow, in the eyes of some,[citation needed] to promote Java to developers and end users alike in a way which makes it an appealing choice for desktop software. Even technologies such as Java Web Start, which have few parallels within rival languages and platforms, have barely been promoted.[citation needed]
The release of Java version 6.0 on December 11, 2006, saw a renewed focus on the desktop market with an extensive set of new tools for closer integration with the desktop. At the 2007 JavaOne conference Sun made further desktop related announcements, including a new language aimed at taking on Adobe Flash (JavaFX), a new lightweight way of downloading the JRE which sees the initial footprint reduced to under 2Mb, and a renewed focus on multimedia libraries.
An alternative to AWT and Swing is the Standard Widget Toolkit (SWT), which was originally developed by IBM and now maintained by the Eclipse Foundation. It attempts to achieve improved performance and visualization of Java desktop applications by relying on underlying native libraries where possible.
On Windows, Microsoft's .NET is popular desktop development providing both Windows Forms (a lightweight wrapper around the Win32 API), Windows Presentation Foundation, and Silverlight. With the integration of .NET into the Windows platform, .NET apps are first class citizens in the Windows environment with tighter OS integration and native look and feel compared to Java's Swing.
Outside of Windows, Silverlight is portable to the Mac OSX desktop. Mono is also becoming more common in open source and free software systems due to its inclusion[17] on many Linux desktop environments.
Server applications
This is probably the arena in which the two platforms are closest to being considered rivals. Java, through its Java EE (a.k.a. Java Platform Enterprise Edition) platform, and .NET through ASP.NET, compete to create web-based dynamic content and applications.
Both platforms are well used and supported in this market, with a bevy of tools and supporting products available for Java EE and .NET. High-end, large-scale, heavy duty solutions tend to opt for Java EE due to higher stability, scalability, and greater availability of senior developers. For example, for Java: Oracle included direct support for Java into its database, while Google has used Java to power tools like Gmail.[18]
Some of Sun's current Java-related license agreements for Java EE define aspects of the Java platform as a trade secret,[19] and prohibit the end user from contributing to a third-party Java environment. Specifically, at least one current license for a Sun Java EE development package contains the following terms: "You may make a single archival copy of Software, but otherwise may not copy, modify, or distribute Software." — "Unless enforcement is prohibited by applicable law, you may not decompile, or reverse engineer Software." — "You may not publish or provide the results of any benchmark or comparison tests run on Software to any third party without the prior written consent of Sun." — "Software is confidential and copyrighted."[19] However, while Sun's software is subject to the above license terms, Sun's Java EE API reference has been implemented under an open source license by the JBoss and JOnAS projects.
Microsoft's implementation of ASP.NET is not part of the standardized CLI, and while Microsoft's runtime environment and development tools are not subject to comparable secrecy agreements to Java EE, the official Microsoft tools are not open source or free software, and require Windows servers. However, a cross-platform free software ASP.NET 2.0 implementation is part of the Mono project (minus webparts and Web Services Enhancements).[20]
Embedded applications
Mobile applications
Google's popular Android platform for mobile application is based on Java. Google have created their own customised VM called Dalvik to optimise the execution of Java code for mobile devices.
Oracle provides Java ME; a reference implementation for mobile OEM venders. Java ME is made up of various profiles that are subsets of the Java desktop environment with additional libraries targeted at mobile and set top box development. Java ME has a very large base within the mobile phone and PDA markets, with only the cheapest devices now devoid of a KVM (a cut down Java Virtual Machine for use on devices with limited processing power). Java software, including many games, is commonplace.
While many feature phones include a JVM, they are not always heavily used by users (particularly in North America)[citation needed]. Initially Java applications on most phones typically consisted of menuing systems, small games, or systems to download ringtones etc. However, more powerful phones are increasingly being sold with simple applications pre-loaded, such as translation dictionaries, world clock displays (darkness/light, timezones, etc.) and calculators. Some of these are written in Java, although how often phone owners actually use them is probably unknown.
Microsoft currently ships the .NET Compact Framework which runs on Windows CE and mobile devices, set-top boxes, and PDAs as well as the Xbox 360. Microsoft also provides the .NET Micro Framework for embedded developers with limited resources. Alternatively, Novell licenses embeddable versions of Mono to 3rd parties to use in their devices and commercially distributes the MonoTouch and MonoDroid framework for iPhone and Android development respectively.
Home entertainment technologies
Java has found a market in digital television, where it can be used to provide software which sits alongside programming, or extends the capabilities of a given Set Top Box. TiVo, for example, has a facility called "Home Media Engine", which allows JavaTV software to be transmitted to an appropriate TiVo device to complement programming or provide extra functionality (for example, personalized stock tickers on a business news program.)
A variant of Java has been accepted as the official software tool for use on the next generation optical disc technology Blu-ray, via the BD-J interactive platform. This will mean that interactive content, such as menus, games, downloadables, etc. on all Blu-ray optical discs will be created under a variant of the Java platform.
Rather than using Java, HD DVD (the defunct high definition successor to DVD) used a technology jointly developed by Microsoft and Disney called HDi that was based on XML, CSS, JavaScript, and other technologies that are comparable to those used by standard web browsers.
The BD-J platform API is more extensive than its iHD rival, with an alleged 8,000 methods and interfaces, as opposed to iHD's 400.[21] And while Microsoft is pushing iHD's XML presentation layer by including it with Windows Vista, iHD is still a newcomer in a market sector where Java technologies are already commonplace.[22]
However, the fact that the HD DVD format has been abandoned in favor of Blu-ray means that HDi is no longer supported on any Optical disc format, making the BD-J format a clear winner.[23]
Runtime inclusion in operating systems
.NET/Mono
On Windows, Microsoft is promoting .NET as its flagship development platform,[24] by including the .NET runtime in Windows XP Service Pack 2 and 3, Windows Server 2003, Windows Vista, Windows Server 2008 and Windows 7. Microsoft also distributes the Visual Studio Express development environment at no cost.[25]
.NET Framework 3.5 runtime is not pre-installed on versions of Windows prior to Vista SP1, and must be downloaded by the user, which has been criticized because of its large size (65 MB download for .NET 3.5).[26][27]
While neither .NET nor Mono are installed with Mac OS X out-of-the-box, the Mono project can be downloaded and installed separately, for free, for any Mac user who wants to build and/or run C# and .NET software. As of 13 May 2008, Mono's System.Windows.Forms 2.0 is API complete (contains 100% of classes, methods etc. in Microsoft's System.Windows.Forms 2.0); also System.Windows.Forms 2.0 works natively on Mac OS X.
C# and the CLI are included and used in a number of Linux and BSD based operating systems by way of including the free software Mono Project.[28][29][30]
As a result of inclusion of .NET or Mono runtimes in the distributions of Windows and Linux, non-GUI applications that utilize the programming interfaces that are common to both .NET and Mono can be developed in C# or any other .NET language and then deployed across many operating systems and processor architectures using a runtime environment that is available as a part of the operating system's installation.[31][32][33] Both Microsoft .NET and the Mono project have complete support for the Ecma- and ISO-standardized C# language and .NET runtime, and many of Microsoft's non-standardized .NET programming interfaces have been implemented or are under development in Mono,[34] but each environment includes many components that have not been implemented in the other.
Java
Starting with XP SP1a, Windows does not ship with a Java runtime environment. However according to a September 2003 press release some OEMs agreed to pre-install the JRE on their desktop and laptop models. Mentioned were Acer, Dell, Gateway, Hewlett-Packard, and Toshiba.[35] These companies combined make up a simple majority of consumer PC's sold in the United States of America.[36]
Java comes pre-installed on all new Apple computers since Mac OS X 10.0. Because Apple maintains the Java runtime for Mac OS X, updates are usually one or two versions behind the versions available from Sun for the other operating systems, and versions of Java are usually tied to the specific operating system version, so newer Java versions are usually unavailable for older versions of OS X.
Java comes pre-installed with many commercial Unix flavors, including those from Sun, IBM and Hewlett Packard. As of June 2009, the Fedora 9,[37] Ubuntu 8.04,[38] Debian,[39] Slackware extra,[40] Mandriva[41] and OpenSUSE[42] distributions are available with OpenJDK, based completely on free and open source code.[43] Since June 2008, OpenJDK passed all of the compatibility tests in the Java SE 6 JCK and can claim to be a fully compatible Java 6 implementation.[44][45] OpenJDK can run complex applications such as Netbeans, Eclipse, GlassFish, or JBoss.
The Operating System Distributor License for Java (DLJ)[46] is a Sun initiative to ease distribution issues with operating systems based on OpenSolaris or Linux.
If Java is not installed on a computer by default, it may be downloaded by the user as a web plugin. The web plugin process has been criticized because of the size of the Java plugin. Unlike other plugins the Java download is a full runtime environment, capable of running not just applets, but full applications and dynamic WebStart apps. Because of this the perceived download footprint is larger than some web plugins. However, compared to Java, other popular browser plugins have larger sizes: Java 6 JRE is 13 MB, but Acrobat Reader is 33 MB, QuickTime 19 MB, Windows Media Player 25 MB, the .NET Framework 3.0 runtime is 54 MB, and the .NET Framework 3.5 runtime is 197 MB (it's a united package for x86, x64 and IA-64, each part has approximately 60 MB).
At the JavaOne event in May 2007 Sun announced that the deployment issues with Java would be solved in two major updates during the lifespan of Java 6 (the changes will not be held over to Java 7.) These include:
* the introduction of a new consumer JRE edition, with an initial 2Mb footprint and the ability to download the remaining 9Mb in sections using an on-demand methodology.
* the development of drop-in cross platform JavaScript code, which can be used from a web page to install the necessary JRE for a given applet or Rich Internet Application to run, if necessary.
* an improvement in support for automatically downloading updates to the JRE.
* support for pre-loading of the JRE, so applets and applications written in Java start up almost instantaneously.
Subscribe to:
Posts (Atom)