I am trying to enhance my knowledge in "design" aspects of Software (engineering), and I am more into Java world.
The first thing I came across was GoF book, which as per my understanding is the "core" or "foundation" design patterns (please correct if i am wrong in interpreting it).
I came across the following terms as i try to go in depth for getting the knowledge of design (patterns).
1) J2EE design pattern
.
2) Patterns of Enterprise application architecture
.
3) GoF patterns
.
I am bit confused as to why there are many design patters and which is used when? In particular, what is the difference between the patterns in #1 and #2?
Any explanation in simple words would be of great help.
Java Design Patterns are divided into three categories - creational, structural, and behavioral design patterns.
The J2EE design patterns pioneered by Sun Microsystems are a set of best practices for solving recurring design problems. Patterns are ready-made solutions that can be adapted to different problems, and leverage the experience of successful J2EE developers.
Just as there are many books on programming, there are many books on patterns; so the simplest answer to, "what is the difference" is: those three books were written by different authors.
The GoF book (3) was the first to apply the concept of patterns to software engineering, so in that sense, I think most people would agree that it was the "foundation" for subsequent, pattern-related work.
Do note that architectural patterns and design patterns are separate concepts, as architecture and design represent different levels of abstraction (architecture being a higher level).
Any detailed explanation of when to apply each of these patterns would require a much longer format than SO (hence the aforementioned authors' motivation to publish books) however, most if not all common patterns will have numerous individual threads on SO.
Finally, a key difference in J2EE Patterns is that they are language specific (Java) whereas the other two books are language agnostic.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With