InfoQ

InfoQ

News

My Bookmarks

Login or Register to enable bookmarks for unlimited time.

The content has been bookmarked!

There was an error bookmarking this content! Please retry.

Microsoft shows Django running on IronPython

Posted by Robert Bazinet on Mar 28, 2008

Sections
Development
Topics
Dynamic Languages ,
.NET
Tags
Microsoft ,
IronPython ,
Django ,
Python

Microsoft recently had the opportunity to show off some of the progress the Dynamic Language Runtime (DLR) team has made when they gave a demo of Django running on IronPython.  The accomplishment was shown during PyCon 2008 in Chicago, March 14-16, 2008.

This is a huge step for the team, to be able to run a widely-used framework, such as Django, on a dynamic language running on the .NET Framework.  Django is a mature web application framework written for Python and intended to create applications very fast with a clean and pragmatic design.  It is a framework developers normally use on Linux or some other platform where Apache and Python are found but this demo showed Django running on Microsoft's DLR, the IronPython language and SQL Server 2005.

Dino Viehland and Jim Hugunin provided the talk at PyCon titled "IronPython: The Road Ahead", summarized nicely by Brian Luft of the blog Unbracketed.  Dino's demo took at bit to get running:

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.

As for the demo itself:

Dion 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

Dino explains the first step in getting Django running was getting a database provider that would run on .NET and work with Django.  He describes PEP 249 as the Python Database API Specification which needs to be followed to create the basic database provider used.

IronPython v2.0 beta 1, released this past week, runs on the DLR is available on CodePlex.  Additional information about Django can be found at the Django Project.

No comments

Watch Thread Reply

Educational Content

Collaboration: At the Extremities of Extreme

Jason Ayers share the observations he made watching a team of developers collaborating in real time on the same code base, pushing XP, pair programming and continuous integration to their extremes.

Yesod Web Framework

Michael Snoyman presents Yesod, a web framework written in Haskell and containing a web server, templating, ORM, libraries (templating, gravatar, etc.).

Transactions without Transactions

Richard Kreuter and Kyle Banker on how to avoid classical RDBMS transactional systems by using compensation mechanisms, transactional messaging or transactional procedures.

Attila Szegedi on JVM and GC Performance Tuning at Twitter

Attila Szegedi talks about performance tuning Java and Scala programs at Twitter: how to approach GC problems, the importance of asynchronous I/O, when to use MySQL/Cassandra/Redis, and much more.

10 tips on how to prevent business value risk

One category of risk that project teams need to ensure they address is business value failure – delivering a product that fails to provide value for the business investor.

Interview: Software Systems Architecture: Working With Stakeholders Using Viewpoints and Perspectives

InfoQ spoke to the authors of Software Systems Architecture on a couple of new topics, the System Context viewpoint and Agile, which have been added to the second edition.

Beauty Is in the Eye of the Beholder

Alex Papadimoulis discusses ugly code, where it comes from, how to avoid it, and how to get rid of it.

Architecting Visa for Massive Scale and Continuous Innovation

John Davies examines Visa’s architecture and shows how enterprises have architected complex integrations incorporating Hadoop, memcached, Ruby on Rails, and others to deliver innovative solutions.