OOPS ABAP 12

COMPOUND INTERFACE :


Changes to an interface usually invalidate all the classes implementing it.ABAP Objects contains a composition model for interfaces. A compound interface contains other interfaces as components (component interfaces) and is therefore a summarized extension of these component interfaces. An elementary interface does not itself contain other interfaces.

One interface can be used as a component interface in several compound interfaces.UML only deals with the specialization/generalization of interfaces. This relationship is represented by a dotted line with a three-sided arrow from the specialized to the generalized interface.Compound interfaces in ABAP Objects can always be seen as specializations of their component interfaces and represented as such in UML.

In a compound interface, the components of the component interface keep their original names, that is ~; no more prefixes are added! In other words: all components in a compound interface are on the same level, and components inherited from component interfaces are marked with the usual interface prefix.

This ‘equality principle’ for compound interfaces also affects how they are implemented. The procedure is as follows: first you implement the elementary interfaces, then the additional methods from the compound interfaces. For multiple compound interfaces, the process is simply repeated. In the class carrying out the implementation, all components of all interfaces implemented are again on the same level.

This means that interface components only ever exist once and are known by their original names ~. This is true both for compound interfaces and for the classes that implement them.


Interfaces are the means of choice for describing external points of contact, without linking them to a type of implementation. An extra layer is introduced between the client and the server to protect the client explicitly from the server, thereby making it much more independent!


Interfaces enable you to work uniformly with different classes (providers). In particular, they always ensure polymorphic behavior as they do not have their own implementation, but instead allow the providers to carry it out.

The definition of an interface is always an abstraction: the user wants to handle various providers in the same way and must therefore abstract concrete implementations to a description of the services required to fulfill the task.

You can also use interfaces to achieve multiple inheritance by defining the functionality to be inherited by a second class as an interface that the inheriting class then has to implement.


RELATED LINKS

OOPS ABAP 13
CRM Sales Cycle Management
CRM Sales opportunity management

No comments :

Post a Comment