ImplementationsThe quick overview of the CLI and C# standards lays the foundation for exploring the various implementations of the standards. These are the well-known implementations. Who knows how many other implementations are out there that have not been announced or, like Palm 6, that have just been announced? Microsoft's .NET CLRThe most widely used and generally available implementation is of course Microsoft's. It only makes sense that the creators of the standard have the first implementation. Figure 2-3 shows Microsoft's CLR.As you can see, Microsoft has added a whole slew of stuff to the CLI standard. Also in addition to the C# language, Microsoft provides Visual Basic.NET, C++.NET, Jscript.NET, and J#. .NET works on versions of Windows from Windows 98 to the latest Windows 2003 and beyond the next version of Windows, codenamed Longhorn, will have new APIs available only to Managed code! Although a rather large distribution, .NET hasChapter 3, and Part II of this book, you can create a full-featured and well-integrated product that targets the Windows platform, all without paying a single dime. Compact FrameworkNot long after the .NET framework was released, Microsoft started beta testing the Compact Framework (CF) (see Figure 2-4 on p. 30). About a year after .NET's release, the Compact Framework was released. This framework is an implementation of the CLI target for Windows CE devices. Though only a subset of the CLI standard was implemented, the Compact Framework make mobile device programming easier than ever. The same programming model is available across devices, and both C# and VB.NET are available. However, each target device with different processors must be compiled for that target. Visual Studio.NET makes this programming much simpler via device emulators and integrated debugging on the devices through ActiveSync. Probably the nicest feature is the ability to consume Web services on a PDA; now that has potential! I also like the integration with SQL Server CE. However, you will notice that the CF has minimal XML support and is missing Remoting, Printing, and many other features available under the .NET CLR. Figure 2-4. Microsoft's Compact Framework.[View full size image] ![]() SSCLI/RotorMicrosoft teamed with Corel to create the Shared Source CLI (SSCLI), also know by its code name Rotor (see Figure 2-5). The SSCLI sticks pretty closely to the standards (except for the Jscript implementation) and is intended for academic and instructional study of how to implement a platform-independent CLI. Although useful for study, Rotor's Garbage Collection is not quite up to commercial quality. At the time of this writing, Rotor can run on FreeBSD, Windows, and OS X. For a great book on the specifics of the SSCLI, see David Stutz, Ted Neward & Geoff Schilling. Shared Source CLI Essentials , O'Reilly, 2002 Figure 2-5. Microsoft's Shared Source CLI.[View full size image] ![]()
Portable.NETRhys Weatherley leads the Portable.NET (http://www.southern-storm.com.au/portable_netl) Open Source implementation of the CLI (see Figure 2-6). Under the GNU project and the dotGNU steering committee, Portable.NET seems to be mainly focusing on the standards portion of the CLI similar to the SSCLI, but it is branching out into additional functionality by using TCL/TK for UIs and using some of Mono's implementations. Currently, Portable.NET runs on Linux, Windows, Solaris, and Mac OS X platforms. The Portable.NET> lower-level libraries as well as the runtime and compiler are written in C. The Portable.NET team's approach is a little strange in that they developed an interpreter first. Some implementations do not even have an interpreter, just a JIT compiler. This interesting approach may prove to be a very fast implementation of a JIT compiler. This implementation is definitely the smallest and most portable, seeing that almost every processor and operating system has a C compiler, making it a good candidate for embedding. Portable.NET is under the Gnu GPL Open Source license. (See Table 2.3.) Figure 2-6. DOTGNU's Portable.NET.[View full size image] ![]()
MonoXimian, the creator of many Open Source projects including the popular Evolution email client, created the Mono project under Miguel de Icaza's leadership (see Figure 2-7). Mono's intent is to implement full functionality and keep pace with Microsoft's CLR implementation. So far, Mono is doing a remarkable job; they even have started an Apache (http://www.apache.org) module to support ASP.NET fittingly called mod_mono. The System.* namespaces are coming along, and they are adding additional functionality in the Mono.* namespace. Mono is the only implementation to have both a JIT compiler and an Interpreter, which they call Mint. Mono currently runs on Linux, Windows, and Solaris. Interestingly enough, the JIT engine and much of the low-lever workings are in C. The C# implementation is solid enough to allow the C# compiler to be written in C#. Uniquely, Mono ships a GTK+ binding for C# called Gtk#. How Mono decides to implement System.Windows.Forms is being watched with great anticipation. Mono's Compiler is under the GPL, the runtime is under LGPL, and the libraries use the MIT Open Source licensing. Mono also includes the useful tools described in Table 2.4. Figure 2-7. Mono.[View full size image] ![]()
|