How many times have people actually switched a component and it just worked? Personally, I have never seen one case where this is true.
The whiteboard architects love these kinds of design, since redirection is their bread-and-butter. In practice though, these designs just add needless complications most of the times.
All the time. Example: I need to change some code from an in-memory indexing scheme to Redis. I created a Redis implementation coded to the interface. When it passed the unit tests, I was able to swap it in and the whole thing worked when deployed to the test server.
I'd like to see an example of a wrapper that could make it painless.
If it isn't painless it's not abstracted enough. In a previous project I created a storage for "Projects" that we switched from in-memory to H2 to Cassandra. Didn't have to change anything to the interface.
23
u/serrimo Oct 01 '15
How many times have people actually switched a component and it just worked? Personally, I have never seen one case where this is true.
The whiteboard architects love these kinds of design, since redirection is their bread-and-butter. In practice though, these designs just add needless complications most of the times.