Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×

Web Development with TurboGears and Python 43

rdelon writes "TurboGears was previously mentioned here as "Python on Rails". It has since made tremendous progress and is now a popular Python web MVC framework (along with Django). IBM developerWorks just published a great article about TurboGears and a book is on the way. Unlike Rails and Django, TurboGears is made up of several pre-existing subprojects. One of the great features of TurboGears is the 'toolbox,' which allows you to configure and check various aspects of your application and database in a browser."
This discussion has been archived. No new comments can be posted.

Web Development with TurboGears and Python

Comments Filter:
  • by aymanh ( 892834 ) on Thursday July 13, 2006 @12:47PM (#15713311) Journal
    Excellent! For those who (like me) can't decide which Python web framework to pick and learn, this is a two-part series on both Django [ibm.com] and TurboGears from IBM, one can learn the basics of each one and decide.
  • by Ursus Maximus ( 540370 ) on Thursday July 13, 2006 @12:58PM (#15713370) Homepage
    Both TurboGears and Django are excellent. Furthermore, each has strengths for different kinds of projects, with TurboGears at its best for web applications and Django for big, industrial strength web content sites. Twisted and Zope are great too, but for most developers, Django or TurboGears is going to suit them best. Both are under rapid, well coordinated development and are proven solutions that will scale well over time. TurboGears' best of breed component approach is, in my opinion, a winning strategy, especially in the Python community since Python is blessed with so many great projects (some people think too many projects), giving a plethora of high quality, well maintained and best of breed components for TurboGears to choose amongst. There are multiple good tutorials on both frameworks here, http://www.awaretek.com/plf.html [awaretek.com] , as well as related podcast material about TurboGears and related Python material.
  • by Senzei ( 791599 ) on Thursday July 13, 2006 @01:21PM (#15713483)
    As a counterpoint from someone who uses TurboGears, I would say that their community is in about the same state. Generally at least one the TG devs is able to handle issues with a given component, and if not there is an entire community dedicated to just that platform. Ultimately I see the TurboGears design philosophy as an extension of the unix "do one thing well" mentality. The usefulness and applicability of this in web development is a matter of personal opinion, but I think it still holds well.

    Ultimately though there is enough room in the Python world for a few different web dev stacks. Django and TurboGears both focus on slightly different problem spaces. Django seems more CMS-oriented while TG is better at web apps; obviously this is speaking in generalities, they are both useful for either.

  • Python to Ruby (Score:2, Informative)

    by Boone^ ( 151057 ) on Thursday July 13, 2006 @01:57PM (#15713684)
    I've been using Python for scripting glue at work for about a year now, but I recently had a small side project come up that was better served having a web interface to a database. Like everyone else, I downloaded/installed Rails. I had given Django a peek, but given that this is a side project, I didn't have the time nor energy to keep up with a rapidly developing platform. Django's website cautions about framework upgrades until 1.0 when the base API will be locked, so I went with Rails. Other than learning yet-another-scripting-language, using Rails (without even really understanding it) hasn't been much of an issue.

    Choice is both good and bad, in my opinion. It sounds like TurboGears and Django specialize in different things, when it would be preferred for occasional users like myself that there were one clear winner that was evangelized and well supported for all applications. Perhaps out of this competition this will happen for both platforms -- this is where choice is good!
  • Re:License? (Score:3, Informative)

    by Patrick Lewis ( 30844 ) * on Thursday July 13, 2006 @08:42PM (#15715828)

    The main TurboGears stuff is MIT licensed. Various components have their own (open source) licenses. LGPL (SQLObject) is the most restrictive one, but that can be swapped out with SQLAlchemy (MIT), if necessary.

    http://www.turbogears.org/about/license.html [turbogears.org]

  • by fforw ( 116415 ) on Thursday July 13, 2006 @09:50PM (#15716131) Homepage

    While the article mentions Catwalk (toolbox app to set up initial database objects) it does not mention some of the very nice new features in Turbogears 0.9a6 [turbogears.org] (supposed to be real close to 1.0 now):

    • Identity Management
      The turbogears quickstart can now create a set of customizable standard classes to handle standard authentication and authorization. A User Group Permission model coming with easy-to-use identity decorators for exposed methods. ( Identity Management Documentation [turbogears.org] )
    • Widgets / Forms
      A system to create reusable Form Widgets (with optional scripting / styles) and to use them in forms -- including support for error display and data retention.
    • Internationalization support
    • Optional support for SQLAlchemy instead of SQLObject
    The newly added toolbox offers the following tools:
    • Catwalk (mentioned in the article)
      Database tool meant to ease the creation of initial data. Sure, you can always just use plain SQL to set them up, but managing relations between tables can be slow and bothersome, especially for N-to-M relations (RelatedJoins in SQLObject terms)
    • Model Designer
      Toolbox tool helping to design your models. (Showing diagrams etc)
    • Web based python console
    • Widget Browser
      Allows browsing through all available Widgets with working examples, example code and configuration help
    • admi18n localization tool
      Tool to collect internationalized strings and create new language catalogs

    I started playing around with Turbogears some time ago and like it very much. The documentation is a bit thin at times, but the source code is easy to read and accessible (using ipython to interactively explore things also helped a lot.) I implemented my blog [fforw.de] in python and had only minor problems. And the code size also turned out to be relatively small.. For the metrics fetishists:

    Blog with tagging, User handling (subscription, email confirmation etc), Image handling (upload, admin, thumbnails), atom feeds (general + tag based feeds) plus some minor things:

    • python code : 1181 lines, 40762 bytes
    • kid templates : 610 lines, 21200 bytes
    plus some style sheets, javascript code and images..
  • by SimHacker ( 180785 ) * on Friday July 14, 2006 @01:40AM (#15717040) Homepage Journal

    Guide van Rossum writes [artima.com]:

    Re: Which was chosen?
    Posted: Apr 21, 2006 6:46 AM

    I'm using Django templates and am very happy with them. I've not had time to compare and contrast it to other frameworks, or even to try out other parts of Django. I do have to say that I am very happy with the way the Django project is being managed; they seem to really "get" open source community projects. I also like WSGI and Phillip Eby's wsgiref implementation, which has been made a part of Python 2.5.

    I've decided not to officially endorse a particular web framework; it would be way too big a responsibility. I do recommend that web developers (I'm still not much of one) get together, share experiences, and ask the web framework developers to standardize low-level APIs in additionn to WSGI (PEP 333). Also, I recommend setting up a wiki page where web frameworks are compared and contrasted, as a service to prospective users.

    So no, he doesn't prefer Django. It's official: he makes no endorsement whatsoever, except for the low level WSGI standard. He's using Django for at least one application, but he encourages people to compare and contrast all web frameworks.

    -Don

Neutrinos have bad breadth.

Working...