July 09, 2003
Python Web Frameworks

There are a whole bunch of Python Web Frameworks out there. Russ doesn't know what to use. Neither do I.

Anyone?

Posted to Python by Simon Brunning at July 09, 2003 03:36 PM
Comments

Standard consulting answer;

Depends.

But, AMK is trying to whip up some enthusiasm in the community to implement a sample application in each of the different toolkits. If anyone has some spare time it would be an appropriate project to learn about Python/the Web/the various frameworks.

There is a post on comp.lang.python (in the Python vs PHP thread) but it hasn't trickled through to Google groups yet.

Posted by: Andy Todd on July 9, 2003 04:42 PM

Not to mention that Russ says J2EE is a standard.

Hmm, in my experience its just a bunch of standards (not to mention buzzwords ;-) that you can implement. Or not.

The same problems exist in the Java world as in Python, take a look at Wafer (http://www.waferproject.org/index.html).

Posted by: Andy Todd on July 9, 2003 05:00 PM

I suppose the WebProgramming Wiki stuff needs refactoring to reveal useful similarities and differences between the frameworks. One of my main reservations about maintaining the original document after a while was that everyone wanted to expose their "new but slightly different" Python Server Pages implementation to the world, but an epic comparison table just slowed down the average Web browser's HTML rendering and let the reader haze over in the shallow details of checkbox-level features.

Anyway, I think Ian Bicking's Web Framework Shootout document is good for exposing the different programming styles, and that's always an important factor in deciding on a framework. As for real-world features, it is surprising how many frameworks provide enough of these to work with, even though classifying those features comprehensively is quite difficult. AMK's recent call for a standard demo application is interesting because it potentially lets each framework answer tricky feature questions through an actual demonstration of application behaviour whilst also showing the necessary code to make it happen.

Personally, I don't believe J2EE is enough of a standard to be compared with some of the Python Web frameworks. Given that you'll need extra stuff on top to do real application activities, claiming J2EE compatibility is like advertising that your office suite has "Intel Inside".

Posted by: Paul Boddie on July 9, 2003 08:20 PM


J2EE isn't a standard!?!? Servlets, Filters, JSPs, Tags, etc. work 99.9% the same everywhere. I can use Tomcat or I can use Orion Server or I can use Resin. No problems. If you're talking about EJBs, well yeah, they work more like 40% the same everywhere, but who's dumb enough to use EJBs? ;-)

I can't really find a basic level of server functionality that's in Tomcat in the Python world yet. That's really the question, where's Python's Tomcat - the reference implementation? Well, that would mean there was something to reference - where's the standard? Definitely something Python needs IMHO.

-Russ

Posted by: Russ on July 9, 2003 09:09 PM

I have to agree with Russ on this one - J2EE *is* a standard. Python has no J2EE and no Tomcat, and it needs them. A Struts would be nice, too. ;-)

Posted by: Simon on July 10, 2003 08:19 AM

OK, J2EE is a standard. I'm exposing my gross ignorance here, but can someone please explain, in words of one syllable or less, what the differences between Tomcat and Struts are, and where they fit into the J2EE model of the world?

I ask, because both home pages contain a very similar list of buzzwords and I am frankly a little confused. No change there then ;-)

http://jakarta.apache.org/struts/
http://jakarta.apache.org/tomcat/

Posted by: Andy Todd on July 10, 2003 08:30 AM

Briefly (I'm on dial up), Tomcat is a J2EE web application server. Any Servlets or JSPs that you have written can be run on Tomcat, or any other J2EE server, without change. This *works*, bar the occasional struggle with config files.

In the Python world, there is no J2EE, no standard web application API. Note that J2EE is the *standard*, not any particular product. (Tomcat is only one of many J2EE servers, though on of the most important. Partly 'cos it's good, and free, so *everyone uses it, if only for development, and partly 'cos it's the 'reference implementation'.)

Struts is a different thing. It's an MVC framework, which sits on top of a J2EE server. (Google for MVC if you need to. O'Reilly has some nice articles...) Using it, you don't need to write the Controller, and the much of the grunt work of putting the View together is taken care of. The Model is still your problem, though.

I shouldn't have mentioned it, really - it's just confusing the issue.

Posted by: Simon on July 10, 2003 09:22 AM

More about Struts here:

http://www.brunningonline.net/simon/blog/archives/000357.html

Posted by: Simon on July 11, 2003 02:01 PM

Speaking of examples, and doing a specific example in each framework, I think it would be neat to see someone do the J2EE Pet Store example in Python. Then a good comparison and contrasts of the two languages for web-apps could be conducted more directly perhaps? I think the point of that example in Java was to show off a lot of different kinds of features that could possibly be needed in business web-apps, and could be good to show off in Python.

Posted by: Steven Cummings on July 12, 2003 06:33 AM

Python doesn't need a standard like J2EE servlets -- standards like that are for the proprietary world. If there's a good implementation of that system, then it's the implementation. Just like no one cares about a Python specification (the Python interpreter *is* the specification), no one really cares about a specification of a container.

That said, more cooperation among the framework developers would be good, and we're trying. We don't need standards, but we do need sharing and agreed-upon interfaces so that Python web programmers can share with people who use somewhat different environments.

Posted by: Ian Bicking on July 13, 2003 03:57 AM

Ian Bicking's Web Framework Shootout is here - http://colorstudy.com/docs/shootout.html

Posted by: Simon Brunning on July 14, 2003 11:27 AM

WebStack[1] looks interesting...

[1] http://www.pythonware.com/daily/index.htm#107910838297426922

Posted by: Simon Brunning on March 17, 2004 04:33 PM

No more "pining" for you, then Mr Brunning? ;-)

Posted by: Paul Boddie on March 23, 2004 11:42 AM

Nope, WebStack looks like *exactly* what's needed. By the time I get back from my gruesome RPGIV stint, I hope to know a bit more about it.

Posted by: Simon Brunning on March 23, 2004 11:47 AM
Post a comment
Name:


Email Address:


URL:



Comments:


Remember info?