The Artima Developer Community
Sponsored Link

Weblogs Forum
Please Teach me Web Frameworks for Python!

104 replies on 7 pages. Most recent reply: Sep 28, 2008 10:31 PM by brianna americana

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 104 replies on 7 pages [ « | 1 ... 3 4 5 6 7 | » ]
Lone Star

Posts: 7
Nickname: lonestar
Registered: Jan, 2006

Re: Please Teach me Web Frameworks for Python! Posted: Jan 29, 2006 2:19 PM
Reply to this message Reply
Advertisement
> webpy...
Looked at it. Not interested, thanks.

> (not to mention
> it's written by Aaron Swartz, whose coding skills are very
> trustable)
Sorry. But I can't follow this statement. From looking at the homepage of Aaron Swartz (www.aaronsw.com) I didn't get the impression that the code he has produced so far is above average. But admittedly he has started very early playing around with computers... if that justifies the buzz he received I don't know. Alone the quote "Aaron Swartz is a teenage writer, hacker, and activist" for me personally is a turn-off, not to mention that "more gpl than gpl" license which I find absolutely inappropriate for a webframework...

Maybe I am getting old...

Cliff Wells

Posts: 3
Nickname: cwells
Registered: Jan, 2006

Re: Please Teach me Web Frameworks for Python! Posted: Jan 29, 2006 4:44 PM
Reply to this message Reply
I'd love to tell you to use TurboGears and reassure you that by the time you've learned the API and the various components and done some testing, TurboGears will be ready for primetime. Unfortunately I can't. My own experience has been that it's far too easy to do small sites in a couple days and larger sites in a week or so (if you add in the Gimp work, CSS layout etc). I've personally been forced to deploy sites on the SVN version of TurboGears because I didn't know what else to do with them. It's been really frustrating getting stuff done before I was ready. If that seems like a problem you can live with, then TurboGears may be right for you.

As an aside, I don't like mashing code into XML templates either, so I use TurboStan, a port of Nevow's Stan to TurboGears. I'll personally never write XML again if I can help it. Stan is a bit magical, but remarkably clean and easy to extend (I'm also using Turbogears and Stan to generate wxPython XRC documents that generate a client-side GUI). Stan also encourages pushing logic back into the controller, keeping the view nice and simple. For all the XHMTL hacks who think designers can't understand anything not XML-based, my guess is that they've never tried and are just supposing. My girlfriend is a designer and thinks Pythons are snakes and yet she managed to rewrite her own site using TurboStan after a 10 minute tutorial (and help on the controller side of course).

Eugene Lazutkin

Posts: 15
Nickname: elazutkin
Registered: Jan, 2006

Re: Please Teach me Web Frameworks for Python! Posted: Jan 29, 2006 7:24 PM
Reply to this message Reply
> From what I've seen of Django and regular expressions,
> noting that I don't have any interest in the templating
> system (since I'm an adherent of XML-based templating),
> the principal application of regexps is in interpreting
> the path or URL when dispatching to a particular part of
> an application. I think this is an elegant twist on the
> way Zope and its predecessors did dispatching: the Zope

If I understood your correctly your "Using Regexs to specify the UI" is your impression of how Django parses RESTful URLs. It is hardly "specifying UI". Whew.

> What I don't particularly like about Django and some
> other frameworks is the mandatory relational database
> system aspect. I've been involved in writing

But you decided to singled out Django. ;-)

I suspect "the mandatory relational database system aspect" (?) is what you called earlier "nightmare-in-waiting". It sounds strange because some time ago I built a private web site for my family member in Django without database using Django's URL dispatching mechanism, views, and templates. I guess it proves that this "aspect" is not "mandatory". I admit that value of a database-less web site is very small, but it is possible. I can imaging a possibility of using some other non-RDBMS ORM (it's not going to be called ORM, right?) in Django.

Some people use non-Django template systems, which shows that this part can be cleanly separated as well, if desired. I understand you are partial to Zope. For Zope3 page templates for Django see: http://www.zope.org/Members/shh/DjangoPageTemplates

Thank you. It is always nice to talk to knowledgeable people, who make fair judgements based on facts and deep understanding of the material.

Eugene

Michael Lauer

Posts: 1
Nickname: mryilauer
Registered: Jan, 2006

Re: Please Teach me Web Frameworks for Python! Posted: Jan 30, 2006 4:50 AM
Reply to this message Reply
Guido, as the BDFL of this domain, you must already know that
1. everything sucks
2. you can do better writing your own in a few days

This is the pythoniverse, after all, where all the children are above average, (and no one is more than 9 years old...)

Fredrik Lundh

Posts: 16
Nickname: effbot
Registered: Mar, 2005

Re: Please Teach me Web Frameworks for Python! Posted: Jan 30, 2006 5:53 AM
Reply to this message Reply
> as the BDFL of this domain

Good thing I'm just the FL, so I can pick a tool that doesn't suck, and be done in an hour ;-)

Paul Boddie

Posts: 26
Nickname: pboddie
Registered: Jan, 2006

Re: Please Teach me Web Frameworks for Python! Posted: Jan 30, 2006 7:20 AM
Reply to this message Reply
Eugene, I think you're confusing my response (quoted below) with someone else's commentary.

I wrote:
> From what I've seen of Django and regular expressions,
> noting that I don't have any interest in the templating
> system (since I'm an adherent of XML-based templating),
> the principal application of regexps is in interpreting
> the path or URL when dispatching to a particular part of
> an application. I think this is an elegant twist on the
> way Zope and its predecessors did dispatching: the Zope

You wrote:
> If I understood your correctly your "Using Regexs to
> specify the UI" is your impression of how Django parses
> RESTful URLs. It is hardly "specifying UI". Whew.

That was someone else who said that it specified the UI. Although if you consider URLs to be a part of the UI, then regexps are used at least in that way, yes. As I said, I don't see that as a particularly bad idea given the interesting way it interacts with the publishing mechanism. The only downside is that regexps can look fearsome, but if you're comfortable with them then it could be an advantage.

I wrote:
> What I don't particularly like about Django and some
> other frameworks is the mandatory relational database
> system aspect. I've been involved in writing

You wrote:
> But you decided to singled out Django. ;-)

Yes, because we were talking about Django. ;-)

You wrote:
> I suspect "the mandatory relational database system
> aspect" (?) is what you called earlier
> "nightmare-in-waiting".

I didn't use that term - it was the other commenter. Whether it's possible or not to drop the RDBMS, my point was that people can be put off by any apparent requirement to use such a thing when they don't immediately see a need for it. Perhaps using an RDBMS as a session store and as the store for an object persistence system is good for some kinds of applications, and perhaps people picking up the technology should be introduced to that strategy as soon as possible, but I've seen the discouraging effect such things have on people.

When it comes to exposing technology decisions, Zope always had an interesting strategy: embed the persistence mechanism within the framework so that it is "just there" when you start everything up. Other frameworks also do this, and it could be an idea for Django and others to consider this (eg. embedding SQLite) to encourage people who don't fancy installing or administering a separate RDBMS.

You wrote:
> Thank you. It is always nice to talk to knowledgeable
> people, who make fair judgements based on facts and deep
> understanding of the material.

Well, I've looked into Django recently for various reasons, and although it isn't necessarily something I'm going to use very much, it does have some interesting features that merit further study.

Eugene Lazutkin

Posts: 15
Nickname: elazutkin
Registered: Jan, 2006

Re: Please Teach me Web Frameworks for Python! Posted: Jan 30, 2006 9:48 AM
Reply to this message Reply
> Eugene, I think you're confusing my response (quoted
> below) with someone else's commentary.

Paul, I am sorry. I cited the post in question and asked pointed questions hoping to get clarifications from the author (please re-read my original post), and you responded promptly. In fact nobody responded but you. I assumed erroneously that Doug and you is the same person. It happens quite often in our age of virtual identities. No wonder that your answers seemed like personal notes, rather than specific clarifications I asked for (please see my original post for details and the quote of Doug's post).

I apologize for the mix-up. It means that my questions are unanswered yet.

Thanks,

Eugene

Eelco Hoekema

Posts: 2
Nickname: eelco
Registered: Jan, 2006

Re: Please Teach me Web Frameworks for Python! Posted: Jan 30, 2006 10:29 AM
Reply to this message Reply
One thing i noticed reading all the comments is that hardly anyone mentions mod_python with PSP. Why is that?

I've looked at both Django and TurboGears, and it all looks really good. There's just one problem, both frameworks require me to install quite a few python packages. Now that shouldn't be a problem for anyone running their own server, but for me it is. There's no way my webhoster will let me install all those packages, and chances are slim that he will do it for me.

But he might/will/did install mod_python. And with that, there's a beginning of a web framework. But it seems none of the frameworks mentioned in this discussion has taken that as a starting point.

Bob Ippolito

Posts: 255
Nickname: etrepum
Registered: Nov, 2003

Re: Please Teach me Web Frameworks for Python! Posted: Jan 30, 2006 10:57 AM
Reply to this message Reply
> I've looked at both Django and TurboGears, and it all
> looks really good. There's just one problem, both
> frameworks require me to install quite a few python
> packages. Now that shouldn't be a problem for anyone
> running their own server, but for me it is. There's no way
> my webhoster will let me install all those packages, and
> chances are slim that he will do it for me.

Look at the docs for EasyInstall, it's possible and actually quite easy to install whatever you want, wherever you want. No need to deal with your ISP.

Luis Gonzalez

Posts: 5
Nickname: neuruss
Registered: Jan, 2006

Re: Please Teach me Web Frameworks for Python! Posted: Jan 30, 2006 1:21 PM
Reply to this message Reply
> One thing i noticed reading all the comments is that
> hardly anyone mentions mod_python with PSP. Why is that?
>
> I've looked at both Django and TurboGears, and it all
> looks really good. There's just one problem, both
> frameworks require me to install quite a few python
> packages. Now that shouldn't be a problem for anyone
> running their own server, but for me it is. There's no way
> my webhoster will let me install all those packages, and
> chances are slim that he will do it for me.
>
> But he might/will/did install mod_python. And with that,
> there's a beginning of a web framework. But it seems none
> of the frameworks mentioned in this discussion has taken
> that as a starting point.

Well, I was asking myself the same question...
For a long time, I steered away of mod_python because I used to think it was too difficult or limited, compared to other solutions.

A few days ago, I started using it and I found it to be great!
It has its own implementation of PSP (python server pages) for coding a la PHP (mixing python and html) or you can use its "publisher" combined with PSP templates for separating presentation and logic. It's also posible to create a full website with a single script by mapping functions to URLs.

I think this is great because mod_python is python embeded into Apache. It has excellent performance and doesn't need any framework or additional package to work, although you can use Cheetah, for example, if you want an alternative to PSP templates.

The good thing about mp is that it doesn't force you to use any specific package for each task. You can use any database for which a python api exists, or any template language you want, but in any case only mod_python is ok.

I still think this is not as flexible as Karrigell, for example, because its session handling is a little bit tricky, but you get a very good performance in exchange.

Being a buddying programmer who codes as a hobby in my spare time, I could write a shopping cart, a records pagination script and an authomatic CRUD interface script in just a few hours.
In hands of an experienced developer, I think mod_python can be a very powerful tool.

Morel Xavier

Posts: 73
Nickname: masklinn
Registered: Sep, 2005

Re: Please Teach me Web Frameworks for Python! Posted: Jan 30, 2006 4:14 PM
Reply to this message Reply
> One thing i noticed reading all the comments is that
> hardly anyone mentions mod_python with PSP. Why is that?
>
Probably because Guido was asking about web frameworks, and mod_python is not a web framework. Both Django and Turbogears (and, I guess, most other frameworks) can run on top of mod_python, just as they can run on top of CGI or FastCGI.

> I've looked at both Django and TurboGears, and it all
> looks really good. There's just one problem, both
> frameworks require me to install quite a few python
> packages. Now that shouldn't be a problem for anyone
> running their own server, but for me it is. There's no way
> my webhoster will let me install all those packages, and
> chances are slim that he will do it for me.
>
Unless the required packages are in C (and even then, you could manage to compile them on the server), you could probably just grab the packages from another machine (your dev machine for example), drop them on the server and add their directories to the server's PYTHONPATH.

Paul Boddie

Posts: 26
Nickname: pboddie
Registered: Jan, 2006

Re: Please Teach me Web Frameworks for Python! Posted: Jan 31, 2006 3:53 AM
Reply to this message Reply
XM wrote:
> Probably because Guido was asking about web frameworks,
> and mod_python is not a web framework.

In the sense that it provides an API for developers to write against (supporting most of the essential stuff, fashionable object-relational mapper ignored) together with a mechanism through which those developers can deploy their applications? Redesignating mod_python in this way sounds like convenient spin to me.

Bertrand Mansion

Posts: 5
Nickname: golgote
Registered: Jan, 2006

Re: Please Teach me Web Frameworks for Python! Posted: Jan 31, 2006 5:04 AM
Reply to this message Reply
I am really LMAO. Python's creator himself is wondering how to use Python for web development (a question I have been asking myself since I started learning the language one month ago).

Frankly, the language is really nice and I like it very much. But when it comes to creating web applications, it is really far behind PHP or even Ruby on rails.

As I said somewhere else, people working on frameworks for Python are wasting their time. Python doesn't have any way to deploy correctly in a web environment. You get mod_python, fast-cgi, cgi, apache proxy to lighttpd, etc. etc. None of them are well tested, clean, fast or easy to implement.

The Python community should instead try to define the right way™ to deploy on the web.

Python is not ready for the web and this is not going to change anytime soon.

Concerning web frameworks, the most interesting is colubrid. That's just IMHO, I don't like bloat.

Fredrik Lundh

Posts: 16
Nickname: effbot
Registered: Mar, 2005

Re: Please Teach me Web Frameworks for Python! Posted: Jan 31, 2006 5:20 AM
Reply to this message Reply
And the uninformed-troll-of-the-day award goes to...

Bertrand Mansion

Posts: 5
Nickname: golgote
Registered: Jan, 2006

Re: Please Teach me Web Frameworks for Python! Posted: Jan 31, 2006 6:10 AM
Reply to this message Reply
Thanks for the award.
Of course, it's easier to take it as a troll than to admit it's true.

Flat View: This topic has 104 replies on 7 pages [ « | 3  4  5  6  7 | » ]
Topic: Discovering Bad Java Smells Previous Topic   Next Topic Topic: New Libraries coming ...

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use