Hi,
I run a pylons-based website, and we are now planning to expand to
mobile web and also expose an API.
I have written the site in a standard pylons way:
Models + logic + controllers + templates
Controllers do all the validations/rendering/etc, while logic implements
the actual functions to do the actions like creating an account or
searching for something. My models classes are pretty light weight with
almost nothing in them except class definitions for various database tables.
Now, as I am planning to have different front-ends to the website (api
and mobile), i am looking at what might the best practices for doing
this. Basically, I can move everything to logic, and throw exceptions
from there, but I would ideally like to keep logic separate from any
web-related stuff (like requests or cookies).
What I am leaning towards right now is to create a set of 'logic
controllers', which does all these things, and then extend the actual
controllers for web/mobile/api from there. I will still have to figure
out how to deal with validators and such, as formencode @validate is
helpful if you use HTML or similar.
Any suggestions will be great!
Thanks,
DD.
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en.