Repository Pattern vs Facades Pattern – Differences

design-patternsrepository

I've always used the repository pattern in my applications. But I have seen that many people use facades instead of the repository for naming convention, but the operation is the same, I Think. Why is there this difference? There are a real difference between them or not?

Best Answer

A facade is more general than a repository.

A facade can apply to anything that is not persistence based, whereas a repository is supposed to encapsulate access to an underlying source and make it look like an in memory data source.

Facades are for creating a simple interface for some other, complicated interface.