October 2017
Intermediate to advanced
396 pages
10h 2m
English
As we know, there are a lot of design patterns that play a role in the Spring Framework. As discussed in Chapter 2, Overview of GOF Design Patterns--Core Design patterns, the Factory pattern is a creational design pattern, and it is used to create an object without exposing the underlying logic to the client, and to assign a new object to the caller using a common interface or abstract class. You can make the DAO pattern highly flexible by using the Factory method and Abstract Factory design patterns.
Let's see in our example where do we are implementing this strategy in which a factory produces the DAOs for a single database implementation. Please refer to the following diagram:
Read now
Unlock full access