[erlang-questions] How to code against an interface rather than an implementation?
Tue Aug 13 17:46:07 CEST 2013
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.
The approach I take is to write a module that has an API that hides the
details of the implementation.
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
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions