web programming: experiences with non-zope frameworks?

B

Brendan O'Connor

Hello world,

I love python and desparately want to get away from php for programming a
web app. I've read numerous summaries of the toolkits out there --
especially the shootout, http://colorstudy.com/docs/shootout.html -- but
there are SO many frameworks, it really feels like there's no clear-cut
choice for an appserver-based or even mod_python-based framework, and very
few judgement calls on what differentiates toolkits from each other.

I was wondering if anyone would like to share their experiences with the
various frameworks in non-zope land. WebWare and SkunkWeb both look
quite good to me; sqlobject was mentioned earlier here, and looks
intuitive and quite useful. Spyce looks like a good templating system.
But so does skunkweb's stml, and then there's a zillion more of them...

Can anyone make comparisons among the different frameworks? What
combinations of packages do people use? Are *any* of them substantially
more popular than any other?

I think it would be nice to have not another list of several dozen one-man
projects, but rather a collection of practical knowledge to narrow a
python web programmer's options to the realistic and mature choices.

If I can't find any clarity, I'm gonna be consigned to php hell for a long
time coming...

Thanks a lot!
Brendan O'Connor

Links:
http://webware.sf.net
http://skunkweb.sourceforge.net/
http://www.sqlobject.org

Summaries:
http://colorstudy.com/docs/shootout.html
http://www.python.org/cgi-bin/moinmoin/WebProgramming
 
P

Paul Rubin

Brendan O'Connor said:
Can anyone make comparisons among the different frameworks? What
combinations of packages do people use? Are *any* of them substantially
more popular than any other?

There have been a few other comparisons done. That shootout page you
mentioned isn't bad. Zope is the most established but is its own world.
Twisted to me shows the most determination to do things correctly, but
its learning curve is steep, and there's a lot that it doesn't do for
you. Basically none of these systems impresses me as really being
ready for prime time.
I think it would be nice to have not another list of several dozen one-man
projects, but rather a collection of practical knowledge to narrow a
python web programmer's options to the realistic and mature choices.

The closest thing to a realistic and mature choice is Zope, and yet
it's not really satisfying. I'll give some heretical advice: if
you're doing a big project, set aside some of the development time to
evaluate what's out there and adopt or develop something that's best
for your specific needs, with the understanding that you're going to
have to maintain it yourself. If you're doing a small project and
can't afford to set aside that much time, then hold your nose and
write in PHP or even Perl (HTML::Mason is an impressive package if you
don't mind the cancer that is Perl, so it would be great if someone
wrote something like it for Python).

Another approach: some friends of mine did a hybrid system with a web
interface in PHP and backend functions in Python, and were very happy
with the results. My reaction is that if Python and PHP both had big
enough shortcomings to justify the cost of the two-interpreter,
two-language approach, then then neither of them really deserves
advocacy.

Python is certainly a better implementation language than PHP, but if
you're doing web applications in it, you really need a pioneer spirit.
After you get through choosing and evaluating a web framework, you
next have to choose and evaluate a database interface--sheesh. Python
is nowhere near as mature for out-of-the-box quick web development as
PHP is. Of course that may change in the future. However, that's the
state of things today.
 
H

Harald Massa

Brendan,

I just wanted to explain my experience using a rather special Web-
Toolkit.

It's not really a framework - even if Quixote http://www.quixote.ca/ is
called that.

Quixote was created by employees of mems-exchange - as much as I
understand a virtually connected collaboration of chip producing
facilities (I'm not connected to them in any way besides using Quixote)

I had to do a mid-sized web project early this year, I fell in love with
Python around November last year. This falling in love ... was after a
quite long marriage with PHP. And I really thought PHP was a sexy thing
when I started that relationship.

PHP was a really sexy thing, good for a great nightout and a good time.

But --- a marriage with a language asks more than being sexy from a
language. Yeah, it was great, being a Web-Virgin to have the first time
dynamic webcreation with PHP quickly. But I learned that that is not
enough for a language to have a stable relationship.

So I thoroughly searched the various approches to Python Web Working -
and got stuck with Quixote.

Why? It's really not suited for fancy webworking, flashing here and
there. But my applications are rather "database interfaces" than flashing
playgrounds.

And that's where Quixote excells - programming the web. The website as a
programm - the URL as index into the Python namespace.

It was a tough learning, though. I just had started my relationship with
Python, was just getting familiar with what is called "namespace" - and
now that was the basis for webworking.

BUT... Quixote is very very elegant. I could read the entire source code
in a matter of 2 to 3 hours. And after four weeks I integrated speedups
and even was able to isolate bugs in mod_scgi - it's a great game, once
you get used to it.

My application deals with "getting stuff from Office into a database and
publishing that database contents to the web"

In the end, only a very very small number of Python code lines - what
makes ground for a stable marriage, 'cause supporting a small code base
is WAY easier.

Harald
 
B

Brendan O'Connor

I'll give some heretical advice: if
you're doing a big project, set aside some of the development time to
evaluate what's out there and adopt or develop something that's best
for your specific needs, with the understanding that you're going to
have to maintain it yourself. If you're doing a small project and
can't afford to set aside that much time, then hold your nose and
write in PHP or even Perl (HTML::Mason is an impressive package if you
don't mind the cancer that is Perl, so it would be great if someone
wrote something like it for Python).

That's certainly a shame to hear. I'm very concerned that any given
python framework I'd choose might not be around a few years from now; it
seems that none of them have the popularity needed to sustain a large
community to test and achieve maturity, write books and top-quality
documentation, etc.

-Brendan
 
V

Ville Vainio

That's certainly a shame to hear. I'm very concerned that any given
python framework I'd choose might not be around a few years from now; it

Umm... I guess that's not what he meant. It's the framework you
developy yourself you would have to maintain.
seems that none of them have the popularity needed to sustain a large
community to test and achieve maturity, write books and top-quality
documentation, etc.

If having these qualities is so important, why not just bite the
bullet and go Zope?
 
S

Skip Montanaro

Brendan> That's certainly a shame to hear. I'm very concerned that any
Brendan> given python framework I'd choose might not be around a few
Brendan> years from now; it seems that none of them have the popularity
Brendan> needed to sustain a large community to test and achieve
Brendan> maturity, write books and top-quality documentation, etc.

FYI, my previous framework was Mason. As I have time, I'm converting to
Quixote.

Skip
 
B

Brendan O'Connor

Umm... I guess that's not what he meant. It's the framework you
developy yourself you would have to maintain.

Yeah, that's the problem: it really helps to use a framework that's
supported by a community of users, not just yourself.
If having these qualities is so important, why not just bite the
bullet and go Zope?

I may, in the future. I was just hoping there was an alternative; I mean,
even the Zope people say it's too complex and they're rewriting Zope 3 to
simplify things. We'll see I guess.

Brendan
 
W

Wilk

Hi,

I think the first thing is to choose if you prefer a thread, fork or
event driven engine. Also, will you have to handle differents protocols
?

I choose twistedmatrix for his event driven asychore engine,
multi-procols. http://twistedmatrix.com

After, you maybe need a template engine, you must choose if you want a
template graphist-friendly or not. For this we choose (with my graphist)
Cheetah. http://cheetahtemplate.org

But sometimes i use cgi or BaseHTTPServer and my own little framework
and template engine... Because it's finaly quite easy to do it (it's why
there are so many of them maybe).

I use all of this in production without any problem of scalability (a
lot less than with php)

I think the web frameworks are very stable (instead of classic
applications) because they are immediatly tested with a lot of users and
the errors are easy to catch. So don't worry about the pioneer condition
of python web programmers ;-)

For other things, like sql, it's like every python application...

There is a web-sig now to discuss about a common api/interface.
http://www.python.org/sigs/web-sig/

bye
 

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top