"…mais ce serait peut-être l'une des plus grandes opportunités manquées de notre époque si le logiciel libre ne libérait rien d'autre que du code…"

Django on the Java Virtual Machine : django on jython 2.5

Posted by patrick sur février 4, 2008

Source: http://www.infoq.com/news/2008/01/django_on_jython

Alors que jython semblait un peu marqué le pas depuis quelques années, on apprend que le développement de la version 2.5 est prévue pour cette année.


The Jython developers are working hard on producing Jython 2.5 which aims to align Jython with CPython 2.5 and provide a much cleaner and consistent code base.

A side goal of Jython 2.5 is to try to get some CPython frameworks working, especially the web frameworks, for example:

  • Django
  • Pylons
  • TurboGears
  • Twisted

InfoQ recently had the opportunity to interview Jim Baker, a python evangelist and contributor to Django on Jython (DoJ), to find out what is expected and when.

What is the expected release date for Django on Jython?

This year. It’s predicated on the next release of Jython. See #2 for that planning. Django in contrast just works, with only minor changes, thanks to a lot of work that many other people did in identifying (minor) Jython incompatibilities. Now most of the problems we have identified actually occur only in testing, where Django makes certain assumptions about Python should run that don’t apply to Jython. An example of such an assumption that the hash algorithm is the same for dictionary implementations; because we use Java’s (ConcurrentHashMap), this is not the case. However, that’s an artifact of the testing process, Django doesn’t really care about that. Still, we plan to certify this by passing all the tests (fixed as necessary).

What version of Jython is going to be required?

Jython 2.5 – equivalent to CPython 2.5 (or what is conventionally called Python!) is what we are targeting in the Jython project. This is actually moving very fast. We have a 2.5 compiler that’s available for experimental usage, but it’s getting more and more robust as we have additional people testing it. This « newcompiler » was initiated by a Google Summer of Code project that I mentored. (Bruce Eckel mentioned this in a blog post. We in fact hit that mid-September date!) At the Python Conference« A New Compiler for Jython » at PyCon. in mid-March, we will be setting the specific target based on where we are. Tobias and I will also be presenting our paper  « A New Compiler for Jython » at PyCon.

Is Django trying to be what Rails is for Ruby and Grails is becoming for Groovy?

Django offers comparable functionality to those web app frameworks, with ostensibly a more robust platform. So Django is written to be multithreaded, unlike RoR, which means we don’t have to go through a lot of tricks to make it work on the Java platform, such as using multiple classloaders. We currently have database support for PostgreSQL, with some work done also on MySQL. I helped write the Oracle backend for Django. We’re also planning to support Java DB (Derby).

Jim also expressed the usefulness of having a preconfigured stack available, to ease the experimentation of using Django on Jython (DoJ),

I’d like to see the following preconfigured stack available for Django on Jython (DoJ): Derby + Tomcat. This should be something that a developer can just access via a plugin from Eclipse or Netbeans or IDE of their choice, which means they can configure Derby and Tomcat directly from the IDE. It also provides an obvious migration path to other containers and databases. Perhaps more importantly, such a setup allows for easy DoJ experimentation, whether that’s for someone building a Django app, or also using tuple spaces, rules engines, PDF tools, or other parts of the heavy-lifting infrastructure available on the Java platform. This is where I think DoJ provides true compelling value.

For additional information try the following links:

———————————–8<—————————————- A voir:





http://www.jython.org/Project/index.html (« Jython is an implementation of the high-level, dynamic, object-oriented language Python written in 100% Pure Java, and seamlessly integrated with the Java platform. It thus allows you to run Python on any Java platform. »)



Laisser un commentaire

Entrez vos coordonnées ci-dessous ou cliquez sur une icône pour vous connecter:

Logo WordPress.com

Vous commentez à l'aide de votre compte WordPress.com. Déconnexion /  Changer )

Photo Google+

Vous commentez à l'aide de votre compte Google+. Déconnexion /  Changer )

Image Twitter

Vous commentez à l'aide de votre compte Twitter. Déconnexion /  Changer )

Photo Facebook

Vous commentez à l'aide de votre compte Facebook. Déconnexion /  Changer )


Connexion à %s

%d blogueurs aiment cette page :