Uncategorized —

Mono Silverlight implementation emerges after epic hackathon

During an epic 21-day hackathon, a small team of Mono developers worked …

After 20 days of "intense" programming, Novell's Mono development team has successfully produced a functioning prototype of Moonlight, an open-source Mono-based implementation of Microsoft's Silverlight rich-media application development framework. In a blog entry, lead Mono developer Miguel de Icaza describes how his small team of globally dispersed developers managed to conjure up their entire Moonlight prototype (almost 25,000 lines of C++ code and over 13,000 lines of C# code) in only 20 days by giving up weekends and working 12 to 16 hours per day in a remarkably epic "hackathon."

A week after Microsoft demonstrated Silverlight at MIX 07 in Vegas, de Icaza announced that the Mono team would build an open source Silverlight implementation and stated that a Linux-based Silverlight browser-plugin would be available for download by the end of the year. At the end of May, de Icaza decided to accelerate the development process and move ahead as quickly as possible so that the Mono team could demonstrate a functioning Moonlight prototype at the Paris MIX 07 event scheduled for this week.

Early in the project, de Icaza decided to use native code rather than managed code. "My original plan was to write the low-level rendering engine in C and expose some sort of 'scene' API that the managed world would control," said de Icaza "With only a few primitives and a handful of operations on those primitives this idea sounded passable."

The developers eventually decided to switch to C++ as additional needs arose. As de Icaza describes in his blog entry, much additional work had to be done to implement and refine the managed downloader, rendering system, JavaScript bridge, C# bindings, event system, browser plug-in, and numerous other components.

How did the developers manage to endure the insane schedule and long hours? For those involved in the project, it was a prodigious labor of love. To them, it was clearly more than just another job, and much personal time was used to bring the current prototype to fruition. "I think I speak for all of us when I say that it was a blast working on this project," says Moonlight contributor Jeffrey Stedfast in a blog entry. "I know that, for myself, even after heading home from work at around 8 or 9pm every night, I'd walk in the door, grab a quick bite to eat and immediately sit down in front of my computer and begin hacking on it again and I'd almost always find at least Jackson and Toshok on IRC hacking on it too."

Moonlight to shine on the Linux desktop

Moonlight is a monumental achievement with broad implications for the Linux desktop. Novell developers have already begun to investigate ways that the Moonlight rendering canvas can be used in desktop applications and other projects. "Although Silverlight is intended to be used in a web browser we think it would be very useful to Linux desktop programmers to have Silverlight reusable as a widget," de Icaza comments.

Moonlight developer Chris Toshok helps to illustrate the potential of Moonlight on the desktop by pointing out that developers don't have to use Mono to incorporate Moonlight canvases into their desktop applications. It is entirely possible to load, display, and manipulate XAML content in a C++ GTK application without having to use a Mono interpreter or a single line of C# code. "In some ways moonlight is more exciting outside the managed space, just because there are so many other interesting integration points," Toshok says. "At its heart, moonlight is a C++-based compositing system with support for animation and events. Given how excited everyone is about the various 'canvas' implementations cropping up around, they would be well served to see if moonlight couldn't handle what they need."

Although Moonlight development is progressing much faster than anyone anticipated, there are still many tasks that still need to be done. "I did not think we would be able to get this far in 21 days, I was hoping at most to have a simple XAML file loading and some animations going but the team really achieved an incredible project. I think we are still quite impressed that it could be done," says de Icaza. "But there is still much work left to do to before we can work flawlessly as a Silverlight plugin."

In his blog entry, de Icaza also hints at the possibility of eventually building a Silverlight designer that can integrate with the MonoDevelop IDE. The Moonlight team hopes to build the future designer in Silverlight code itself so that it can be deployed on Mac OS X.

Although the Moonlight team has not yet issued an official release, developers interested in testing Moonlight or contributing to the project can download and build the source from the version control system.

Channel Ars Technica