Main Content

Crossfertilisation, PHP to Python

Archive - Originally posted on "The Horse's Mouth" - 2005-03-06 08:50:13 - Graham Ellis

Rasmus Lerdorf's "Do you PHP" talk on our Geek Cruise last October was brilliant - I heard so much about what's behind PHP and how its originator intends it to be used that it give me a real strong understanding of best practise - you'll find further details availble here and elsewhere on this site.

Python is a superb language with a different target user base / footprint to PHP. From time to time, the footprints overlap and I find myself putting Python applications on the Web from time to time. Using the best of both worlds - the strengths and knowledge of both PHP and Python, you can put together some superb "Python on the Web" applications. For training purposes, I've put a script onto our web site - you can run it through this link and link to the source (it's hsapp2.py in the course examples) as well.

The Python application looks simple - but all the ingredients you'll need are there ... picking up information from forms, sticky fields, sessions, session cart tidy ups, template files and the rest ... all within just a few K of code. And the application is well designed so that it can be easily reused, updated, maintained and extended. I've just finished writing a 10 page description of this application to be included in our public Python course, but that's a fairly intensive three days and there won't be much time to go through the details of what, for Python, is a bit of a specialist area. If you're booking a private course we can tailor it to give you full coverage, or you can arrange an extra day at our training centre to cover it after a public course.