Design Patterns in ABAP – Observer

SAPObserver design pattern can be easily demonstrated on a chat service where you have a server and several clients (observers). Once a client sends a message, server receives it and RAISES an EVENT (eg NEW_MESSAGE_RECEIVED) which is OBSERVED by all connected clients (observers) and such message is subsequently displayed in message dialog on all clients. Continue reading

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

ABAP – Multiple implementations of a “Single implementation only BAdI”

SAPIt is a problem when you need to have multiple implementations of a BAdI which does not implicitly allow multiple implementations by its definition. How to bypass this limitation? 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

Design patterns – overview

In software engineering, a design pattern is a general repeatable solution to a commonly occurring problem in software design. A design pattern isn’t a finished design that can be transformed directly into code. It is a description or template for how to solve a problem that can be used in many different situations. Continue reading