Posts

Factory Pattern from Head First Design Patterns

This post is available on: http://www.javaguides.net/2018/07/factory-pattern-from-head-first-design-patterns.html Hi, I am  Ramesh Fadatare  from India, a founder, author, designer and chief editor of a  website   JavaGuides , a technical blog dedicated to the Java/J2EE technologies.  If you like my articles/guides then connect with me directly on   Google Plus ,  Facebook ,  LinkedIn ,  GitHub , and  StackOverflow . Please comment if you have any suggestions or feedback about my articles would be appreciated. Happy learning and keep coding !!!.

Observer Pattern from Head First Design Patterns

In this post, we will learn simple Observer Pattern implementation with examples from Head First Design Patterns Book. Read more on: http://www.javaguides.net/2018/07/observer-pattern-from-head-first-design-patterns.html

Facade Pattern from Head First Design Patterns

This post is moved to: http://www.javaguides.net/2018/07/facade-pattern-from-head-first-design-patterns.html

Template Pattern from Head First Design Patterns

This post is moved to : http://www.javaguides.net/2018/07/template-pattern-from-head-first-design-patterns.html

Decorator Pattern from Head First Design Patterns

This post is moved to: http://www.javaguides.net/2018/07/decorator-pattern-from-head-first-design-patterns.html

Creator GRASP Pattern

Image
Creator  is the  GRAS Patterns (General Responsibility Assignment Software Pattern) Read about GRASP Patterns:  GRASP Patterns Overview Problem   Who should be responsible for creating a new instance of some class? The creation of objects is one of the most common activities in an object-oriented system. Consequently, it is useful to have a general principle for the assignment of creation responsibilities. Assigned well, the design can support low coupling, increased clarity, encapsulation, and reusability. Solution    Assign class B the responsibility to create an instance of class A if one or more of the following is true: ? B aggregates A objects. ? B contains A objects. ? B records instances of A objects. ? B closely uses A objects. ? B has the initializing data that will be passed to A when it is created (thus B is an Expert with respect to creating A). B is a creator of A objects. If more than one option applies, prefer a class B which aggregates...

Controller GRASP Pattern

Image
Controller  is the  GRAS Patterns (General Responsibility Assignment Software Pattern) Read about GRASP Patterns:  GRASP Patterns Overview Problem Who should be responsible for handling an input system event? An input system event is an event generated by an external actor. They are associated with system operations of the system in response to system events, just as messages and methods are related. For example, when a writer using a word processor presses the "spell check" button, he is generating a system event indicating "perform a spell check." A Controller is a non-user interface object responsible for receiving or handling a system event. A Controller defines the method for the system operation. Who should be responsible for handling an input event, which object/s beyond the UI layer receives interaction? Solution Assign the responsibility for receiving or handling a system event message to a class representing one of the following choices: ...