Misplaced Pages

Standard Libraries (CLI)

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.

The Common Language Infrastructure ( CLI ) is an open specification and technical standard originally developed by Microsoft and standardized by ISO / IEC ( ISO/IEC 23271 ) and Ecma International ( ECMA 335 ) that describes executable code and a runtime environment that allows multiple high-level languages to be used on different computer platforms without being rewritten for specific architectures. This implies it is platform agnostic. The .NET Framework , .NET and Mono are implementations of the CLI. The metadata format is also used to specify the API definitions exposed by the Windows Runtime .

#635364

45-528: The Standard Libraries are a set of libraries included in the Common Language Infrastructure (CLI) in order to encapsulate many common functions, such as file reading and writing, XML document manipulation, exception handling , application globalization , network communication, threading , and reflection , which makes the programmer's job easier. It is much larger in scope than standard libraries for most other languages, including C++ , and

90-533: A compiler to target the CLI and the facilities needed to dynamically load types from a stream in a specified file format. It defines types in the following namespaces: The Network Library provides simple networking services including direct access to network ports as well as HTTP support. It defines types in the following namespaces: The Reflection Library provides the ability to examine the structure of types, create instances of types and invoke methods on types, all based on

135-502: A description of the type. It defines types in the following namespaces: The XML Library provides a simple "pull-style" parser for XML. It is designed for resource-constrained devices, yet provides a simple user model. It defines types in the following namespace. The Extended Array Library provides support for non-vector arrays. That is, arrays that have more than one dimension or arrays that have non-zero lower bounds. The Extended Array Library doesn't add any extra types, but it does extend

180-468: A full product, they launched the Mono open-source project, on July 19, 2001, at the O'Reilly conference. After three years of development, Mono 1.0 was released on June 30, 2004. Mono evolved from its initial focus of a developer platform for Linux desktop applications to supporting a wide range of architectures and operating systems - including embedded systems. Novell acquired Ximian in 2003. After Novell

225-434: A handful of objects are long-term objects that live for the entire life of the application. To improve performance this collector assigns memory pools to each thread to let threads allocate new memory blocks without having to coordinate with other threads. Migration of objects from the nursery to the old generation is done by copying the data from the nursery to the old generation pool and updating any live pointers that point to

270-473: A namespace by placing elements inside a namespace block. Assemblies are the physical packaging of the class libraries. These are .dll files, just like (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. The Common Language Infrastructure (CLI) as implemented by

315-472: A number of processors: ARM , MIPS (in 32-bit mode only), SPARC , PowerPC , z/Architecture , IA-32 , x86-64 and IA-64 for 64-bit modes. The code generator is exposed in three modes: Starting with Mono 2.6, it is possible to configure Mono to use the LLVM as the code generation engine instead of Mono's own code generation engine. This is useful for high performance computing loads and other situations where

360-426: A pathway for porting Windows .NET applications to Linux . This group of components include ADO.NET , ASP.NET , and Windows Forms , among others. As these components are not covered by Ecma standards, some of them remain subject to patent fears and concerns . The major components of Mono include: The Mono runtime contains a code execution engine that translates ECMA CIL byte codes into native code and supports

405-427: A standards compliant, free and open-source CLI virtual machine . Microsoft issued a statement that covers both standards under their Community Promise license . The Mono/Linux/GNOME development stack provide tools for application development while using the existing GNOME and free and open-source libraries. These include: Gtk# for graphical user interface (GUI) development, Mozilla libraries for working with

450-612: A version of .NET 2.0 now available only for Windows XP , called the Shared Source CLI (Rotor) . Microsoft's shared source license may be insufficient for the needs of the community (it explicitly forbids commercial use). Free Software Foundation 's decommissioned Portable.NET project. MonoDevelop is a free integrated development environment primarily designed for C# and other .NET languages such as Nemerle , Boo , and Java (via IKVM.NET ), although it also supports languages such as C , C++ , Python , and Vala . MonoDevelop

495-653: Is a default configuration option. Previous versions required a special LLVM fork, but now mono can fall back to its own code generator when it encounters something not handled by LLVM. As of Mono 2.8, the Mono runtime ships with two garbage collectors : a generational collector and the Boehm–Demers–Weiser Conservative Garbage Collector . The Boehm garbage collector could exhibit memory leaks on certain classes of applications, making it unsuitable for some long-running server applications. Mono switched to Simple Generational GC (SGen-GC) as

SECTION 10

#1732859411636

540-477: Is a library that allows developers to create C# and .NET based applications that run on the iPhone, iPod and iPad devices. It is based on the Mono framework and developed in conjunction with Novell. Unlike Mono applications, Xamarin.iOS "Apps" are compiled down to machine code targeted specifically at the Apple iPhone and iPad . This is necessary because the iOS kernel prevents just-in-time compilers from executing on

585-440: Is a proprietary implementation of Mono for Android -based smart-phones. It was first released on April 6, 2011. Mono for Android was developed to allow developers to more easily write cross-platform applications that will run on all mobile platforms. In an interview with H-Online, Miguel de Icaza stated, "Our vision is to allow developers to reuse their engine and business logic code across all mobile platforms and swapping out

630-516: Is common for RAND licensing to require some royalty payment, which could be a cause for concern with Mono . As of January 2013 , neither Microsoft nor its partners have identified any patents essential to CLI implementations subject to RAND terms. As of July 2009 , Microsoft added C# and CLI to the list of specifications that the Microsoft Community Promise applies to, so anyone can safely implement specified editions of

675-501: Is comparable in scope and coverage to the standard libraries of Java . The Standard Libraries are the Base Class Library (BCL), Runtime Infrastructure Library (both part of the kernel profile), Network Library, Reflection Library, XML Library (which with the first two listed libraries form the compact profile), Extended Array Library, Parallel Library, Floating Point Library and Vararg Library. The Framework Class Library (FCL)

720-676: Is referred to as unmanaged, by using the System.Runtime.InteropServices libraries to create C# bindings. Many libraries which ship with Mono use this feature of the CLI, such as Gtk# . Mono has innovated in some areas with new extensions to the core C# and CLI specifications: In addition, Mono is available on a variety of operating systems and architectures. Windows 7, Windows 8, Windows 8.1, Windows 10, macOS or Linux Several projects extend Mono and allow developers to use it in their development environment. These projects include: Cross-platform: macOS: Mobile platforms: Windows: Microsoft has

765-537: Is structured into namespaces, and deployed in shared libraries known as assemblies. Speaking of the .NET Framework is primarily referring to this class library. 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. There are other top-level namespaces as well, such as Accessibility and Windows. A user can define

810-770: Is the original implementation of the Standard Libraries as the .NET Framework, which includes it, is the first implementation of the CLI. The main standard libraries are organized into two Standard Profiles, the Kernel Profile, and the Compact Profile. The following standard libraries do not belong to any profile: the Extended Array Library, the Extended Numerics Library, the Parallel Library and

855-535: The Common Language Runtime (CLR) , is implemented by the Mono executable. The runtime compiles and executes .NET applications. The common language infrastructure is defined by the ECMA standard. 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

900-737: The Gecko rendering engine , Unix integration libraries (Mono.Posix), database connectivity libraries, a security stack, and the XML schema language RelaxNG . Gtk# allows Mono applications to integrate into the Gnome desktop as native applications. The database libraries provide connectivity to the object-relational database db4o , Firebird , Microsoft SQL Server (MSSQL), MySQL , Open Database Connectivity (ODBC), Oracle , PostgreSQL , SQLite , and many others. The Mono project tracks developing database components at its website. The Microsoft compatibility stack provides

945-632: The ASP.NET async stack. However, System.Web and WCF are candidates for 'almost immediate' porting from the .NET reference source back to Mono. Some missing parts of the .NET Framework are under development in an experimental Mono subproject called Olive . The Mono project has also created a Visual Basic .NET compiler and a runtime designed for running VB.NET applications. It is currently being developed by Rolf Bjarne Kvinge. An open-source implementation of Microsoft Silverlight , called Moonlight , has been included since Mono 1.9. Moonlight 1.0, which supports

SECTION 20

#1732859411636

990-557: The CLI specification describes the following five aspects: In August 2000, Microsoft , Hewlett-Packard , Intel , and others worked to standardize CLI. By December 2001, it was ratified by the Ecma , with ISO / IEC standardization following in April 2003. Microsoft and its partners hold patents for CLI. Ecma and ISO/IEC require that all patents essential to implementation be made available under " reasonable and non-discriminatory (RAND) terms ." It

1035-568: The Silverlight 1.0 APIs, was released January 20, 2009. Moonlight 2.0 supports Silverlight 2.0 and some features of Silverlight 3.0. A preview release of Moonlight 3.0 was announced in February 2010 and contains updates to Silverlight 3 support. The Moonlight project was abandoned on May 29, 2012. According to Miguel, two factors sealed the fate of the project: Microsoft added "artificial restrictions" that "made it useless for desktop programming", and

1080-535: The Standard for the runtime library for the language C# as well as one of the CLI Standard Libraries. It provides types to represent the built-in data types of the CLI, simple file access, custom attributes, security attributes, string manipulation, formatting, streams, collections, among other things. It defines types in the following namespaces: The Runtime Infrastructure Library provides the services needed by

1125-644: The Vararg Library. The Kernel Profile is a subset of the Compact Profile. The Kernel Profile contains the Base Class Library (BCL) and Runtime Infrastructure Library. The Compact Profile contains those libraries in the Kernel Profile as well as the Network Library, the Reflection Library and the XML Library. The Base Class Library is a simple runtime library for modern programming languages. It serves as

1170-581: The array-handling mechanism. The Extended Numerics Library provides support for floating-point (System.Single, System.Double) and extended-precision (System.Decimal) data types. Like the Base Class Library, this library is directly referenced by the C# standard. The Parallel Library provides easy parallelism for non-expert programmers, so that multithreaded CPUs can be exploited. The Vararg Library provides support for dealing with variable-length argument lists. Common Language Infrastructure Among other things,

1215-524: The data to point to the new location. This can be expensive for large objects, so Mono's SGen uses a separate pool of memory for large objects (Large Object Section) and uses a mark-and-sweep algorithm for those objects. The class library provides a comprehensive set of facilities for application development. They are primarily written in C#, but due to the Common Language Specification they can be used by any .NET language. The class library

1260-413: The default collector in version 3.1.1. The SGen garbage collector has many advantages over a traditional conservative scanner. It uses generational garbage collection where new objects are allocated from a nursery, during the garbage collection cycle, all objects that survived are migrated to an older generation memory pool. The idea is that many objects are transient and can quickly be collected and only

1305-418: The developer team of Wine , a Windows compatibility layer. Mono's current version is 6.12.0 (as of June 2024 ). This version provides the core API of the .NET Framework and support for Visual Basic.NET and C# 7.0. LINQ to Objects , XML, and SQL are part of the distribution. Windows Forms 2.0 is also supported, but not actively developed, and as such its support on Mono is incomplete. Version 4.0

1350-453: The device. The Xamarin.iOS stack is made up of: Xamarin Studio is used as the primary IDE, however additional links to Xcode and the iOS simulator have been written. From April to early September 2010, the future of MonoTouch was put in doubt as Apple introduced new terms for iPhone developers that apparently prohibits them from developing in languages other than C, C++ and Objective-C , and

1395-444: The documentation. Xamarin.iOS and Xamarin.Android, both developed by Xamarin , are implementations of Mono for iPhone and Android -based smartphones. Previously available only for commercial licensing, after Microsoft's acquisition of Xamarin in 2016, the Mono runtime itself was relicensed under MIT license and both Xamarin.iOS and Xamarin.Android are being made free and open-source. Xamarin.iOS (previously named MonoTouch)

Standard Libraries (CLI) - Misplaced Pages Continue

1440-422: The execution performance is more important than the startup performance. Starting with the Mono 2.7 preview, it is no longer necessary to pick one engine over the other at configuration time. The code generation engine can be selected at startup by using the --llvm or --nollvm command line arguments, and it defaults to the fast-starting Mono code generation engine. Starting with Mono 5.18, support for LLVM

1485-524: The new edition of the CLI standard. Mono (software) Mono is a free and open-source software framework that aims to run software made for the .NET Framework on Linux and other OSes. Originally by Ximian which was acquired by Novell , it was later developed by Xamarin which was acquired by Microsoft . In August 2024, Microsoft transferred ownership of Mono to WineHQ . When Microsoft first announced their .NET Framework in June 2000 it

1530-548: The proprietary .NET stacks for iOS and Android from scratch, because Novell still owned MonoTouch and Mono for Android at the time. After this announcement, the future of the project was questioned, MonoTouch and Mono for Android being in direct competition with the existing commercial offerings now owned by Attachmate , and considering that the Xamarin team would have difficulties proving that they did not use technologies they formerly developed when they were employed by Novell for

1575-466: The same work. However, in July 2011, Novell, now a subsidiary of Attachmate, and Xamarin, announced that it granted a perpetual license to Xamarin for Mono, MonoTouch and Mono for Android, which officially took stewardship of the project. On February 24, 2016, Microsoft announced it had signed a definitive agreement to acquire Xamarin. On August 27, 2024, Microsoft transferred ownership of Mono to WineHQ,

1620-427: The standards without fearing a patent lawsuit from Microsoft. To implement the CLI standard requires conformance to one of the supported and defined profiles of the standard, the minimum of which is the kernel profile. The kernel profile is actually a very small set of types to support in comparison to the well known core library of default .NET installations. However, the conformance clause of the CLI allows for extending

1665-494: The supported profile by adding new methods and types to classes, as well as deriving from new namespaces. But it does not allow for adding new members to interfaces. This means that the features of the CLI can be used and extended, as long as the conforming profile implementation does not change the behavior of a program intended to run on that profile, while allowing for unspecified behavior from programs written specifically for that implementation. In 2012, Ecma and ISO/IEC published

1710-504: The technology had not gained enough traction on the Web. In addition, Silverlight itself was deprecated by Microsoft by 2012. Mono consists of three groups of components: The core components include the C# compiler, the virtual machine for the Common Language Infrastructure and the core class libraries. These components are based on the Ecma-334 and Ecma-335 standards , allowing Mono to provide

1755-591: 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. 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. Other .NET or Mono applications can use legacy code, which

1800-495: The use of a middle layer between the iOS platform and iPhone applications. This made the future of MonoTouch, and other technologies such as Unity , uncertain. Then, in September 2010, Apple rescinded this restriction, stating that they were relaxing the language restrictions that they had put in place earlier that year. Xamarin.Android (formerly known as Mono for Android), initially developed by Novell and continued by Xamarin ,

1845-403: The user interface code for a platform-specific API." In August 2010, a Microsoft spokesman, Tom Hanrahan of Microsoft's Open Source Technology Centre, stated, in reference to the lawsuit filed by Oracle against Google over Android's use of Java, that "The type of action Oracle is taking against Google over Java is not going to happen. If a .NET port to Android was through Mono it would fall under

Standard Libraries (CLI) - Misplaced Pages Continue

1890-494: Was acquired by Attachmate in April 2011, Attachmate announced hundreds of layoffs for the Novell workforce, putting in question the future of Mono. On May 16, 2011, Miguel de Icaza announced in his blog that Mono would continue to be supported by Xamarin , a company he founded after being laid off from Novell. The original Mono team had also moved to the new company. Xamarin planned to keep working on Mono and had planned to rewrite

1935-536: Was described as "a new platform based on Internet standards", and in December of that year the underlying Common Language Infrastructure was published as an open standard, "ECMA-335", opening up the potential for independent implementations. Miguel de Icaza of Ximian believed that .NET had the potential to increase programmer productivity and began investigating whether a Linux version was feasible. Recognizing that their small team could not expect to build and support

1980-427: Was originally a port of SharpDevelop to Gtk#, but it has since evolved to meet the needs of Mono developers. The IDE includes class management, built-in help, code completion, Stetic (a GUI designer), project support, and an integrated debugger. The MonoDoc browser provides access to API documentation and code samples. The documentation browser uses wiki-style content management, allowing developers to edit and improve

2025-470: Was the first version that incorporates Microsoft original source code that was released by Microsoft as part of the .NET Core project. As of January 14, 2021, Mono has full support for all the features in .NET 4.7 except Windows Presentation Foundation (WPF) (which the Mono team do not plan to support due to the amount of work it would need) and Windows Workflow Foundation (WF), and with only limited support for Windows Communication Foundation (WCF) and

#635364