Scenarios and Questions
In Java programs, it is often necessary to persist data and obtain persistent data, but there are many problems in the process of data persistence (such as different data sources, different storage types, different suppliers, and different access methods). etc.), how can I use a unified interface for data persistence operations?
solution:
Understanding of DAOs
1. DAO actually uses the combined factory mode to solve problems, and does not bring new functions, so what you learn is actually an idea.
2. DAO theoretically has no limit on the number of layers.
3. The layers of DAO are theoretically not sequential.
The essence of the DAO pattern
One layer shields one change