Repository pattern is a famous (or infamous?) pattern that we can find in Martin Fowler’s Patterns of Enterprise Application Architecture.
It was meant to be used as an interface to a collection, but what I have seen more often is that it becomes an abstraction to the data layer or ORM framework.
Not so long ago I did a presentation on Who killed object oriented programming, and I mentioned the
Repository implementation as one of the culprits.
So what’s so bad about it? What can we do to improve it?
I have a counter-proposal: What if we don’t need it at all?