Design Patterns in SAP ABAP

by | Oct 17, 2020 | OOABAP

Home » SAP » ABAP » OOABAP » Design Patterns in SAP ABAP

Preface – This post is part of the Object Oriented ABAP series.

Introduction

In software development world, every project requires a specific flow of code to achieve its target. After the growth of Information Technology, it was observed that many of the process across various domains and business remains same. For example, the way a user sign in and sign out. These common scenarios are now achieved using a design pattern. In this article we will try to explore Design Patterns in SAP ABAP.

Design Patterns in SAP ABAP

In SAP ABAP, a design pattern is a general, reusable solution to a generic and common issue. In reality it is not a finished solution to implement rather it is a template for how to solve a specific problem that can be utilized in many different scenarios.
In SAP ABAP, design patterns are considered as the best practices, an ABAPer can use to solve common problems while designing a product.

Following are the design patterns available in SAP ABAP:

  • MVC (model, view, controller) pattern
  • Singleton pattern
  • Factory pattern
  • Builder pattern
  • Observer pattern
  • Visitor pattern
  • Lazy initialization pattern
  • Template method
  • Strategy pattern
  • Decorator pattern
  • ABAP-specific examples
  • Anti-patterns

We will explore these individually in different articles.

Advantage

A design patterns comes with a lot of advantage. Following are a few of them:

  • Almost all the design patterns are object oriented and hence can be reused in multiple projects
  • With a pre-defined flow, they provide more accuracy and transparency to the project architecture and design
  • Design patterns prove to be the only solution for some of the project requirements

Limitations

With so many advantages, there are some limitations and criticism too of design patterns. Following are a few of them:

  • Many design patterns are either obsolete or are a part of newly developed frameworks
  • Inappropriate use of SAP ABAP design patterns seems to increase the complexity of the program
  • Design patterns are sometimes considered as Syntax. Well, it is not and can be amended as per the project requirement
  • A design pattern comes with complexity and low reusability costing more time in executing a program. It is advisable to only use a design pattern if it really serves the needs

Author

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Author