Welcome!

Microsoft Cloud Authors: Nick Basinger, Kevin Benedict, Pat Romanski, Liz McMillan, Lori MacVittie

Related Topics: Microsoft Cloud

Microsoft Cloud: Article

Mono Releases Version 1.2

And other updates

The long-awaited third major release of Mono, version 1.2 is now out. The main delay was getting System.Windows.Forms (SWF) to work cross platform. This has been accomplished for the most part. There are a few of the rarely used methods still being worked on, but the vast majority of Windows applications should work: just copy the .exe file to a Linux box or a MAC with Mono installed. The Mono implementation of Winforms supports themes with several included in the current version. Mono even supports WinProc, so many third-party controls that rely on Windows messages will run correctly.

SWF is implemented to the .NET 1.1 level, with some .NET 2.0 controls and functionality included. Now that this milestone has been met, the work on .NET 2.0 features will accelerate. ADO.NET, ASP.NET, and System.Configuration are also complete to the .NET 1.1 level, with some .NET 2.0 capabilities. Most other libraries already support the .NET 2.0 standard.

Mono 1.2 includes two compilers: one for .NET 1.1 compatibility and one with full support for .NET 2.0, including generics. Work on the C# 3.0 compatible version of the compiler has been held up while programmers were focused on getting this release shipped, but I expect a fork of the C# compiler supporting the C# 3.0 standard to appear soon. This release includes runtime support for VB.NET 1.1 and 2.0. A 2.0 compatible Basic compiler is currently being worked on.

Included Packages and Tools
This release of Mono includes an impressive array of tools and third-party (open source) packages:

  • Bindings for the Cairo API
  • A provider for the Firebird Database engine
  • The complete Npgsql Database
  • IKVM for running Java on Mono
  • Nunit for unit tests
  • The XSP application server
  • Modmono to run ASP.NET on Apache
  • makecert for generating PKCS#12 files
  • prj2make for converting Visual Studio project files into make files for Mono on Linux
  • dtd2xsd, which converts DTD from an XML file into XML Schema definitions
  • mono-xmltool for validating XML files and doing XSLT transforms from the command line
  • mono-service for starting services based on the System.Services API
  • permview for displaying declarative permissions in an assemble
  • mono-shlib-cop, which watches managed assemblies for errors or suspicious behavior
  • A profiler with code coverage capability
  • A runtime for JavaScript
It also includes a cool tool called Mkbundle. Mkbundle takes a .NET application and creates a "bundle" or .exe, which contains everything needed to execute the application, including the libraries and the runtime engine; you can just copy the .exe to a machine and run the application without having to install .NET. As far as I know you can't do that with Visual Studio.

The current big missing piece is code access security; a lot of work has been done on this, but there are still a couple of pieces missing, and the auditing of the class libraries has barely started. The problem is that this type of security is either 100% or 0%; even the smallest piece that is incomplete will be the door intruders come in through. Work on this continues and is expected to be complete for the Mono 2.0 release.

The Past and Future
The first official release of Mono was version 1.0, released on June 30, 2004. It had a complete C# compiler, a second C# compiler capable of compiling generics and a limited subset of other C# 2.0 enhancements, a runtime, ASP.NET, GTK# graphics, core libraries and much of the base class libraries, IKVM for running Java applications under Mono, and some development tools. It was missing Winforms, Windows-specific system functions such as COM interop, and a number of classes that were close to but not completely implemented.

The next release of Mono is Mono 2.0 (not to be confused with .NET 2.0) and is planned for release in Q3 of 2007. It is expected to have full .NET 2.0 API support; code access security (CAS) should be complete; it should include both VB.NET version 8 (including generics) and GCC compilers, compacting garbage collection, and integration with Visual Studio and Apple X-Code IDEs. It will also include a subset of the Microsoft "Indigo" and InfoCard technologies, which have been started as a Mono subproject code-named "Olive." Olive is a massive undertaking that will be building on the System.Workflow, System.Query, System.Xml.Xling, and System.Windows.Serialization (including xaml and xamlc support). Mono currently has a need for developers to get involved with Olive, especially those interested in writing test code.

Mono C# Compiler
Over two years ago the Mono C# compiler was forked into a 1.1 branch and a 2.0 branch that supported generics. Since then, changes in either compiler were manually duplicated in the other branch. The main reasons for the fork were that the specifications for generics were changing, and the generics-enabled compiler was somewhat experimental and not guaranteed to be as stable as the main Mono C# compiler. Now that the C# 2.0 standards are fixed and the generics compiler stable, the two code bases have been merged. There are still two separate compilers, but, with the exception of the tokenizer and parser, both compilers are built from the same source code.

Grasshopper 2.0 Preview
Mainsoft has released a preview version of Grasshopper 2.0. I reviewed version 1.0 when it was released last year (see DNDJ, Vol. 3, issue 7). Grasshopper converts .NET byte code to Java byte code and supplies a Java version of the .NET framework classes, enabling .NET applications to run under Java virtual machines. This release supports converting Visual Studio 2005 projects to run on J2EE V2, C# 2.0, and partial support for the .NET 2.0 Framework (emphasis is on ASP.NET 2.0 compatibility). There are a number of issues with the preview release, such as no VB.NET support, limited support for generics, Tomcat is the only supported app server, and the options for connecting to SQL Server are limited, so keep in mind that this is a just a technology preview. I will report on further previews and the final product as they are released. One interesting feature of this release is that it uses the CECIL tool to help with the .NET to JVM conversion. Mainsoft has long been a big supporter of Mono, and has donated much of the Grasshopper code to the Mono project. More details and downloads can be found at http://dev.mainsoft.com/default.aspx?tabid=236.

Mono now has a new Web page listing commercial users of Mono (http://www.mono-project.com/Companies_Using_Mono#Who_uses_Mono.3F). It currently lists 18 companies that depend on Mono for cross-platform support for their applications. Several of these such as imeem, Source Gear, and Mainsoft have already been mentioned in previous columns. Others were new to me, such as the embedded database from VistaDB; Versora, which uses Mono for Windows to Linux migrations (check out their white papers on migrating to Linux at http://versora.com/support/documentation.php); the SplendidCRM (see their announcement at http://news.tmcnet.com/news/2006/08/15/1794955.htm), and Fanfare, which makes test automation software for equipment manufacturers and uses Mono to satisfy their customers who want to run their FanFare runtime on non-Windows systems. I recommend visiting this page because it is educational just to see who is using Mono, and how they are using it.

Milestone for Portable.NET
Portable.NET is also receiving commercial help. Back in January (Vol 5, issue 1), Portable.NET announced two $4,500 grants from Trumf to complete LibJit and a JIT compiler for PNET. Both projects are now sufficiently complete to award the prizes, and the money has been split three ways between Kirill Kononenko, Aleksey Demakov, and Klaus Treichel. This JIT complier also makes another milestone by being able to compile Winforms-based applications. See the screenshots at http://maybe.dotgnu.info:8000/~krokas/screenshots/, but note that only the ones done in June are Winform applications; the older ones are GTK based. There is also one (in German) of the marshaling code in the new JIT at http://maybe.dotgnu.info:8000/~krokas/screenshots/Screenshot-9.png. It's an application for selling train tickets.

MonoDevelop
MonoDevelop, an IDE for use on Linux, has released version 0.12 as was mentioned in my September column. This is really getting to be a nice IDE, and it now has its own Web site at http://www.monodevelop.com/Main_Page. It's Gnome based, and is meant for use on Linux/Unix systems. It has a complete GUI designer, built-in help for the .NET API (based on the Mono documentation, which still needs a lot of work), and includes code completion and an add-in engine that includes a full API and a number of extension points that make writing add-ins easy. Some of the stock add-ins are a query add-in that makes working with databases a snap, and a NUnit add-in. You can see screenshots of both in action, as well as other images at www.monodevelop.com/Screenshots.

Odds and Ends
One of the most common problems with running .NET programs written for Windows on other platforms are hard-coded file and path names such as "\" instead of using the System.IO.Path.PathSeperator. On most non-Windows systems, the path separator is "/," so the hard-coded paths don't work. Mono now has a "compatibility" layer that corrects this. Before running Mono, define a system variable ($export MONO_IOMAP=(drive, path, or all) and the Mono runtime will convert the Window paths to Unix-compatible paths (see http://tirania.org/blog/archive/2006/Oct-05.html for details).

More Stories By Dennis Hayes

Dennis Hayes is a programmer at Georgia Tech in Atlanta Georgia where he writes software for the Adult Cognition Lab in the Psychology Department. He has been involved with the Mono project for over six years, and has been writing the Monkey Business column for over five years.

Comments (0)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


IoT & Smart Cities Stories
Every organization is facing their own Digital Transformation as they attempt to stay ahead of the competition, or worse, just keep up. Each new opportunity, whether embracing machine learning, IoT, or a cloud migration, seems to bring new development, deployment, and management models. The results are more diverse and federated computing models than any time in our history.
At CloudEXPO Silicon Valley, June 24-26, 2019, Digital Transformation (DX) is a major focus with expanded DevOpsSUMMIT and FinTechEXPO programs within the DXWorldEXPO agenda. Successful transformation requires a laser focus on being data-driven and on using all the tools available that enable transformation if they plan to survive over the long term. A total of 88% of Fortune 500 companies from a generation ago are now out of business. Only 12% still survive. Similar percentages are found throug...
At CloudEXPO Silicon Valley, June 24-26, 2019, Digital Transformation (DX) is a major focus with expanded DevOpsSUMMIT and FinTechEXPO programs within the DXWorldEXPO agenda. Successful transformation requires a laser focus on being data-driven and on using all the tools available that enable transformation if they plan to survive over the long term. A total of 88% of Fortune 500 companies from a generation ago are now out of business. Only 12% still survive. Similar percentages are found throug...
Dion Hinchcliffe is an internationally recognized digital expert, bestselling book author, frequent keynote speaker, analyst, futurist, and transformation expert based in Washington, DC. He is currently Chief Strategy Officer at the industry-leading digital strategy and online community solutions firm, 7Summits.
Digital Transformation is much more than a buzzword. The radical shift to digital mechanisms for almost every process is evident across all industries and verticals. This is often especially true in financial services, where the legacy environment is many times unable to keep up with the rapidly shifting demands of the consumer. The constant pressure to provide complete, omnichannel delivery of customer-facing solutions to meet both regulatory and customer demands is putting enormous pressure on...
IoT is rapidly becoming mainstream as more and more investments are made into the platforms and technology. As this movement continues to expand and gain momentum it creates a massive wall of noise that can be difficult to sift through. Unfortunately, this inevitably makes IoT less approachable for people to get started with and can hamper efforts to integrate this key technology into your own portfolio. There are so many connected products already in place today with many hundreds more on the h...
The standardization of container runtimes and images has sparked the creation of an almost overwhelming number of new open source projects that build on and otherwise work with these specifications. Of course, there's Kubernetes, which orchestrates and manages collections of containers. It was one of the first and best-known examples of projects that make containers truly useful for production use. However, more recently, the container ecosystem has truly exploded. A service mesh like Istio addr...
Digital Transformation: Preparing Cloud & IoT Security for the Age of Artificial Intelligence. As automation and artificial intelligence (AI) power solution development and delivery, many businesses need to build backend cloud capabilities. Well-poised organizations, marketing smart devices with AI and BlockChain capabilities prepare to refine compliance and regulatory capabilities in 2018. Volumes of health, financial, technical and privacy data, along with tightening compliance requirements by...
Charles Araujo is an industry analyst, internationally recognized authority on the Digital Enterprise and author of The Quantum Age of IT: Why Everything You Know About IT is About to Change. As Principal Analyst with Intellyx, he writes, speaks and advises organizations on how to navigate through this time of disruption. He is also the founder of The Institute for Digital Transformation and a sought after keynote speaker. He has been a regular contributor to both InformationWeek and CIO Insight...
Andrew Keys is Co-Founder of ConsenSys Enterprise. He comes to ConsenSys Enterprise with capital markets, technology and entrepreneurial experience. Previously, he worked for UBS investment bank in equities analysis. Later, he was responsible for the creation and distribution of life settlement products to hedge funds and investment banks. After, he co-founded a revenue cycle management company where he learned about Bitcoin and eventually Ethereal. Andrew's role at ConsenSys Enterprise is a mul...