[melbourne-pug] web framework advice

Mike Dewhirst miked at dewhirst.com.au
Wed Apr 12 08:50:35 CEST 2006


Ryan Kelly wrote:
>>> I'm looking for a web framework. Does anyone have experience with any of 
>>> the following ...
>>>
>>>     WebWare
>>>     TurboGears
>>>     Karigell
>>>     Others I haven't looked at but you have
> 
> 
>  I have used TurboGears to build my personal website (see link in my
> sig) and was very pleased with it.  The combination of Kid templates and
> the CherryPy publishing model was a very good fit for my head - it all
> just made sense.  I cant speak to scalability or performance really, but
> it did find development quick and painless.
> 
>  My setup uses sqlite as the relational database simply because I don't
> need anything more powerful - but moving to another database would be a
> one-line configuration change.

Presumably it is DB 2.0 compliant.

> 
>  I have the cherrypy standalone server running on localhost:8080, with
> apache forwarding requests to it via mod_rewrite.  Works a treat.  I
> believe other deployment options are possible.

WebWare uses a similar approach with mod_webkit which knows about the 
webkit application server.

> 
>  Don't forget the 20-minute-wiki screencast if you want to get a feel
> for operating  under turbogears:
> 
>     http://files.turbogears.org/video/20MinuteWiki.mov

I'll check that out tonight.

> 
>> I have heard that TurboGears is brilliant but I worry about "magic" (I 
>> read that as complex) glue between componentry supplied by different 
>> teams. 
>>
> 
>  For the most part, read "magic" as "it just works seamlessly and
> painlessly".  I've found the magic to be pretty low complexity for the
> most part.  Quick example of the magic:
> 
>    * in vanilla CherryPy, you expose methods  like so:
> 
>             @expose
>             def some_page():
>                return "page contents"
> 
>       Your methods return strings containing the page contents.
>    
>    * in TurboGears, your exposed methods are associated with a template:
> 
>            @expose(template="mysite.templates.main")
>            def some_page():
>                vals = {}
>                vals["title"] = "Page Title"
>                vals["body"] = "Body Contents"
>                return vals
> 
>       They return a dictionary of values that automatically appear
>       in the namespace of the template, ready to be inserted.

OK I think I understand this. My home grown efforts are structured along 
similar lines. I used ordinary html pages (made with dreamweaver) as 
templates and a dictionary to collect and/or populate cgi variables. I 
had to build a method to merge the dictionary into the page which I read 
off disk into a list and then served.

> 
>   I think this is a great combination of two powerful technologies.
> 
>   So, TurboGears gets a thumbs up from me.  My original website was
> written directly using CherryPy + a templating engine (SimpleTAL), which
> was fun but a lot of work.  Moving to TurboGears made things much
> easier.  I haven't tried other frameworks for comparison purposes.

It seems to me that WebWare is a complete system built with all (or 
most) components intended to interface in a more or less purist python 
OO manner. At first glance it feels sort of heavy duty in that it is 
layered like the MVC pattern intends. I just don't know enough python or 
OO or patterns to make valid judgements about the amount of work. I 
certainly like the *idea* of doing things in a purist way.

> 
>   A few words of warning though:
> 
>    * TurboGears functionality is scattered throughout the namespaces of
> its componenets.  In order to do simple things, you often need to access
> modules under the turbogears, cherrpy, and sqlobject packages.
> Understandable why this is the case, but confusing to read...

I'm easily confused at the best of times ...

> 
>    * TurboGears is growing quickly.  There is an upcoming 0.9 release
> featuring loads of wacky new functionality like Widgets (very neat
> looking, by the way), CRUD data management, etc etc etc.  Expect some
> API breakage on the way towards version 1.0
> 
>    * According to rumour, some people find Kid templates abominably
> slow, some people find them really fast.  It's been fine for me, but
> then I'm not exactly serving millions of hits on my personal site :-).
> YMMV, but be prepared for the possibility of a lot of template tweaking
> if you want good performance.

Maybe I need to learn about kid. Webware mentions them too. They have a 
kidkit whatever that might be.

> 
>   Please let us know what you end up choosing, and what you think of it
> a few months down the track :-)

Certainly. However, I would love to hear about any comparisons anyone 
has seen around.

Google turned this up for me ...

http://mail.python.org/pipermail/baypiggies/2005-December/000051.html

http://www.blueskyonmars.com/2005/09/21/turbogears-on-day-4-and-some-jeremy-jones-commentary/

The bottom line of most things I've seen on the web is that TurboGears 
and Ruby-on-Rails are the "happening" things. I'm more interested in 
choosing a technology in which to invest my limited time/brainspace.

Thanks Ryan

Mike

> 
> 
>   Cheers,
> 
>      Ryan
> 
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> melbourne-pug mailing list
> melbourne-pug at python.org
> http://mail.python.org/mailman/listinfo/melbourne-pug



More information about the melbourne-pug mailing list