Tags » Design Pattern

Adapter Design Pattern

The definition sucks, can you explain a bit more?

Well, let’s think of a situation. You have a third-party library that reads a large piece of text(e.g. 662 more words

Design Pattern

Dependency Injection:Google Guice

In my previous post I have discussed about dependency injection..In this post I will discuss how to use dependency injection using google Guice.

Guice is a java framework that dose dependency injection not like spring it is not a container ,it fulfill  one task i.e dependency injection request.The dependency injector is itself is a service and like any other  service, it must be constructed and prepared before it can be used. 445 more words

Design Pattern

Guided builder pattern

Previously, I wrote a post about builder pattern. This post intends to extend the builder pattern further. Let’s start with previous working example of Employee class as follows. 1,108 more words

Builder Pattern

Builder pattern

There are so many different design patterns in programming, e.g., builder pattern, guided builder pattern, factory/supplier pattern, factory-method pattern, visitor pattern, etc. Design patterns are merely guidelines for effective coding, but they have their merits in solving commonly re-occuring problems.  1,081 more words

Builder Pattern

Series Design Pattern - Phần 1: Tổng quan

1. Design Pattern là gì?

Trong lĩnh vực phần mền, design pattern là một giải pháp tổng thể cho các vấn đề thường xảy ra trong một bối cảnh nhất định trong thiết kế phần mềm. 283 more words

Design Pattern

Decorator Pattern

The decorator pattern is another structural pattern. The aim of the decorator pattern is to extend an existing classes functionality without modifying existing classes and rather using composition to wrap and extend the existing functionality. 177 more words

Design Pattern

What is dependency injection and when/why should or shouldn't it be used?

Basically, instead of having your objects creating a dependency or asking a factory object to make one for them, you pass the needed dependencies in to the constructor or via property setters, and you make it somebody else’s problem (an object further up the dependency graph, or a dependency injector that builds the dependency graph). 177 more words

Design Pattern