ABAP OO Design: Basic Terms Overview

This is an overview of the terms I found to be useful for OO design. That doesn’t mean other terms are not important, but for starting OO design, you could focus on these terms.

Software Architecture layers and Class Categories

  • Presentation layer
    • Application
    • Controller
    • View
    • Model
  • Service layer (= Interface layer)
    • Server proxy
    • Client proxy
  • Business layer
    • Business Object
    • Business Object Factory
    • Sub Business Object
    • Workflow object
    • Process object
    • Workflow Business Object wrapper
    • Converter object
    • Utility object
    • Data Provider object
  • Persistence layer
    • Data Access object
  • Database layer
    • Queries
    • Database tables
  • Others
    • Formatter
    • Converter
    • Utility

OO terms

  • Entity
  • Object = Entity + Behavior + Instantiation
  • Object behavior
  • Object instance
  • Class = Entity + Behavior
  • Class definition
  • Class implementation
  • Class interface
  • Relations
    • Parent / child relation (composition / association)
    • Super class / sub class relation / Class interface
  • Business Object = Objects for the Business like Sales order, Customer and Material
  • Entity = Real world object about which you are storing data

Object Oriented Principles (OOP)

  • Object instantiation
  • Encapsulation / data hiding
  • Inheritance / Generalization / Specialization
    • Override / redefine
    • Polymorphism
    • Realization (class interface)
  • Parent / child relations
    • Composition / Aggregation (Sales order head –> Sales order item)
    • Association (Sales order item –> Material)
    • Dependency
    • Cardinality
  • Abstraction / Class interface

UML diagrams

  • Most important
    • Class diagram
  • Could also be used but harder to maintain manually
    • Sequence diagram
    • Package diagram
  • And more, which I don’t use.

Patterns

There are many design patterns and it is hard to remember and use them all.

I don’t use many patterns, but some are very important to me.

Presentation layer

  • MVC model
  • Proxy

Creational patterns

  • Abstract factory
  • Factory method
  • Singleton

Structural patterns

  • Facade
    • In case of a complex Server object with many sub objects,
      the Server object calls all the sub objects.
    • The Client object calls only the root Server object.
  • Proxy
    • Is a surrogate class / wrapper class for an another class
    • Types:
      • Remote proxy – intent is calling remote logic
      • Virtual proxy
      • Protection proxy
    • ABAP examples: XI-SOAP Client ABAP Proxy / Server Proxy and OData Proxy class
  • Adapter

Behavioral patterns

  • Observer (= eventing)
  • Strategy

And there many more, see for more patterns see Wiki – Software Design Patterns.

And for some fun and educational videos about patterns see Christopher Okhravi.

Anti-patterns

  • God object
  • Object orgy
  • Sequential coupling
  • Yo-yo problem
  • Arrow pattern

And there many more…

Important OO related topics

  • TDD – Test Driven Development (Test First Development)
    • ABAP unit
    • Test doubles
  • Design principles
    • SOLID
      • Single Responsibility Principle
        • Good separation of concerns
        • Loosely coupled
      • Open/Closed Principle
      • Liskov Substitution Principle
      • Interface Segregation Principle
      • Dependency Inversion