Quantcast
Channel: JavaPins - Stories tagged with design pattern
Browsing all 25 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

The importance of Composition | Code of Doom

Many times when we are designing our programs model, first thing most people, including myself, want to start doing is inheriting from other classes. This makes for a nice large hierarchical beast. Not...

View Article



Image may be NSFW.
Clik here to view.

How and when to use Singleton classes | Code of Doom

It’s a pretty well known pattern, but I want to discuss what a Singleton class is first. In a nutshell, a Singleton class is a class that will only have one instance of the class. In certain cases, we...

View Article

Image may be NSFW.
Clik here to view.

The Strategy Pattern | Code of Doom

I will get right to the point about this pattern. Everyone at some point in their code has a switch statement, that depending on the state of an object, you do some crap and it just looks like this: 1...

View Article

Image may be NSFW.
Clik here to view.

Value Object Pattern ~ Java Stuff

Value Object In this chapter, we are going to take a detailed look at the Value Object Pattern.  What is Value Object Pattern?  The Value Object pattern provides the best way to exchange data across...

View Article

Image may be NSFW.
Clik here to view.

Coding With Passion: Design Patterns in Java - Template Method

Introduction This is first article about OO design patterns, we will start with the most useful pattern. Template method (GoF - Gang Of Four) present good example of using concrete inheritance. If you...

View Article


Image may be NSFW.
Clik here to view.

Abstract Factory Vs Factory Method

I'm finding myself getting a bit muddled by these two patterns while reading DesignPatternsBook. Both classes have abstract classes (Abstract Factory, Abstract Product in Abstract Factory &...

View Article

Image may be NSFW.
Clik here to view.

Abstract Factory vs Factory Method - DoFactory

I believe I have a good understanding of the difference between Abstract Factory and Factory Method, but I'd like to see what others think. When I say Abstract I am referring to...

View Article

Image may be NSFW.
Clik here to view.

Template Method Design Pattern in Java

Template Method design pattern 01 Standardize the skeleton of an algorithm in a base class “template” method Common implementations of individual steps are defined in the base class Steps requiring...

View Article


Image may be NSFW.
Clik here to view.

Design Patterns And Enterprise Patterns | Nilesh Gule's Technical Blog

Design Patterns are solutions to the recurring problems. There are different types of patterns. The most basic ones are the Design Patterns. Then there are higher level patterns like Enterprise Design...

View Article


Image may be NSFW.
Clik here to view.

Factory Method Design Pattern

A factory method pattern is a creational pattern. It is used to instantiate an object from one among a set of classes based on a logic. Assume that you have a set of classes which extends a common...

View Article

Image may be NSFW.
Clik here to view.

What is Dependency Injection | Tech Samosa

Definition Precisely, Wikepedia says Dependency injection is a software design pattern that allows a choice of component to be made at run-time rather than compile time. This can be used, for example,...

View Article

Image may be NSFW.
Clik here to view.

Design Patterns Uncovered: The State Pattern

Today’s pattern is the State pattern, which allows objects to behave in different ways depending on internal state. State is used when you need a class to behave differently, such as performing...

View Article

Image may be NSFW.
Clik here to view.

Design Patterns Uncovered: The Builder Pattern

The purpose of the builder pattern is to separate the construction of a complex object from its representation. so that the same construction process can create different representation. An example of...

View Article


Image may be NSFW.
Clik here to view.

Design Patterns Uncovered: The Flyweight Pattern

Today’s pattern is the Flyweight pattern, used to share large number of objects in an efficient way.Flyweight in the Real World The classic example of the Flyweight pattern is the representation of a...

View Article

Image may be NSFW.
Clik here to view.

Design Patterns Uncovered: The Bridge Pattern

Today’s pattern is the Bridge pattern, which allows you to vary both the implementation and the abstraction by placing both in seperate class hierachies.Bridge in the Real World The display of...

View Article


Image may be NSFW.
Clik here to view.

Design Patterns Uncovered: The Composite Pattern

Today’s pattern is the Composite pattern, which comes into play when developing a system where a component could either be an individual object or a representation of a collection of objects.Composite...

View Article

Image may be NSFW.
Clik here to view.

Design Patterns Uncovered: The Template Method Pattern

Today’s pattern is the Template Method pattern, which defines a stub for an algorithm, deferring some implementation steps to subclasses.Template in the Real World The Template Method pattern is used...

View Article


Image may be NSFW.
Clik here to view.

Design Patterns Uncovered: The Singleton Pattern

The next pattern in our series is the Singleton pattern. Singleton is probably the most infamous pattern, as it’s use causes a divide in the development community- some say it belongs, others say it’s...

View Article

Image may be NSFW.
Clik here to view.

Introduction To Design Patterns

Pattern is a defined, used and tested solution for a know problem. Design patterns is all about re-use. Software design patterns evolved as a subject of study only when object oriented programming...

View Article

Image may be NSFW.
Clik here to view.

Visitor « Java Code Samples

Description: Is a way of separating an algorithm from an object structure on which it operates. A practical result of this separation is the ability to add new operations to existing object structures...

View Article
Browsing all 25 articles
Browse latest View live




Latest Images