• Behavioral Pattern,  Design patterns,  Java Design Patterns

    Façade design patterns

    Hiding complexity between your classes and interfaces is key concept for implementation of Facade Design Pattern. Provide a unified interface to a set of interfaces in a subsystem. Façade Pattern defines a higher-level interface that makes the subsystem easier to use. – Gof Definition Here Façade pattern is not implemented Here we are talking about the application where Interfaces and classes are interaction is very huge, which may cause several performance related issues, so to simplify the interaction and minimize the interaction we used to define an extra layer to it, which usually work as mediator to both interface giants, like controller in MVC architecture but the difference is that it should not…

    Comments Off on Façade design patterns
  • Creation Pattern,  Design patterns,  Java Design Patterns

    Builder Design Patterns

    The intent of the Builder design pattern is to separate the construction of a complex object from its representation. By doing so, the same construction process can create different representations.                                                                                                             source from: wikipedia.org Objects creation increased with complexity of an application. Complex objects are made of parts produced by other objects that need special care when being built. An application might need a mechanism for building complex objects that is independent from the ones that make…

    Comments Off on Builder Design Patterns
  • Creation Pattern,  Design patterns,  Java Design Patterns

    Prototype Design Patterns or Copy Design Pattern

    Prototype Design Patterns or Copy Design Pattern, Today’s programming is all about effective usage of resources and lower costs to application. Saving is a big issue when it comes to using computer resources, Copy of object is the best instead of creating a new one in case cost to object creation is huge then copy, in design patter you have to copy from couple of best solutions, as here we have two options to get the class object: Create a new Object Copy the Object. Where to use ProtoType Pattern: When creating an object is time consuming and a costly and you already have a most similar object instance in hand,…

    Comments Off on Prototype Design Patterns or Copy Design Pattern
  • Creation Pattern,  Design patterns,  Java Design Patterns

    Creational Patterns

    Creational Design Patterns are one of the classification of Design Patterns which used to deals with object creation of class. Object creation is result in design problems or added complexity to the design. Creational design patterns is solving this problem of object creation by controlling this object creation. Creational design patterns are composed of two concept: One is encapsulating knowledge about which concrete classes the system use.  Another is hiding how instances of these concrete classes are created and combined. Creational design patterns are further catagorized into two design patterns: Object Creational Patterns, which deals with object creation. Class Creational Patterns, which deals with class Instantiation. Object-creational patterns defer part of…

    Comments Off on Creational Patterns
  • Design patterns,  Java Design Patterns

    Design Patterns

    What we do when we met with a problem in daily life, we used to search for solution to resolve it. and forget or make it available in our mind so that whenever we will get this error, we just search our mind and provide the solution, this we used to do in daily life. Now what will happen in case anyone else come up with the same problem may be your friend or anyone to whom you know, but you are not available to him/her, he/she will go the way of process as you gone through, when you got the problem at first time. Here your friend have wasted…

    Comments Off on Design Patterns
  • Design patterns,  Java Design Patterns,  Structural Design Pattern

    Flyweight Design Pattern

    Some programs require to have a large number of objects that have some shared state among them. Consider for example a game of war, were there is a large number of soldier objects; a soldier object maintain the graphical representation of a soldier, soldier behavior such as motion, and firing weapons, in addition soldier’s health and location on the war terrain. Creating a large number of soldier objects is a necessity however it would incur a huge memory cost. Note that although the representation and behavior of a soldier is the same their health and location can vary greatly. Why Fly Weight? The intent of this pattern is to use…

    Comments Off on Flyweight Design Pattern
  • Creation Pattern,  Design patterns,  Java Design Patterns

    What is Factory Design Patterns?

    Creational Patterns      -Factory Pattern Factory of classes. In simple words, if we have a super class and nth sub-classes, and based on data provided, we have to return the object of one of the sub-classes, we use a factory pattern. Let’s take an example to understand this pattern. Let’s suppose an application asks for entering the name and sex of a person. If the sex is Male (M), it displays welcome message saying Hello Mr. <Name> and if the sex is Female (F), it displays message  Welcome to application,  Ms <Name>. The skeleton of the code can be given here. public class Person { // name stringpublic String name;//…

    Comments Off on What is Factory Design Patterns?
  • Java Design Patterns

    What is Abstract Factory Design Patterns?

    Using references to interfaces instead of references to concrete classes is an important way of minimizing ripple effects. The user of an interface reference is always protected from changes to the underlying implementation. The Abstract Factory pattern is one example of this technique. Users of an Abstract Factory can create families of related objects without any knowledge of their concrete classes. (A typical business application would usually not need to use this technique – it is more suitable for toolkits or libraries.) Example An Abstract Factory is a major part of the full Data Access Object scheme. Here, the idea is to allow the business layer to interact with the data layer almost entirely…

    Comments Off on What is Abstract Factory Design Patterns?
  • Design patterns,  Java Design Patterns

    Types of Java Design Patterns?

    We have no of issues so having common solutions We have 200+ Types of Java Design Patterns, but to get it caegorise we have trim some of the design patter according to most common or frequent issues and below are some of them: Creational Patterns Abstract Factory Builder Factory Method Prototype Singleton Structural Patterns  Adapter Bridge Composite Decorator Façade Flyweight Proxy Behavioral Patterns Chain of Responsibility Command Interpreter Iterator Mediator Memento Observer State Strategy Template Method  Visitor J2EE Patterns MVC Business Delegate Composite Entity Data Access Object Front Controller Intercepting Filter Service Locator Transfer Object Thanks for reading, Please do comment so as to get best for you.

    Comments Off on Types of Java Design Patterns?