By now all my friends have heard of the late nights, the lack of sleep, my increasingly blurry vision, and the amount of coffee I’ve been ingesting. The past three weeks have been the closest to the energy and enthusiam of a team for a project that I’ve experienced since my early time at Netscape. We had maybe 10 people (sorry, I’m fuzzy from lack of sleep) working almost entirely remotely (3 people worked out of the Boston office), with people in Spain, Brazil, Canada, Japan, and various places around the continental US. Everyone working insane hours, all on the same ~30 source files, in 2 languages. In some ways I’m surprised it works at all, let alone so well.
Miguel received a warm response when he demoed our stuff in Paris earlier today, and crafted this post on the plane over the Atlantic on his way there.
Unfortunately some people in the gnome/kde/linux/whatever community have blinders on when it comes to anything either produced by the mono team or attached in some fashion to mono. In an attempt to address the issues those people bring, I want to make something very clear.
You don’t need mono to use moonlight
That’s right. You don’t need mono to use moonlight. You don’t need to include the runtime. You don’t need any managed code, or a bundled VM to use it.
It’s pluggable in 2 important ways that make it useful (and still just as exciting) completely outside the managed space.
The parser
Custom namespaces can be resolved in any fashion you want. We use this functionality on the managed side to load assemblies and create managed objects, but there’s nothing forcing you to do that.
For example, in managed land you could use:
<Canvas …
xmlns:foo=”clr-namespace:MyNamespace;assembly=foo.dll”
…
> <foo:MyCustomClass … />
which would instantiate the managed object MyNamespace.MyCustomClass, found in foo.dll, and insert it as a child of the Canvas object.
In unmanaged land you could easily write a parser callback that allows you to do:
<Canvas …
xmlns:foo=”native-handler:create_native_object;dso=foo.so”
…
><foo:MyCustomClass … />
which would dlopen foo.so, and invoke create_native_object (”MyCustomClass”);, adding the return value as a child of the Canvas. Just like glade, or heaps of other GUI builders that permit custom widget types.
The downloader
Right now there are three separate downloader implementations in our tree.
- A braindead implementation that just loads files off the filesystem for use in testing.
- A managed implementation that uses the .net classes and provides a means for actually downloading things.
- A browser plugin stream implementation, which lets mozilla take care of the heavy lifting (and caching) of downloadable content.
It would be trivial in the extreme to add a gnome-vfs (or any other io layer) downloader, and use it to load xaml content, jpgs, etc, from any of its supported url schemes.
–
In some ways moonlight is *more* exciting outside the managed space, just because there are so many other interesting integration points. How about a mozilla extension using nothing but C++ and javascript and allowing xaml to be rendered/interacted with directly in the browser, with custom objects written in javascript and/or c++ and downloadable from other websites?
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.
I for one am excited to start writing apps using it.