LWN.net Logo

Introducing Three Python Web Frameworks (Linux Journal)

Paul Barry introduces Django, Pylons and TurboGears in a Linux Journal article. "What with all the hoopla surrounding Ruby on Rails, aspiring Web application programmers should be forgiven for assuming that Rails is the only way to go when building their next great Web app. But, Rails is not the only game in town, and Ruby is not the only language worth considering in this very active area. Perl has a large and growing collection of Web frameworks, including Maypole, Catalyst, Jifty and Gantry (to name a few). Even in the Ruby space, the list of technologies is growing to include Merb, Camping, Nitro/Og and Ramaze. And, let's not forget some of the projects from the world's favorite Web templating language, PHP: Zoop, Jelix, Cake and Biscuit."
(Log in to post comments)

Introducing Three Python Web Frameworks (Linux Journal)

Posted May 28, 2009 21:06 UTC (Thu) by boudewijn (subscriber, #14185) [Link]

linuxjournal.com, surely?

Introducing Three Python Web Frameworks (Linux Journal)

Posted May 28, 2009 21:41 UTC (Thu) by jake (editor, #205) [Link]

> linuxjournal.com, surely?

yup, fixed.

jake

Introducing Three Python Web Frameworks (Linux Journal)

Posted May 28, 2009 22:28 UTC (Thu) by cwitty (subscriber, #4600) [Link]

Not fixed: "Paul Barry introduces Django, Pylons and TurboGears in a Linux.com article."

Introducing Three Python Web Frameworks (Linux Journal)

Posted May 28, 2009 22:57 UTC (Thu) by jake (editor, #205) [Link]

> Not fixed: "Paul Barry introduces Django, Pylons and TurboGears in a
> Linux.com article."

heh, i saw the link was some feedproxy thing and figured that was the problem and fixed it. you don't expect me to actually read what Forrest posts do you? :)

further fixed,

jake

Introducing Three Python Web Frameworks (Linux Journal)

Posted May 29, 2009 6:42 UTC (Fri) by BackSeat (subscriber, #1886) [Link]

Shame they missed out web2py, a framework that is both comprehensive and easy to use.

BS

Introducing Three Python Web Frameworks (Linux Journal)

Posted May 29, 2009 9:24 UTC (Fri) by ableal (guest, #57174) [Link]

I also liked what I read, and I'm putting it first on my "round tuit" queue, for a newbie test. More comments on web2py from LWN readers would be appreciated. Correlation with pyjamas (http://pyjs.org/) would be even more interesting.

Introducing Three Python Web Frameworks (Linux Journal)

Posted May 29, 2009 17:37 UTC (Fri) by mdipierro (guest, #58848) [Link]

I think what you are looking for is here

http://groups.google.com/group/pyjamas-dev/browse_thread/...

Introducing Three Python Web Frameworks (Linux Journal)

Posted May 29, 2009 15:49 UTC (Fri) by sbergman27 (guest, #10767) [Link]

I've been watching the Python web frameworks landscape for a few years. And honestly, you are the first person I've seen advocating Web2Py whose name was not Massimo Di Pierro. I'm not just joking, by the way. I've actually been watching and waiting the last year or so, wondering when it would happen. Which is not to say that there is not a lot of advocacy for Web2Py out there. It is simply all posted by people named Massimo Di Pierro.

Introducing Three Python Web Frameworks (Linux Journal)

Posted May 29, 2009 17:16 UTC (Fri) by Webexcess (subscriber, #197) [Link]

I wear a bright orange "WEB2PY" cap (PyCon swag) when I'm out walking, does that count as advocacy?

/never tried web2py

Introducing Three Python Web Frameworks (Linux Journal)

Posted May 29, 2009 17:34 UTC (Fri) by mdipierro (guest, #58848) [Link]

Perhaps because web2py users are busy professionals and it is my job to do the advocacy. Anyway, I have been getting some help. Here are some recent posts by other people.

http://twitter.com/yarkot/status/1429071852
http://twitter.com/cbaron/status/1470661548
http://twitter.com/hurphendale/status/1517391449
http://www.simplyhired.com/job-id/bfdjvwbulv/javascript-w...
https://bentobako.org/david/blog/index.php?tag/web2py

Mind, don't be the last one to join bandwagon.
PyCon moved registration from Django to web2py already in 2009.
Does that count as advocacy?

Introducing Three Python Web Frameworks (Linux Journal)

Posted May 30, 2009 23:08 UTC (Sat) by sbergman27 (guest, #10767) [Link]

That counts as a few short Twitter tweets which mention Web2Py, and a claim of a website using Web2Py for an app. But do you really want to compare Web2Py's usage with that of other frameworks? There are whole websites with apps devoted simply to keeping track of all the other sites that use some of the larger Python frameworks.

Python has traditionally had too many frameworks for its own good. (More web frameworks than keywords, as they say.) Fortunately, this new generation of frameworks, and TG's effective merging with Pylons, has enabled a much needed consolidation. Looking at Web2Py's feature set and style, it really looks like something that would be best merged with one of the more substantial frameworks. For Web2Py, I would say that Django would probably be the best fit. This generation could really do without all the "me too" frameworks of Python's past.

Anyway, the original comment was that the article only covered the big three, which are arguably really the big two, TG2 being a superset of Pylons. And covering the popular frameworks seems reasonable to me.

Introducing Three Python Web Frameworks (Linux Journal)

Posted May 31, 2009 7:55 UTC (Sun) by mdipierro (guest, #58848) [Link]

You told the previous user "you are the first person I've seen advocating Web2Py whose name was not Massimo Di Pierro". I just proved you are wrong.

No, web2py is not as popular as Django but it is at least 4 years younger and for reasons I do not understand there are lot of people like you who complain about it without having even tried it. Nevertheless there are 1000 users on the google group and they are growing exponentially.

Yes, Django, TG, and Pylons are excellent web framework but web2py is very different technically and philosophically. It is unlikely it will merge with them.

Web2py does provide a compatibility layer for Django models and SQLAlchemy models, and users are free to use any template language the are comfortable with. Anyway, we don't encourage any of this because of what they'd miss.

Introducing Three Python Web Frameworks (Linux Journal)

Posted May 31, 2009 15:13 UTC (Sun) by sbergman27 (guest, #10767) [Link]

"""
You told the previous user "you are the first person I've seen advocating Web2Py whose name was not Massimo Di Pierro". I just proved you are wrong.
"""

I don't see how. He was, in fact, the the first person I had seen advocating Web2Py whose name was not Massimo Di Pierro. And I've been watching reasonable closely. Though admittedly, I did not have a Twitter crawler running specifically to look.

But this is getting silly.

"""
but web2py is very different technically and philosophically
"""

Not really that different. This is the mindset that fragmented the Python landscape so badly that the very arguably inferior Rails, running atop the abysmally slow Ruby, was able to waltz in and absolutely dominate over everything that Python had to offer. Projects felt that some minor difference made it imperative that they go their own way, and so everyone set about reinventing the wheel, over and over and over again in their own garages, dreaming of the day that their framework would one day come into its own as hoards of other people came to realize how wonderful their particular wheel was. And, of course, it never happened for any of them. Unless you count Zope. But that's a whole, sad, story in itself.

I'm being horribly un-PC, of course. The prevailing fashion in the Python web framework community these days does discourage one from criticizing anyone else's framework (unless, of course, one is Mark Ramm). But I am still encouraged by the cullings (e.g. Subway) and consolidation (e.g. TG folding into Pylons) that I have observed during this new generation. Continued insistence that Web2Py is so special that it just has to be yet another fragment on the landscape seems, to me, to be a remaining loose end.

Introducing Three Python Web Frameworks (Linux Journal)

Posted May 31, 2009 16:06 UTC (Sun) by mdipierro (guest, #58848) [Link]

I am dropping this conversation. When you tell me that 1) you have tried web2py and 2) what specifically are your technical issues with it I may engage again. It is silly to say we (web2py community) should not have developed our own framework, Zope did, Django did, Pylons did, TG did, and so we did. You say you do not see differences between them. All I can say is look closer. I am sure the creator of other frameworks will agree with me on this one.

Introducing Three Python Web Frameworks (Linux Journal)

Posted May 31, 2009 17:32 UTC (Sun) by sbergman27 (guest, #10767) [Link]

I have used Web2Py. Not for a live project, but for an eval project. It's OK. A lot more "magic" than I would be comfortable with for most of my real projects. And granted, if you did merge with another project, that would be a problem. I doubt much of the magic would be accepted into any of the major Python frameworks. Perhaps that is Web2Py's niche.

I have not said that I do not see the differences between the major Python frameworks and Web2Py. I said that they were not that different. (Bearing in mind the "magic" issue I just mentioned.)

Nor has it been my intent to criticize Web2Py technically.

Nor have I commented on your right to develop your own framework.

What I have commented upon is the effect that the fragmented framework landscape of Python's history has had on Python's success as a language for web development, even against what was arguably technically inferior competition.

"""
I am sure the creator of other frameworks will agree with me on this one.
"""

Really? At Snakes and Rubies one of the people you are claiming to speak for specifically said that he would like to see "maybe 2" major web frameworks in the Python world. That is, as opposed to the one major framework in the Ruby world. He was clearly against fragmentation.

Fortunately, we do not (yet) seem to be facing the fragmentation problem with the current generation of frameworks. Web2Py is a very distant 4th, and I have probably overstated the problem, as things currently stand.

At any rate, this thread was originally about the fact that only the major frameworks were covered in the article. And I still think that was a very reasonable decision on the part of the author.

Introducing Three Python Web Frameworks (Linux Journal)

Posted May 31, 2009 21:11 UTC (Sun) by mdipierro (guest, #58848) [Link]

One of your assumptions is incorrect as shown here Anyway, I have nothing against technical comparisons and critiques. I complain that I do not see enough of them. Let me clarify that I we should not see Python (or Ruby) frameworks in competition with each other since their markets are correlated, not anti correlated. We are all better off if we do not fight and respect and acknowledge each other work.

Introducing Three Python Web Frameworks (Linux Journal)

Posted May 31, 2009 23:44 UTC (Sun) by sbergman27 (guest, #10767) [Link]

Yes, playing with Google Trends can be fun. I'm not sure how relevant. But fun:

http://tinyurl.com/mmwz2k

http://tinyurl.com/lnz2e6

Introducing Three Python Web Frameworks (Linux Journal)

Posted May 29, 2009 10:33 UTC (Fri) by pboddie (subscriber, #50784) [Link]

I think the "hoopla" around Rails has dampened down somewhat, but then the author does admit that the publication lead times are quite long. I was amused by the opening sentence given that something quite similar was used in a Byte magazine parody I did several years ago (now archived on an abandoned personal site, with a date of Friday 19th January 2001, incredibly):

http://thor.prohosting.com/~pboddie/Personal/Caught_by_th...

Still, it's nice to see new comparative articles on such frameworks coming out every so often.

OT/lazyweb: Which framework for an embedded system

Posted May 29, 2009 13:15 UTC (Fri) by debacle (subscriber, #7114) [Link]

Currently, we use Django happily for a "big" application, but for an embedded system (ARM, tiny RAM), we're looking for a very small Python (or C) based web framework. No DB/ORM needed, just request handling, forms, maybe templates, maybe builtin HTTPS-Server... We came across web.py, but maybe there are other options?

OT/lazyweb: Which framework for an embedded system

Posted May 29, 2009 19:01 UTC (Fri) by drag (subscriber, #31333) [Link]

I like using restructured text for a lot of things.

It's a simple, but extremely effective, mark-up language developed for python documentation purposes. It's based on the sort of 'natural' things people do to format plan text documents so you can do things like:

############
Main Title
############

.. attention:
    Sample Document

.. sectum::

.. contents::

Section 1
==========

stuff

Section 1.1
------------

stuff:
    * bullet point 1
    * bullet point 2

Section 2
==========

.. include:: ./otherdoc.rst
etc etc. Then you can convert that to html, latex, or odf. From latex then you can go to all sorts of other documents. You can use templates and styles and all that sort of stuff. You know.. seperate content from style.

A lot of Wikis use a approximation to restructured text for their web-based editors and such.. but restructured text isn't really useful for that.. due to the nature and original purpose it's not something that is easy to gaurd against things like code injection or cross-site scripting vulnerabilities.

But for server-side scripting and editing then it's wonderful. There are a few different little 'web frameworks' that use restructured text for the backend and use file-based storage to generate HTML code. Mostly scripts and stuff like that and are designed to be very lightweight and easy to manage. The most sophisticated is going to be Sphinx.
http://sphinx.pocoo.org/

Restructured text

Posted May 30, 2009 18:30 UTC (Sat) by vonbrand (subscriber, #4458) [Link]

This looks an awful lot like asciidoc...

OT/lazyweb: Which framework for an embedded system

Posted May 30, 2009 20:05 UTC (Sat) by stijn (subscriber, #570) [Link]

Somewhere I've written on the topic of wiki-style markup languages: white-space is significant in many different ways. It introduces a large amount of syntax and hard-wired conventions, has poor escape mechanisms, usually lacks the power of macros and is hard to extend. To each his own of course, different applications have different needs, and diversity rules. Quite a while back I started something called 'zoem' to produce high quality manual pages with output in both troff and (hyperlinked) html. It uses a very strict syntax, but allows brevity at the same time. Recently I have streamlined (not yet published) the zoem html pacakge to enable html generation at a high level of abstraction. It uses a tex-like syntax, has dictionary stacks, lots of programming facilities, and the syntax, while strict, supports html. To give an example, \foo{bar}, \foo{bar}{zut}, and \<div class="foo">{bar} are all valid zoem syntax. The aforementioned package leans heavily on overridable css. The most important property is probably that the package (as written in zoem) is quite small and demonstrates it is an easy way to write a powerful exo-skeleton around html.

It may be a bit pointless to mention all this. The last few days I've been wondering whether this could be useful to anyone else, while realizing that there are already a gazillion other mark-up solutions out there. Your response bent the discussion in an interesting way, and I decided to bend it a bit further. It is now probably a crooked dead end.

OT/lazyweb: Which framework for an embedded system

Posted May 29, 2009 22:24 UTC (Fri) by leoc (subscriber, #39773) [Link]

KLone sounds like it would be pretty cool for an embedded project.

OT/lazyweb: Which framework for an embedded system

Posted May 29, 2009 22:57 UTC (Fri) by wookey (subscriber, #5501) [Link]

Do you know about wt ('witty')? You write C++ structure and it writes the web-apps for you, dealing with all that ajax/javascript/forms, ie/firefox pain and degrading gracefully to dimmer browsers. Very embeddable. It's not really a 'web framework' in the way that Django et al are, but it is exceedingly cool, and may well be what you are lookging for.

http://www.webtoolkit.eu/wt

OT/lazyweb: Which framework for an embedded system

Posted Jun 1, 2009 0:35 UTC (Mon) by rasjidw (guest, #15913) [Link]

Not sure how it compares to web.py in terms of memory usage, but CherryPy is another low level python web framework that might be worth having a look at. It appears to have everything you are looking for, including built-in https support.

OT/lazyweb: Which framework for an embedded system

Posted Jun 2, 2009 12:30 UTC (Tue) by debacle (subscriber, #7114) [Link]

Source-Code sizes of Python-based web frameworks. Very rough estimate after blindly removing tutorials, tests, ORMs (I don't need a db), etc.:

webpy 0.31     280 kB
cherrypy 3.1.2 568 kB
web2py current 928 kB

Both webpy and web2py seem to use the cherrypy WSGI server, webpy seems also to use the cherrypy HTTP server.

OT/lazyweb: Which framework for an embedded system

Posted Jun 1, 2009 5:30 UTC (Mon) by mdipierro (guest, #58848) [Link]

web2py uses the cherrypy wsgiserver which is great. Indeed it has https support. The complete web2py source code (unzipped but not including applications) is less than 800KB. It includes web server, database abstraction layer, template languages and more. Runs on Python 2.4,2.5,2.6, has no dependencies, and does not require installation.

Copyright © 2009, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds