Moonlight in Paris
Silverlight-on-Linux effort could have major cross-platform implications.
In a move that could broaden the appeal of Microsoft's new Silverlight rich Internet application (RIA) plug-in to both the .NET and open source communities, a group of developers has demonstrated Silverlight-based multimedia running on a Linux-based system.
The demo, dubbed "Moonlight," occurred at the ReMIX '07 conference in Paris late last month. The event was coordinated by a Novell Inc. -- funded group known as the Mono Project, which is charged with developing a Linux-based platform that can run native .NET code and components.
The team of developers -- led by Novell VP of Development and Mono Project leader Miguel de Icaza -- pulled off the demo following an intense 21-day "hack-a-thon." Its success appears to support the portability of Silverlight to Linux and also gives credence to Microsoft's promise that Silverlight will enable .NET developers to build RIA apps for both Windows and other operating systems.
Microsoft's Silverlight currently supports the Windows and Macintosh operating systems. The company hasn't announced plans for a Linux-compatible version of Silverlight.
"We believe that Silverlight is a fantastic development platform," de Icaza wrote on his blog. "Its .NET-based version is incredibly interesting and as Linux/Unix users we wanted to both get access to content produced with it and to use Linux as our developer platform for Silverlight-powered Web sites."
In an interview with RDN, de Icaza said the demonstrations at ReMIX '07 included animations as well as audio and video. He says the team implemented about 80 percent of Silverlight's features.
"We still have to do a lot of work along the lines of making the code stable and [providing] ease of installation, but at least on the engineering side, the 21-day developer sprint that we did was quite successful," de Icaza says.
Running Toward the Light
Microsoft is positioning Silverlight as an alternative to Adobe Systems Inc.'s ubiquitous Flash plug-in. Previously known as Windows Presentation Foundation/Everywhere, or WPF/E, Silverlight faces an uphill battle against Flash, which Adobe says is installed on 98 percent of Internet-enabled desktop PCs. Adobe is enhancing the Flash platform.
In addition to providing a vehicle for streaming media, graphics and audio, Silverlight version 1.1 (currently in alpha) delivers a scaled-down version of the Common Language Runtime and also has support for dynamic languages. Microsoft touts Silverlight's ability to leverage the company's managed-code framework and best-selling development tools.
The Moonlight demo was an important milestone for Windows developers, according to Scott Hanselman, chief architect of Corillian, a division of CheckFree Corp. that provides electronic banking software and services. "It allows them to support more users but at the same time it also allows the Windows developers and the independent Windows consultant to potentially have a career running their code on Linux," he says.
Moonlight originated from an invitation by Marc Jalabert, a manager for Microsoft's French office, to discuss the Mono project at the ReMIX '07 conference. De Icaza decided to take it up a notch. Rather than talk about Mono, he aimed to show Silverlight running on the open source Linux platform.
In a group e-mail intended to rally support, de Icaza described the invitation as a major opportunity for Mono. "I think it would be foolish not to take advantage of this," he wrote.
De Icaza's goal was to create a demonstration of content loaded from a XAML file, including video and C#-controlled animation, rather having to render a full animation framework. There were significant challenges, however.
At the time, Novell had already written an XAML parser in C# but it was unclear whether it could handle data-type conversion. Also, Microsoft recommended that the XAML parser should be implemented in native C code. By doing so, the team would end up with a C-based XAML parser, the potential ramifications of which were unclear.
The effort would also require binding the C implementation of its code to C#. In addition, de Icaza decided to use Cairo, a 2-D vector-based, cross-platform open source graphics library with support for multiple output devices. The Cairo API is similar to that of Adobe's PostScript and PDF interfaces, according to the maintainer of Cairo, cairographics.org. Although the library rendered the graphics well, there were some performance issues, which de Icaza said led to significant bottlenecks.
Overall, it was a marathon effort that went right down to the wire. De Icaza was cleaning up code right up to the start of his presentation.
In the end, de Icaza and his team demonstrated a number of rich applications including an airline-booking applet based on the fictional Silverlight Airlines. To get to that point, de Icaza and about a half-dozen other developers logged 16-hour days for much of the three-week period in order to meet the deadline. In that timeframe the group wrote thousands of lines of code.
"I haven't worked as hard for many years," he admits, adding that the results paid off. "I think we were surprised we were able to do so much."
Jeffrey Schwartz is editor of Redmond magazine and also covers cloud computing for Virtualization Review's Cloud Report. In addition, he writes the Channeling the Cloud column for Redmond Channel Partner. Follow him on Twitter @JeffreySchwartz.