PyCon 2008: Django Now Plays on the "Dark Side"

Today I witnessed Django running on something other than CPython ...and that something wasn't Jython. The virtual machine in this case was Microsoft's DLR running IronPython. This is exciting stuff! I attended the "IronPython: The Road Ahead" talk given by Jim Hugunin with some assistance by Dino Viehland who is the lead developer for IronPython at Microsoft. For me, this was actually one of my favorite talks of the conference and was a nice cap to the official portion of the conference. Jim really brings a lot of energy and it was easy to see that the IronPython team is really excited about the work they are doing.

For the demo, Dino showed us the latest Django release (v0.96) running on IronPython 2.0 Beta 1 (which was just released on Friday). He did have to make a few patches to get the demo running. Naturally they chose to use MS SQL Server for their database and Django does not support that database by default. A handful of one or two line changes to the Django source got it working for IronPython. Additionally, there was another one line change or two that had to do with handling unicode properly. He noted that with the trunk of Django that may no longer be an issue since Django now supports unicode throughout. I spoke to Dino following the talk and he hopes to get the diffs he made available ASAP. They also would like to get IronPython working with Django trunk.

Dino demonstrated the simple poll application that we're all familiar with from the Django official tutorials. He started with the vanilla version as would result from following the tutorials and then followed it up with a spruced-up version that included some video and image backgrounds, nice UI effects, and rich-client dynamic updating of the voting results. All of this was of course accomplished with a minimal amount of Python code.

Jim also showed a number of demonstrations – all focused on Silverlight capabilities. From what I've seen of Silverlight so far, it looks like very cool technology. If you haven't taken it for a spin yet, you might not be aware that Silverlight is a cross-browser and cross-platform plugin. It runs in Internet Explorer, Firefox and Safari and is supported on Mac. Novell and the Mono Project are also making a port available for Linux called Moonlight. While Microsoft does not officially support Moonlight, they have contributed some help to Novell and even more importantly have made some of the codecs available. Licensing remains a huge stumbling block for media distribution on open source platforms and Microsoft is helping to ensure that their Silverlight technology will enable a similar experience in a variety of situations. Silverlight will also be available on Nokia but so far is notably absent from another very popular mobile platform. This gave them a rare opportunity to criticize another company for promoting a closed platform.

As I said, Silverlight looks like some very cool technology and should be a major player in evolving the consumer computing experience. Jim mentioned that he was not previously familiar with Django and was pleasantly surprised after seeing Dino's demo code about how easy it was to create a web service exposing some data as JSON. It was merely the simple application of Django's JSON serializer to a queryset that we Djangonauts are familiar with. A word of caution for early adopters and bleeding-edge pioneers: I spoke with Dino after the talk and he said that data binding is not yet functional for IronPython in Silverlight. If you're not familiar with .NET parlance, “data binding” is the terminology for what is analogous to template tags and variables in Django. Simply put, data binding allows you to associate fields of a data set to controls (widgets/elements) on your page.

OK, so the title to this article was a bit of a shot across the bow toward MSFT. Personally, I'm neither a Windows fan boy nor am I a hater. In my experience many who are entrenched in open source (or more generally non-MS) technologies view Microsoft with a wary eye at best. Although a little late to the party, Microsoft is starting to change their tune. They are definitely making efforts to play nicer in the general developer communities. I expect that if I am inaccurate in my legalese here someone will kindly step up and correct me, but IronPython is released under the Microsoft Public License which is now OSI certified. The fact that they took some effort to get Django running on IronPython demonstrates that they are interested in making sure that IronPython is truly Python. This is quite a departure from the past for a company that is well-known for starting with a piece of standards-based technology and mangling it just enough to break standards compatibility and achieve platform lock-in.

One thing Jim mentioned that was a high point for him was when new Chief Software Architect Ray Ozzie took the stage at Mix and mentioned IronPython (about 47 seconds in) as an exciting new development for Microsoft. Certainly as IronPython continues to mature it will open for the door for Python acceptance into organizations and businesses of all shapes and sizes who already have a significant investment in .NET.

About this entry

Content Category:
News
Topics:
django  ironpython  jim hugunin  .NET  silverlight  windows  
 

<<     Back to Unbracketed Home Post a Comment Now 1 Comments Below

Comments

hollerith

Yes but why? The dark side is meant to be easier. Take the happy path. Unlearn you must.

Post a comment

Your name:

Comment:

  1. Markdown syntax is allowed. HTML tags will be stripped.
  2. CodeHilite NOT supported at this time but coming soon...
  3. Constructive statements and good attitudes are encouraged - being kind is better than being right
Clicky Web Analytics