Jump to content

Mono (software)

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Miguel.de.Icaza (talk | contribs) at 00:47, 20 January 2006 (Restored historical information that was on the "history" section, because it is relevant in the "history" section. not sure what the dotgnu developer is trying to prove). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Mono
Developer(s)Novell
Stable release
1.1.13 / January 11, 2006
Repository
Operating systemCross-platform
TypePlatform (computing)
LicenseGPL, LGPL and MIT or proprietary
Websitehttp://www.mono-project.com/

Mono is a project lead by Novell,Inc. (formerly by Ximian) to create an ECMA Standard compliant (Ecma-334 and Ecma-335), .NET compatible set of tools, including among others a C# compiler and a Common Language Runtime. Mono can be run on Linux, FreeBSD, UNIX, Mac OS X, and Windows based computers.

Mono is dual licensed by Novell, similar to other products such as Qt and the Mozilla Application Suite. Mono's C# compiler and tools are released under the GNU General Public License (GPL), the runtime libraries under the GNU Lesser General Public License (LGPL) and the class libraries under the MIT License. These are all open-source licenses and hence Mono is open-source software. If you want to contribute source code to Mono you have to sign a copyright assignment giving Novell the right to relicense the code under other licensing terms, thus preserving Novell's ability under the dual license to commerically license Mono.[1]

Microsoft has a version of .NET available for FreeBSD, Windows and Mac OS X called the Shared source CLI. Microsoft's shared source license is not open-source software and may be insufficient for the needs of the community (it explicitly forbids commercial use). The Mono project has many of the same goals as the Portable.NET project.

The Mono VM contains just-in-time compilation (JIT) engines for a number of processors: x86, SPARC, PowerPC (in 32 bit mode) and x86-64 and SPARC for 64 bit modes. The VM can just-in-time compile or it can pre-compile the code to native code. For other systems not listed, an interpreter is used.

History

Miguel de Icaza became interested in the .NET technology as soon as the .NET documents came out in December 2000. He started to look at the byte code interpreter but got in to trouble when he realized that there were no specification for the metadata. Around January 2001 de Icaza asked for the missing information on the metadata file format in the .NET mailing lists and at the same time started to work on an C# compiler written in C#, as an exercise in C#.

In April 2001 ECMA published the missing file format and at GUADEC (April 6 - April 8 2001), de Icaza demonstrated the features of his compiler (which by then was able to parse itself).

Internally at Ximian there was much discussion about building tools to increase productivity: making it possible to create more applications in less time and therefore reduce time and cost of development. After a feasibility study, which clearly stated that it was possible to build the technology, Ximian finally decided to move staff from other projects and create the Mono team. The Mono team didn't have the manpower to build a full .NET replacement on their own and on July 19 2001 the Mono open source project was announced at the O'Reilly conference.

Almost three years later, on June 30 2004 Mono 1.0 was released.

Framework Architecture

Class Library

The class library provides a comprehensive set of facilities for application development. They are primarily written in C#, but thanks to the Common Language Specification they can be used by any .NET language. The class library is structured into Namespaces, and deployed in shared libraries known as Assemblies. When we speak of the .NET framework, we are primarily referring to this class library.

Namespaces and Assemblies

Namespaces are a mechanism for logically grouping similar classes into a hierarchical structure. This prevents naming conflicts. The structure is implemented using dot-separated words, where the most common top-level namespace is System, such as System.IO and System.NET (a complete list can be found in Mono Documentation). There are other top-level namespaces as well, such as Accessibility and Windows are examples. New namespaces can also be created prefixed with the organization.

Assemblies are the physical packaging of the class libraries. These are .dll files, just as (but not to be confused with) Win32 shared libraries. Examples of assemblies are mscorlib.dll, System.dll, System.Data.dll and Accessibility.dll. Namespaces are often distributed among several assemblies and one assembly can be composed of several files.

Common Language Infrastructure and Common Language Specification

The Common Language Infrastructure (CLI), or more commonly known as the Common Language Runtime, is implemented by the Mono executable. The runtime is used to execute compiled .NET applications. The common language infrastructure is defined by the ECMA standard ECMA-335. To run an application, you must invoke the runtime with the relevant parameters.

The Common Language Specification (CLS) is specified in chapter 6 of ECMA-335 and defines the interface to the CLI, such as conventions like the underlying types for Enum. The Mono compiler generates an image that conforms to the CLS. This is the Common Intermediate Language. The Mono runtime takes this image and runs it. The ECMA standard formally defines a library that conforms to the CLS as a framework.

Managed and Unmanaged Code

Within a native .NET/Mono application, all code is managed; that is, it is governed by the CLI's style of memory management and thread safety. .NET/Mono applications can use legacy code, which is referred to as unmanaged, by using the System.InterOpServices libraries to create C# bindings. Many libraries which ship with Mono use this feature of the CLI, such as Gtk#.

There exist lots of projects related to Mono that extend Mono and allows developers to use Mono in their development enviroment. These projects include:

  • Cocoa#, wrappers around the native Mac OS X toolkit (Cocoa).
  • Gecko#, bindings for embedding the layout engine used in Mozilla (Gecko).
  • Gtk#, C# wrappers around the underlying GTK+ libraries, written in C.
  • Tao, a collection of graphics and gaming bindings

Mono and Microsoft's patents

A lot of discussion has taken place about whether Microsoft could destroy the Mono project with patents. The problematic parts are not the core technologies submitted to the ECMA or the Unix/Gnome-specific parts. The problematic parts are technologies developed by Microsoft on top of the .NET Framework, such as ASP.NET, ADO.NET and Windows Forms. These technologies are today not fully implemented in Mono and not required for developing Mono-applications, but required for compability with the Windows platform. The Mono team aims to cover these technologies and have a three-step strategy to deal with them:

  1. Implement it by using another implementation technique and hence work around the patent.
  2. Remove the patent covered code
  3. Find prior art and make the patent invalid.

Of course, the first option is not always available. Some problems, such as those related to interoperability and communication, may only have a single solution. For this same reason, although the second option is always available, it may result in the development of a product which will not be useable as a .NET replacement. The third option is expensive, may not be possible, and involves a degree of luck (as in all patent interpretation suits).

Software developed with Mono

File:F-Spot screenshot.png
F-Spot photo management program
Muine music player

The following are programs that use the Mono API and C#.

See also

Notes

  1. ^ For more information about the licensing, see Mono FAQ: Licensing

References

  • This article incorporates text from Mono's homepage, which is in the GNU Free Documentation License.
  • Miguel de Icaza (December 6). "[Mono-list] Mono early history." (mailing list). {{cite web}}: Check date values in: |date= and |year= / |date= mismatch (help); Unknown parameter |publishyear= ignored (help)
  • Eugenia Loli-Queru (December 6). "Mono Applications? Aplenty!". OSNews. {{cite web}}: Check date values in: |date= and |year= / |date= mismatch (help); Unknown parameter |publishyear= ignored (help)

International