Over the last few days I've been evaluating Pylons, because I'm having some trouble making TurboGears behave with SQLAlchemy.
The first thing that I noticed, was the awesome thru-the-web-debugger which pops up in your browser when your code raises an uncaught exception. Wow. That's gonna come in handy.
The other great thing is that Pylons doesn't try to look after your database for you. You've got to handle all that yourself, which is great, because I want to be responsible for that code. The good news is that most of my TurboGears model could be copied straight over into Pylons, and it just worked.
One thing I don't really like about Pylons, is routes. I know I'm going against the grain here, but I prefer to override CherryPy's .default method rather than write a bunch of strange looking rules. In the end, thats probably what I'm going to do with routes. Just route every request to my own dispatch method, which, even though some may consider it hairy, provides a cleaner URL. I don't believe http methods belong in a RESTful URL, which is what routes seems to want to do.
Wednesday, March 28, 2007
Subscribe to:
Post Comments (Atom)
Popular Posts
-
These are the robots I've been working on for the last 12 months. They each weigh about 11 tonnes and have a 17 meter reach. The control...
-
So, you've created a car prefab using WheelCollider components, and now you can apply a motorTorque to make the whole thing move along. ...
-
The procedural planet package has been updated to version 1.4, and you can see the new demo here . It features better city light control, be...
-
Why would I ask that question? Python 3 has been available for some time now, yet uptake is slow. There aren't a whole lot of packages i...
-
I've just finished refactoring an awful C# class. I had been delaying the job for a while because I didn't want to do it. Then, whil...
-
Summary: NodeJS wins. Test Program ab -n 10000 -c 5 http://localhost/ Gevent Code from gevent import wsgi class WebServer(object): def a...
-
Often, when building a game, you need to test if objects are colliding. The objects could be spaceships, rocks, mouse pointers, laser beams....
-
Dear Lazyweb. Imagine a nice RESTful interface for working with Tags. The URL: /tags/ will return a list of all the tags. The URL: /tags/fo...
-
I have just spent an hour trying to track down a weird bug in some Javascript interpolation code. The offending code looks like this: var n ...
-
I've built sites with Django, TurboGears and Pylons. I've come to prefer Pylons. Why? Pylons gets out of the way, and stays out of t...
3 comments:
If you're looking for REST, that is in Routes and there's a Pylons controller template to give you a good head-start.
Routes information on RESTful resources and then try paster --help restcontroller inside your project directory to see how to have it create a RESTful template controller. Routes has quite a bit of REST-based evaluation, allowing you to conditionally dispatch to your controller's actions based on the HTTP method.
Cheers,
Ben
You should also check out bare CherryPy, which makes no assumptions about your DB layer. CherryPy 3 completely decouples and objectifies handler dispatch, so you can tweak that part to your religious heart's content. ;) See http://www.cherrypy.org/wiki/PageHandlers and http://tools.cherrypy.org/wiki/CustomDispatcher
What about cleverharold ?
Post a Comment