Search code examples
javajakarta-eedesign-patternsecb-pattern

Java EE 6 Design Patterns


I would like to know about the design patterns that can be applied in Java EE 6 implementation.

  • MVC.
  • GOF.
  • DAO
  • Persistent relational mapping
  • Pooling
  • CEC
  • Entity control boundary (ECB)
  • and many others

Do JPA eliminate the use of DAO?
Please provide other patterns that can be learned.


Solution

  • If you use Java EE 6 (not Java EE 5), then some of technical J2EE patterns are not needed anymore for the task they are used in J2EE.

    For example, use injection instead of ServiceLocator.

    @See http://pawelstawicki.blogspot.com/2010/07/review-real-world-java-ee-patterns.html


    GOF patterns still required, because they are not (only) related to Java EE.

    In general: Patterns have an intend: they want to produce a solution/best practice for an problem, with a given set of functionality that is proviced by the environment (In your case: it is Java, Java EE 6, ...)

    • If the problem is gone a way: you do not need the pattern anymore
    • If the environment has changed since the pattern is fond, then you have to rethink the pattern, because may the problem is gone (first point), or there is now a better way the handle the problem.