To close this chapter, allow me to briefly comment on the platform-independent nature of the .NET platform. To the surprise of most developers, .NET assemblies can be developed and executed on non-Microsoft operating systems (Mac OS X, numerous Linux distributions, and Solaris, to name a few). To understand how this is possible, you need to come to terms with yet another abbreviation in the .NET universe: CLI (Common Language Infrastructure).
When Microsoft released the .NET platform, it also crafted a set of formal documents that described the syntax and semantics of the C# and CIL languages, the .NET assembly format, core .NET namespaces, and the mechanics of a hypothetical .NET runtime engine (known as the Virtual Execution System, or VES). Better yet, these documents have been submitted to ECMA International as official international standards (http://www.ecma-international.org). The specifications of interest are
• ECMA-334: The C# Language Specification
• ECMA-335: The Common Language Infrastructure (CLI)
Note Microsoft has not defined a formal specification regarding the Visual Basic 2008 programming language. The good news, however, is that the major open source .NET distributions ship with a compatible BASIC compiler.
The importance of these documents becomes clear when you understand that they enable third parties to build distributions of the .NET platform for any number of operating systems and/or processors. ECMA-335 is perhaps the more "meaty" of the two specifications, so much so that is has been broken into six partitions, as shown in Table 1-3.
Table 1-3. Partitions of the CLI
Partitions of ECMA-335
Meaning in Life
Partition I: Concepts and Architecture
Partition II: Definitions and Semantics Partition III: Instruction Set Partition IV: Profiles and Libraries
Describes the overall architecture of the CLI, including the rules of the CTS and CLS, and the mechanics of the .NET runtime engine
Describes the details of .NET metadata
Describes the syntax and semantics of CIL code
Gives a high-level overview of the minimal and complete class libraries that must be supported by a .NET distribution
32 CHAPTER 1 ■ THE PHILOSOPHY OF .NET Table 1-3. Continued
Partitions of ECMA-335 Meaning in Life
Partition V: Debug Exchange Format Defines details of .NET debugging symbols
Partition VI: Annexes Provides a collection of "odds and ends" details such as class library design guidelines and the implementation details of a CIL compiler
Be aware that Partition IV (Profiles and Libraries) defines only a minimal set of namespaces that represent the core services expected by a CLI distribution (collections, console I/O, file I/O, threading, reflection, network access, core security needs, XML manipulation, and so forth). The CLI does not define namespaces that facilitate web development (ASP.NET), database access (ADO.NET), or desktop GUI application development (via Windows Forms or Windows Presentation Foundation).
The good news, however, is that the mainstream .NET distributions extend the CLI libraries with Microsoft-compatible equivalents of ASP.NET, ADO.NET, and Windows Forms (among other APIs) in order to provide full-featured, production-level development platforms. To date, there are two major implementations of the CLI (beyond Microsoft's Windows-specific offering). Although this text focuses on the creation of .NET applications using Microsoft's .NET distribution, Table 1-4 provides information regarding the Mono and Portable.NET projects.
Table 1-4. Open Source .NET Distributions Distribution Meaning in Life
http://www.mono-project.com The Mono project is an open source distribution of the CLI that targets various Linux distributions (e.g., SuSE, Fedora, and so on) as well as Windows and Mac OS X.
http://www.dotgnu.org Portable.NET is another open source distribution of the CLI
that runs on numerous operating systems. Portable.NET aims to target as many operating systems as possible (Win32, AIX, BeOS, Mac OS X, Solaris, all major Linux distributions, and so on).
Both Mono and Portable.NET provide an ECMA-compliant C# compiler, .NET runtime engine, code samples, and documentation, as well as numerous development tools that are functionally equivalent to the tools that ship with Microsoft's .NET Framework 3.5 SDK. Furthermore, Mono and Portable.NET collectively ship with a Visual Basic, Java, and C compiler.
Note If you wish to learn more about Mono or Portable.NET, check out Cross-Platform .NETDevelopment: Using Mono, Portable.NET, and Microsoft .NETby M. J. Easton and Jason King (Apress, 2004).
Was this article helpful?