Tag Archives: CherryPy

AACS Meeting Summary

October 4, 2006

Mark Ramm discussed TurboGears at the Ann Arbor Computer Society meeting this week. The crowd was mostly unfamiliar with TurboGears, and most were unaware that it was conjured up and written here in Ann Arbor (well, at least originally … it’s open source, so it’s now getting contributions from all over the world).

Most people know about Ruby on Rails, so he contrasted the frameworks a bit. Basically, Rails is a highly integrated, single piece of software. It uses some naming conventions, and if you follow them, things will just line up and work. But the magic can be a bit disconcerting for some. Features are either provided via Rails, or not available within the framework. That’s the beauty and cost of a single piece of software.

TurboGears doesn’t follow naming conventions. It’s a mega web framework. It combines best of breed tools in Python to support web development. This allows for components to be traded out and replaced with newer, better components, if they become available.

The heart of TurboGears centers around the following components:

SQLObject – an Object Relational Mapper

CherryPy – web server: manages request/response cycle

Kid – templating system, xml-based, guarantees well-formed output

MochiKit (pronounced Mo-chee-kit) – library for Javascript/AJAX, making it easier to write clean javascript

Templates can be made to look really simple by using and extending the master.kid file. Actually, you can have several master.kid files, and use appropriately in different parts of the application.

For deployment, the easiest path is in using CherryPy, proxying with IIS or Apache (using mod_proxy or mod_rewrite). You can also use mod_python, but Mark sees the other options as simpler.

Webfaction has good shared hosting for TurboGears apps. Currently, their control panel only creates 0.8.9 TurboGears apps, but if you ask the webfaction staff will send instructions about installing the newly released 1.0b1 for use with webfaction. They also help to support the TurboGears project.

From a commercial licensing standpoint, there are no hindrances to using TurboGears. It uses the very liberal BSD-style license, which allows you to write applications using TurboGears for commercial use.

Widgets are provided, to reduce work for the developer. Kid produces designer-friendly templates, that can be edited in programs like Dreamweaver without perturbing the python constructs (since Dreamweaver ignores them), but allowing the designer to see placeholders when testing layout without running a web server.

A question from the audience asked Mark to compare with ASP.NET. Basically, he said that you can do anything in ASP.Net that you can do in TurboGears but that you will have to write more code in ASP.NET. Maybe we will see some head-to-head comparisons at CodeMash in January.

Future Directions in TurboGears:

1.SQLAlchemy will replace SQLObject as the default object relational mapper in the future. It does everything that SQLObject does, and more. Needs a bit more work to simplify the definition to match that of SQLObject
2.Genshi will replace Kid as the default templating system. It uses pretty much the same syntax but is about 40% faster.

Documentation options:

1.Mark’s book (Rapid Web Applications with TurboGears) is going to be published in November. Half of the book is now available, on Safari Rough Cuts.
2.The latest issue of Linux Magazine has an article on TurboGears, written by Mark Ramm. It doesn’t appear that it’s available online. Here’s a summary of that article: http://compoundthinking.com/blog/index.php/2006/09/22/turbogears-in-linux-magazine/
3.TurboGears DVD contains screencasts and can be purchased on the TurboGears website.
4.Docs are available on the TurboGears website.

Examples of high traffic sites that run TurboGears:

www.diggdot.us: Combines Digg, slashdot, and de.licio.us into a unified format

www.rpath.com : Linux software appliance company

Next month at AACS: Scott Collins, from the Mozilla project, talking about the design and application of programming languages.

LaraBars

A quest for good food and even a Python reference.

When I was in Crested Butte for Bruce Eckel’s Programming the New Web conference (and therein lies the only hook that this will have to a technical topic), I picked up some Larabars at the local grocery store, for a quick snack. And since then, I have been on a quest.

Larabars taste great and they meet my “rules”. I’m one of those pretty wacky people who reads food labels before buying anything. And larabars totally meet my criteria … no added sugar (and no CORN SYRUP), no partially hydrogenated oils, no preservatives. So what DO they contain? Fruit and nuts. That’s it. They’re NOT cooked; they’re NOT processed. Naturally occurring Omega 3’s! Omega 6’s! Oleic acid! This is good stuff!

And with decadent names that will make you feel GUILTY! Cherry Pie, Cashew Cookie, Chocolate Coconut! And for the programmers among us, try CherryPy (sic, sneaking in another technical reference!).

Luckily for me, our local grocery store carries them. Otherwise, we would have had to move to Colorado. My favorite larabar flavor that my local store doesn’t sell: Ginger Snap. My husband would go NUTS for Ginger Snap (but I ate the only one I brought home from CO so he’s gonna have to wait to try it).

(My other food hangup: Styrofoam cups. They freak me out. In Crested Butte, Camp4Coffee has paper cups. Ah! Heaven!)

Back to programming … snack time is over.

Larabars website
All the yummy details
Larabars in the news
An article about larabars
Styrofoam cups
Or why I love paper cups