Implementing Hibernate DAOs

Christian Bauer at the Hibernate team blog has written an improved version of the DAOs of the Caveat Emptor application of the Hibernate in Action book. This new versions will probably be included in the second edition of the book. The new DAOs are implemented in Java 5 using generics and other Java 5 features. […]

continue reading Implementing Hibernate DAOs

Refactoring from Template Method to Strategy can reduce code duplication in unit tests

Ivan Moore has a great post “Replacing Inheritance with Composition” at his blog, that explains how when you refactor your code from using Template Method to using Strategy can reduce the code duplication in your unit tests and also make your tests simpler. Both patterns, template method and strategy, try to solve the same problem. […]

continue reading Refactoring from Template Method to Strategy can reduce code duplication in unit tests