<div dir="ltr">I have found that making a generic interface for my projects tends to be a premature optimization and unless the project needs swappable databases, a proxy module tends to be overkill. <div><br></div><div><div>
The approach I take is to write a module that has an API that hides the details of the implementation. </div><div><br></div></div><div>That way in the future, if the need arises, I can completely rewrite the implementation without having to refactor the clients of the API. I can add connection pooling, or completely replace the database with something else.</div>
<div><br></div><div>Eric Moritz.</div></div>