This post explores refactoring complex conditional statements (like switch or if-else ladders) into a more maintainable and object-oriented polymorphic design, demonstrating how it enhances code readability and extensibility.
September 12, 2014 · polymorphism · refactoring · java · conditional-logic · object-oriented-programming · design-patterns
Explore the Builder Pattern as an elegant solution for handling a large number of optional parameters in constructors, addressing limitations of telescopic constructors and JavaBeans.
May 19, 2013 · java · builder-pattern · design-patterns · effective-java · programming
An explanation of the Visitor design pattern, demonstrating how to define new operations on objects without modifying their classes, using a Java example with vehicle fuel efficiency calculations.
May 19, 2013 · design-patterns · visitor · java · programming · object-oriented
An explanation of the Facade Pattern, a structural design pattern that simplifies complexity and decouples code, along with a detailed look at the Session Facade, which encapsulates client-server interactions.
April 25, 2013 · design patterns · facade pattern · session facade · architecture
An introduction to the Command pattern, including its definition, use cases, and an example demonstrating complete decoupling between sender and receiver.
December 31, 2012 · design-patterns · command-pattern · programming · java
An explanation of the Decorator design pattern in Java, including its definition, implementation examples, and a demonstration of how it adds functionality to objects dynamically.
April 19, 2011 · java · design-patterns · decorator · wrapper · programming · oo
An in-depth look at the Model-View-Controller (MVC) architectural pattern, its core components, application in web development, particularly with JSP and Servlets, and a discussion on related frameworks.
January 16, 2011 · mvc · java · jsp · servlets · web-development · design-patterns · programming · java-ee
An introduction to creational design patterns, focusing on the Factory Method and Abstract Factory patterns, with Java examples and a comparison of their usage.
November 4, 2010 · design-patterns · creational-patterns · factory-method · abstract-factory · java · programming
An introduction to the Template Method design pattern in Java, illustrating its use for controlling algorithm flow with abstract superclasses and concrete subclasses, including an example for JSON and XML object creation.
October 4, 2010 · java · design-patterns · template-method · oop · inversion-of-control
An introduction to the Template Method design pattern in Java, illustrating its use for controlling algorithm flow with abstract superclasses and concrete subclasses, including an example for JSON and XML object creation.
October 4, 2010 · java · design-patterns · template-method · oop · inversion-of-control
A comparison of the Strategy pattern with the Template Method pattern in Java, showing differences and providing a code example.
October 4, 2010 · java · design-patterns · strategy-pattern · template-method-pattern