Learnitweb

Category: Java design patterns

  • Proxy design pattern – Java

    1. Introduction Proxy means “power or authority that is given to allow an entity to act for someone else”. Proxy objects are used as surrogates and handlers for original objects. The objective of a proxy object is to control the creation of and access to the real object it represents. A common use of a…

  • Observer Pattern – Java

    1. Introduction According to GoF definition, Observer pattern defines a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically.Observer pattern is a behavioral design pattern. In this design pattern there is a subject to which observers subscribe. Whenever the state of subject changes, all its…

  • Factory Method Pattern – Java

    1. Introduction In this tutorial, we’ll discuss Factory Method Pattern. This design pattern comes under creational design pattern as this pattern is used to create objects. In this pattern, we hide the creation logic from the client. We only provide a uniform interface for creating objects.In this design pattern we define an interface for creating…