Re: ajax cookbook suggestion

2012-01-12 Thread Jonathan Vanasco
I'm PERSONALLY not a fan of traversal , or of having that super REST oriented stuff. For short projects, like an ad campaign or prototyping a demo, i think its fine. For long term stuff, ajax functionality and requirements change.. so I prefer to just support a versioned API and consolidate

Re: ajax cookbook suggestion

2012-01-11 Thread lostdorje
Thanks for the response... I'm using Pyramid with traversal for view lookup. It works well because I always have a context (in my case this is usually the db model object that the ajax request is done on), which is very handy. Because of this I'm not sure I want to have a specific url (eg: api-

ajax cookbook suggestion

2012-01-10 Thread lostdorje
Great to see the docs getting updated all the time! Hadn't checked them in a while and a lot has been added. One thing I'd love to see is a cookbook example of how to structure urls (for both traversal and url route apps) and how to write views for ajax requests. I'm not sure I'm taking the

Re: ajax cookbook suggestion

2012-01-10 Thread Jonathan Vanasco
As a matter of preference, I like to treat ajax in my pylons/pyramid apps in a very structured and repeatable way... 1. everything hits /api-public/versionX or /api-internal 2. i use a standard response object / formatting 3. i wrap everything in a try/except 4. i commit/rollback the return