I gave Pylons a try today, followed the turorials, read some
documents, and compared it with my current Python web frame work of
choice: TurboGears.
Though many people say good words for pylons, I believe TurboGears is
still a good choice for me at this time:
- TG is one year older than Pylons, which means more stable most of
the time - TG comes with more tools that is handy. Say for
internationalization, TG is much easier. It can handle strings in
both the Python files and template. It also do the language choose
automatically. - The major difference between the two is the dispatching
mechanisms. Though Pylons’ URL matching is more flexable, I found
the TurboGears tree like structure quite nature, as some one from
Quixote. - TurboGears comes with AJAX support
- TurboGears comes with a good widget library, and many more in the
cogbin. ToscoWidgets, which is seperated from TurboGears, will be
used in the future release of both. And for sure it will be much
easier to switch to ToscoWidgets from TG than from Pylons. - One thing TG lakes is the caching. However when it comes in a
future release, I can benefit from it with little or no change of
my application code. - TG returns a dict/JSON from the controller. This seperates the view
and controller, and makes multiple views (say HTML and RSS feed)
quite easier. While the “c” global accross controller and templage
is, well, rather urgly from my point of view.
Tags: turbogears, pylons, python
Comments 1
Hey!
Here are some random comments on this:
- Pylons have inherent AJAX support, see:
http://docs.pythonweb.org/display/pylonscookbook/Getting+started+with+AJAX
- I agree that routes (pylons’ url matcher) is ugly, but not as ugly as django’s (pure regexps!) though!
- I guess pylons can return json natively (but i don’t have the pointers for that) but it doesn’t really matter when we have tools like simplejson.
- I agree 100% that it sucks not being able to handle i18n the templates (pylons), but I think/hope this may change with mako replacing myghty.
- Lastly, I didn’t write a single piece of TG code (shame!), but I think pylons looks like more of a framework, where TG looks like a collection of APIs.
Best wishes.
Posted 10 May 2007 at 9:51 am ¶Post a Comment
You could use <code type="name"> to get your code colorized