MonoDevelop: A port to call home

84

Author: Paul Ferrill

Mono is an open source project to create a free mplementation of Microsoft’s .Net Development Framework. Mono implements the command line
versions of the C# and Visual Basic .Net compilers freely available as part
of Microsoft’s .Net Software Development Kit on multiple versions of Linux,
Mac OS X, and on Windows. MonoDevelop (MD) is an offshoot from the Mono
project to port SharpDevelop (#Develop) to the Mono platform using Gtk# for
the graphical user interface. If it’s new to you now, you’ll find it’s
easy to set up and work with.

According to a posting from Todd Berman, the primary visionary in the genesis of MonoDevelop, on the MonoDevelop Ximian list, MonoDevelop out of a desire to create an IDE underneath the Mono umbrella.

Initially when Miguel and I were speaking about this project, we quickly realized we had two basic ways to go. 1) Start from scratch 2) Port existing work. We quickly abandoned starting from scratch…. Now, once we realized we were heading down the porting aisle, we looked at our available options. We had a couple of “known” requirements at that point:

#1) Must use Gtk# (We both felt more comfortable with it, and that’s just our preference)
#2) Must be in C# (duh)
#3) Must be as cross-platform as possible (Why restrict our audience?)

We felt that porting #Develop over, say, extending/porting Anjuta or any other existing C Gtk+ Linux GUI, would be a far easier and more manageable task, as the core logic is quality C# no matter what toolkit you stick on top of it.

Starting with the 0.98 release of SharpDevelop the team began work in December 2003. They completed porting the core and had a usable application within about a month.
Today, Berman says, “we don’t contain every feature that is in SharpDevelop, but that has never been the goal. The goal of MonoDevelop is to create a first class Mono IDE that integrates well with the host operating system.” The result is a stable tool for developers of .Net applications on Linux. At this time MonoDevelop runs only under GNOME, but it could be expanded to use a Cocoa-based front end for Mac OS X.

Installing MonoDevelop on SUSE Professional 9.1

Getting the latest version of MonoDevelop installed couldn’t be easier. I began with a fresh install of SUSE Linux Professional 9.1 on a Compaq Evo N1000v laptop with a 2.0GHz processor and 1GB of memory. I downloaded and installed Ximian’s Red Carpet software management application first. Then, from the Red Carpet GUI, I selected the Available Software tab and then chose
the Mono channel. Selecting all available packages gives you a list of 61 items. When
I clicked “next” the program informed me I had a single conflict with two versions
of the Windows Forms package. Deselecting the oldest version then let me proceed to
the next step. At this point Red Carpet takes over, downloads the selected packages,
and installs them in the proper order. The installation completed with no errors, but I had to install Mozilla to resolve one last dependency before I could get up and running.

Code completion is a real time-saver, especially when you aren’t sure of the exact
syntax of a function or don’t remember the exact spelling of a particular attribute. Color coding also helps to quickly identify things like comments, keywords, and plain code.

Using MD to do actual software development gets better with each release. There are
still a few quirks and bugs, but that’s to be expected with beta software. Overall
the tool is solid and provides all the things you need to get started developing C#
programs on Linux. Little things like templates for creating new projects or source
files help get you started quicker. MD currently provides templates for the following
types of projects:

  • C#: Console, Empty, Glade#, Gnome#, Gtk# and C# Library
  • ILAsm Console Project
  • Java: Empty Java, IKVM Console, IKVM Gtk#, Java Console
  • MonoDevelop Blank combine
  • Empty Nemerle project

(IKVM is an open source project
to bring the Java Virtual Machine to the .Net platform. It’s essentially a translator
that converts Java bytecode to .Net’s CIL bytecode, making it possible to access Java
class libraries from within Mono and .Net class libraries from Java. Nemerle is
a new language similar in syntax to C# with a few twists. The banner on the Nemerle
Web site states “Nemerle is a new hybrid (functional, object-oriented,
and imperative) programming language for the .Net platform.”)

The previous release of MD introduced a handy feature labeled Import VS Project.
With one simple step you can now convert an existing Microsoft Visual Studio project
to run inside of MD. The only hitch with many of the projects you’ll find on the Web
is that they won’t work until the System.Windows.Forms support in Mono makes a little
more progress. Any console application should work as is.

MonoDoc, the Mono documentation system, will help you in developing software with MD. MonoDoc runs as a standalone program or is accessible from within MD through the Help tab. With the Beta 2 release the current delivered sections cover the System Namespace Class Library along with Mono, GNOME, and NUnit library descriptions. The final two reference sections are entitled C# Language Specification and C# Compiler Error Reference.

While MonoDevelop is a beta product that works with the beta release of Mono, it is
still a solid developer’s tool. It doesn’t fully emulate the complete environment
you’ll find with Microsoft’s Visual Studio — specifically the integrated graphical
user interface (GUI) tools — but it delivers a firm foundation to get started
developing with Mono today, and it’s simple to get installed.

MonoDevelop prime mover Berman says parts of MonoDevelop will closely track the path
of SharpDevelop, while others will not. “We are interested as always
in code sharing, but there are certain pieces that don’t make sense on our platform
now, and might not ever. A Gtk# GUI designer is in the works, and hopefully some ASP.Net hooks and tie-ins.”