Best of Breed: TG’s job is hard. Here’s why.

In 2005 Kevin Dangoor made the decision to glue together a few existing technologies into something that would be useful for the creation of web pages.  This was marketed as the “Best of Breed” selection.  The challenge with Best of Breed is that the best is constantly in flux.  Also, making that claim requires TG to put in a serious amount of effort in _finding_ and evaluating the best of breed technology and then integrating them with TG.  This is a job I LOVE doing.  Even better than that, when I find something that doesn’t cut the mustard when it comes to being the best of things, I get to write it.

For example, when SQLAlchemy blazed on the scene, and TG was one of the first frameworks to support it.  My own frustrations with SQLObject lead to an early adoption of SQLAlchemy, and I never looked back.  This illustrates TG’s challenge succinctly.  In order to choose SA, I had to give up ModelDesigner and Catwalk.  For me, I just want to write code, not use a [buggy] web page to manipulate data or move pictures around to auto-generate my code.

In 2007 at Pycon, I tried in vain to make Catwalk work with SA.  It just wouldn’t happen.  This was the spark that lit the fire which has become the new TGAdmin, driven by Sprox.  The interesting thing here is that if the “Next ORM” is found, a reasonably small amount of code has to be written to make this happen.   We already have some successes with this with Sprox.

Let’s look at the template language choices you have as a TG developer.  TG started with Kid, and while this is a decent XML-oriented framework, if you used it in the early days if you are like me, you probably hit your head on the keyboard a few times for each complex page you tried to write.  www.percious.com still runs kid tho, and that’s important to note.  TG has not only to support new users who want to use new technologies.  We have to support those sites that are still running but want to migrate over to newer technology.  And I think we do a pretty good job of that, but again, this is a more difficult job than say a Dj-framework that has absolute control over the template language.

So, TG 1.1 will use SA and Genshi, the entire community decided to make the decision I made 3 years ago, that the usage of SA outweighs the benefits from Catwalk and ModelDesigner. Hooray!  Again, framework decisions made by committee are challenging.  This is what I LOVE about TG.  I didn’t have to wait 3 years for the community to catch up, I added SA to my stack of tools, and went  happily on my way.

Even the framework is not immune to TG’s “Best of Breed” mentality.  In 2007, while I was futzing with Catwalk, Mark Ramm hid in a room with Ben Bangert for a few hours and created what would become TG2.0.  We had been struggling with the changes that CherryPy 3.0 represented, and even though in some ways CP3 is a better back end server, we decided to use Pylons for our server level stuff because of the collaboration potential there.  Pylons is indeed a great platform for server-level development.

TG’s team spends an unbelievable amount of time evaluating what _could_ be the best of breed, and some things make the cut, some don’t.  Sometimes we even add stuff because it’s neat and we want to support it for that person who thinks it is the best of breed.  Sometimes folks come to us with a request to support what they believe is the best of breed, and we do the best to enable them to provide their solution as yet another way of using TurboGears.  ToscaWidgets is probably the best example of this.  If you look at the repository, you will see over 15 JavaScript library wrappers, and quite a few other libs that make creating web content easier.  Again, TG allows the developer to choose which JS library fits them the best.  For 2.0 we decided to leave that choice up to the developer.

In short, TG makes the choices so that you don’t have to.  We spend a lot of time examining new technologies, and exploring what _might_ work for you.  All of our developers use TG in real world applications that differ from giant source code repositories to scientific database management applications.  TG handles a diverse set of application in stride.

The next part in this three part series is entitled: “Best of Breed: TG is still the best choice for people who hate hitting the wall.” This will further express the flexibility of TurboGears and describe a bit about what we are doing to make it even easier to get started with TG.

14 Responses to “Best of Breed: TG’s job is hard. Here’s why.”

  1. Doug says:

    I am curious about the CherryPy/Pylons decision. Was it a matter of going in different directions? Your explanation is brief and the “collaboration potential” is a loaded phrase (as in, Pylons wasn’t collaborating more, yet, but CherryPy definitely wasn’t?”). As an outsider (I don’t use any web-frameworks, yet) I am curious about this in particular.

    Thank you for writing these posts, its very helpful to get a look “behind the curtain”.

  2. Jorge Vargas says:

    @Doug, the main reason was that pylons itself is written in a very similar way as TurboGears (modular packages) while CP is one big package. For example, Beaker (sessions and cache) and Routes (Url->method mapping) are two package created to build Pylons, while TG uses beaker a lot, it really discards Routes and it’s “way of doing things”. In Cherrypy land all that is done by the same, and even though it’s easy to add in your own dispatch to CP3 integrating Beaker was not so easy and Beaker is considered to be a better session package than CP’s.

  3. Anon says:

    Really appreciate the work you have shared Chris.

  4. Chris says:

    As an example of the dedication to continue to support the old components, we just issued a release candidate of TG 1.1. This is the evolution of the codebase of TG 1.0 but using the SQLAlchemy and Genshi (and ToscaWidgets, if you want) by default.

    But here’s the cool thing: TG 1.1 is almost 100 percent compatible with TG1.0 and still fully supports SQLAlchemy and Kid. So porting your applications should be *very* simple, if any changes are needed at all. Check it out at http://turbogears.org

  5. Hello, I hope every thing is going good for you? Thanks for this great information. I hope I can find some help from your website as I learn how to earn extra money at home.

  6. The next time I read a weblog, I hope that it doesnt disappoint me as a lot as this one. I mean, I know it was my option to learn, but I really thought youd have one thing fascinating to say. All I hear is a bunch of whining about one thing that you could possibly fix in case you werent too busy in search of attention.

  7. I hve been toevallig op uw blog betreden satisfied de hulp van Google Research

  8. Del says:

    Remarkable information! I have been looking for things similar to this for a while now. With thanks!

  9. Loni Cloward says:

    you are my inhalation , I own few web logs and occasionally run out from to post : (.

  10. Just desire to say your article is as astonishing. The clearness in your post is just excellent and i could assume you are an expert on this subject. Well with your permission allow me to grab your RSS feed to keep updated with forthcoming post. Thanks a million and please carry on the enjoyable work.

  11. You got a very nice internet site

  12. These steps is often truly helpful for a number of people out there. Many thanks sharing these. Lets go on posting more informative articles in the future.

  13. Jasper says:

    Thank you for the sensible critique. Me & my neighbor were just preparing to do a little research on this. We got a grab a book from our local library but I think I learned more from this post. I am very glad to see such great information being shared freely out there.

  14. Maynard says:

    This really is a thing I need to find more information about, thank you for the post.

Leave a Reply