Design Patterns in ABAP – Factory Method

SAPFactory Method design pattern provides unique interface to object instantiation. The decision on which object is to be instantiated is hidden from the outside world in the code. Using this approach different objects can be instantiated dynamically. Continue reading

Design Patterns in ABAP – Singleton

SAPIn software engineering, the singleton pattern is a design pattern that restricts the instantiation of a class to one object. This is useful when exactly one object is needed to coordinate actions across the system. The concept is sometimes generalized to systems that operate more efficiently when only one object exists, or that restrict the instantiation to a certain number of objects. The term comes from the mathematical concept of a singleton. Continue reading

Design Patterns – Abstract Factory

Intent

  • Provide an interface for creating families of related or dependent objects without specifying their concrete classes.
  • A hierarchy that encapsulates: many possible “platforms”, and the construction of a suite of “products”.
  • The new operator considered harmful. Continue reading