Friday, March 20, 2009

Django vs Pylons: Pylons fails to deliver a pony?

Last year the Django community adopted the Django Pony as their unofficial mascot. Since then, I keep hearing a complaint about Pylons: that it lacks a pony.

I have an important message: this is a falsehood, most likely orchestrated by the Django marketing machine.

Pylons *DOES NOT* lack a pony -- Pylons (actually Paste) has included a pony (paste.pony) out of the box for 3 years, since the Pylons 0.8.1 release. Here's Ben Bangert demoing said pony at a Google tech talk over 2 years ago.

Typical Django and their NIH attitude -- instead of checking if Ian Bicking did it first, they just went off and made their own pony. That's fine though, we don't mind the Django pony. However the lies about Pylons must stop immediately. I demand a retraction and an apology from the Django camp.

Pylons and TurboGears 2 has a significant presence at PyCon if you'd like to apologize in person.

Tuesday, March 10, 2009

Deploying Pylons Apps to Java Servlet Containers

As of the 0.9.7 release, Pylons now supports Jython 2.5. The new snakefight tool can create a WAR file from a Pylons app via its bdist_war distutils command.

Using bdist_war is simple: just follow these instructions on the Pylons official docs: Pylons on Jython.

The WAR file contains everything you'll need: the Jython runtime and all the eggs your app requires. For Paste style apps, it can automatically generate a deployment descriptor (web.xml) to load the application via modjy (which is now included with Jython as of the beta2 release).

This makes deployment to a J2EE App server incredibly easy, even easier than deploying your app behind Apache or the like.

I'll be giving a talk on Pylons on Jython at PyCon '09 in a couple weeks.