We covered the data-access object pattern in the previous section and looked at how this pattern makes an abstraction of the data access logic from the business tier. However, the data-access object pattern is a stateless pattern that does not save states and intelligence inside them. Some problems have a complex relationship between data, and the data persistence needs to be done through an intelligent process. To promote this feature, the data-access object pattern does not attend. This is because DAO shouldn't maintain states, shouldn't contain any intelligent processes, and need only contain a process for saving or updating. To solve this problem, the domain-store pattern was created—a pattern that can add functionalities to DAO.
The domain-store pattern is a pattern that makes the...