creating an abstraction layer class to manage resources

2012-02-18 Thread Fabio Dive
Hello all, I am not a pyramid expert and I am doing my best to develop further skills. Maybe my idea was already solved in a more elegant and more convenient way, so please, if you know that, answer me, it will be very appreciated. I am developing a project with SQLAlchemy and Beaker Session,

Re: creating an abstraction layer class to manage resources

2012-02-18 Thread Jonathan Vanasco
i tend to structure applications - python, php, whatever - like this: - I use multiple Database Handles. This is always at least a reader and a writer. On the database level, the reader is privileged to only select from databases, while the writer may read and write. If the application needs a

Re: creating an abstraction layer class to manage resources

2012-02-18 Thread Fabio Dive
On Sat, Feb 18, 2012 at 18:14, Jonathan Vanasco jonat...@findmeon.comwrote: i tend to structure applications - python, php, whatever - like this: - I use multiple Database Handles. This is always at least a reader and a writer. On the database level, the reader is privileged to only select

Re: creating an abstraction layer class to manage resources

2012-02-18 Thread Jonathan Vanasco
i personally wouldn' do that, because my SqlAlchemy classes are really just used for populating a read-only cache -- which is a dict -- and creating/editing records. in your case... and I'm just thinking out loud... 1. you could create an abstract class called CacheBacked, which your