[melbourne-pug] web framework advice

Ryan Kelly ryan at rfk.id.au
Wed Apr 12 04:08:32 CEST 2006


> >
> >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.

 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.

 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 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.


  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.

  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...

   * 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.


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


  Cheers,

     Ryan



-- 
Ryan Kelly
http://www.rfk.id.au  |  This message is digitally signed. Please visit
ryan at rfk.id.au        |  http://www.rfk.id.au/ramblings/gpg/ for details

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
Url : http://mail.python.org/pipermail/melbourne-pug/attachments/20060412/a855e3e8/attachment.pgp 


More information about the melbourne-pug mailing list