Abap Champions League
For Abap trainer Alexander Maetzing, "object orientation, especially in Abap, is not the sole beatifying doctrine."
For the solution of simple tasks, for example selection, processing and output of data, a class formation and method development would be completely oversized.
Even when developing applications for mobile devices, procedural Abap programming continues to play an important role. Not in the frontend programming itself, but in the preparation and retrieval of data in the backend.
In general, however, mobile applications and object-oriented programming, or OOP for short, are inextricably linked, as there are no known procedural alternatives for front-end development. With SAPUI5, SAP has created an interface design that is as functional as it is visually attractive and that does not have to hide behind established interface languages and concepts.
The interaction of SAPUI5 and the Abap backend functions results in the so-called "Fiori apps". The doctor of physics sees the great advantages of OOP in the joint consideration of data and functions (encapsulation), in inheritance and polymorphism.
"These three big concepts allow you to leave familiar paths and process data in a new way."
The terms, borrowed from genetics, describe the possibility of inheriting programming, deriving new classes from existing classes, and thus creating offspring that are an extension of the parent class.
In the process, parent class and offspring remain permanently connected, as in real life. This creates a class family whose communication methods all have a similar "character".
These methods and functions are called polymorphic and are thus "gene variants of a population".
Know both gauges
The decision as to whether polymorphism, inheritance and data encapsulation are the right concepts for designing a project or optimally mapping a requirement must be decided on a case-by-case basis. It plays a considerable role here whether and what programming is already available.
"To be able to decide whether Abap Objects or procedural Abap programming is the way to go, you definitely need to know both languages and both philosophies"
says Maetzing. This raises the question:
"Where and how do I learn to program in Abap Objects?"
For the savvy Abap coach, the answer is obvious.
"I'm a fan of good old classroom training."
For it is precisely in this complex and abstract subject matter that it is of inestimable advantage to be able to respond to questions individually, to introduce different explanatory approaches and to draw comprehensible pictures. Questions should be answered when they arise so as not to leave the student behind.
The learning effect from the questions of other training participants should also not be underestimated. But that's not the end of the story, says the long-standing Abap trainer. In order to deepen the learned basics in the long term, the training should be followed by a project in which programming is done using object-oriented approaches.
"The only way to really learn object orientation is to practice it."
Only at this point should the Abap Objects newcomer turn to other learning environments, such as books, communities or even Google, for support, the expert advises.
Be open to the OOP idea
In his years as a trainer and consultant, Maetzing has already inspired countless Abap developers with object orientation. One of them is Marc Bertelmann, G.I.B, who already completed a multi-week Abap workshop, including a five-day Abap Objects special section, with Maetzing two years ago.
"By the end of the workshop, you've mastered syntax and are able to build classes and objects, but the real art of OOP is in looking at and analyzing the problem itself, recognizing patterns in the requirements profile, and mapping reality in an abstracted way."
Bertelmann also sees clear advantages in personal training and advises against stubborn reading as an introduction. OOP clearly means a change in thinking; you have to be open to the idea. Maetzing knows how to pick up the participants thematically, to inspire them, and to get them excited.
"OOP is as complex as it is fascinating. If you draw the comparison to soccer, then we would probably be in the Champions League when it comes to object orientation."