Wednesday, August 27, 2008

Django on Jython

Few days ago, Leo Soto announced on jython mailing list that Django now runs unmodified on latest Jython code. This is great news for both Jython and Django projects.

Although not my first framework of choice for developing web applications using Python, Django has been adopted by many developers out there, even few ones defecting from Ruby on Rails. Django follows the MVC design pattern, it has url patterns similar to Routes in RoR, etc. One slight problem for developers might be the fact that Django has it's own database API - although I believe another ORM such as SqlAlchemy can be used instead.

I have been following the development of Jython very closely, mainly because I'm planning to introduce it in my company. Our software policy states that the main development language is Java and I'm trying to push the initiative that enables us to use any language as long as it runs in JVM. Nowadays there are several very good (and strong) candidates to replace Java and Jython stands IMHO as one of the strongest. It takes the strengths of Python language and brings them into JVM.

We adopted the Spring Framework in our development to help us minimize the Time to Deliver and maximize the ROI. For developing web applications we're using Spring MVC in both portlet and servlet environments. It improved both the quality of our deliveries and shortened the time to deliver. However, there is still the huge overhead of the code compilation in our day-to-day development. Something like Jython (and Django, possibly) can eliminate that problem partly (or entirely).

Django developers are going for a 1.0 release early next week. With that in mind, the fact that there's an excellent Django Book online and that it runs in Jython are more than enough reasons to get to know Django better and (even) start using it in Enterprise environment. Why not?


Zlatan Kadragić said...

What about Groovy on Grails? That project should be similar to RoR or Django, Groovy has very good integration with Java and JVM and similar syntax.
(Au197/79@ES :))

Aleksandar Radulovic said...

I have looked into Groovy and Groovy on Grails, but being a pythonista and preferring the elegancy of Python code above all else, it was a no brainer to put Jython in front.

I've mentioned that I'm trying to change the policy so it is accepted that development can be done in any language as long as it runs in JVM. Having said that, Groovy would be quite acceptable. Especially since Groovy integrates very well with Spring Framework, our framework of choice.