I was trying to understand the design patterns and their implementation within the Java library itslef:
I am bit confused when it comes to these two APIs:
- JDBC API: This API is said to implement Bridge design pattern.
Bridge pattern is a structural design pattern in software development that is used to decouple an abstraction from its implementation so that both can be modified independently. And if we stick to specification, we can easily replace one implementation with another.
- JPA: This API is said to implement ORM/Factory (EntityManagerFactory) design pattern.
As far as I know, if we stick to JPA specification then we can easily replace one implementation (ex. Hibernate) with another (ex. EclipseLink). Which means API and implementation can be developed independently.
So can someone please tell me why not JPA is also called to implement Bridge design pattern?
Aucun commentaire:
Enregistrer un commentaire