There is a saying that a picture can speak thousand words. UML diagrams are those pictures which can speak all those words about your design. There are many categories of UML diagrams. However this note will contain only those class diagram components that are really required for representing your design decisions, design patterns and principles. [node:read-more:link]
Observer pattern is a behavioral design pattern where a collection of objects called observers listens for the state change of another object called subject. Observer pattern defines a one-to-many relationship between thesubjectand one or more of observers. The subject object maintains a list of its observer objects, and notifies those observers automatically if there are any state changes for the subject, usually by calling one method of the observer. [node:read-more:link]
The strategy pattern is a behavioral pattern that defines a family of algorithms, encapsulates each one of them and makes them interchangeable. According to this pattern, a different class is created for each interchangeable algorithm, and this class can be injected anytime, even at runtime.
There are different types of factory patterns like Simple Factory (Or Class Factory), Factory Method, Abstract Factory Method and Creator Method (Or Static Factory Method). Out of these, Factory Method and Abstract Factory Method are part of the GoF Design Patterns. All factory design patterns help you create objects without using the new keyword directly within your code. Concept is similar to any other real world factories: You use cars, but you don’t develop cars by your own. [node:read-more:link]
Design patterns gained popularity in computer science after the book Design Patterns: Elements of Reusable Object-Oriented Software was published in 1994 by Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides; and together they are called the "Gang of Four" or "GoF".
The GOF design patterns can be broadly classified into the following three categories:
This is a personal technical blog where we share our understanding on various concepts and is neither an official page or documentation for the products described here, nor the official views of the companies we work with.
Keywords used in this website are trademarks of their respective owners. This website is not affiliated with Oracle™ and/or any of the JEE frameworks like Spring™, Struts™, Hibernate™ and JSF™.
All contents and materials are provided freely without any warranty or liability and nothing within the site should be considered as professional advice. In any doubt, please ask, and we will try to help you based on our knowledge. Please let us know if you feel anything is not right here (including any copyright violation) and we will act upon it as fast as we can.