专栏首页Jerry的SAP技术分享SAP ABAP Netweaver里的胖接口(fat interface)

SAP ABAP Netweaver里的胖接口(fat interface)

Recently I am planning an internal training regarding Software engineering concept to my colleagues and one topic is “Interface Segregation”.

The following guideline is quoted from OODesign:

“When we design an application we should take care how we are going to make abstract a module which contains several submodules. Considering the module implemented by a class, we can have an abstraction of the system done in an interface. But if we want to extend our application adding another module that contains only some of the submodules of the original system, we are forced to implement the full interface and to write some dummy methods. Such an interface is named fat interface or polluted interface. The Interface Segregation Principle states that clients should not be forced to implement interfaces they don’t use. Instead of one fat interface many small interfaces are preferred based on groups of methods, each one serving one submodule.”

I am very curious whether SAP standard code contains such fat interface or not. So I wrote a small CDS view:

And get all interfaces which contains more than 10 methods:

DATA: lt_int TYPE STANDARD TABLE OF Zfat_Interface.

SELECT * INTO TABLE @lt_int FROM ZFAT_INTERFACE where method_count > 10 ORDER BY method_count DESCENDING.

The result is there are totally 3139 such interfaces in my CRM development system.

I quickly go through the list, most of them are used to build system functionalities and NO application will implement them, so in my opinion the fact is acceptable.

On the other hand there is also another category of interfaces which has NO methods or attributes defined. Refer to this blog Tag(Marker) Interface in ABAP and Java for more detail.

本文参与腾讯云自媒体分享计划,欢迎正在阅读的你也加入,一起分享。

我来说两句

0 条评论
登录 后参与评论

相关文章

  • 将ABAP透明表的定义(元数据)解析出来导入到剪切板(clipboard)里

    Recently I am planning an internal training regarding Software engineering conce...

    Jerry Wang
  • git练习之二 - version revert

    版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。

    Jerry Wang
  • SAP Fiori Elements原理介绍之类型为Currency的Smart Field工作原理

    According to SAP help, “Smart controls are a specific category of SAPUI5 control...

    Jerry Wang
  • 将ABAP透明表的定义(元数据)解析出来导入到剪切板(clipboard)里

    Recently I am planning an internal training regarding Software engineering conce...

    Jerry Wang
  • DAY19:阅读纹理内存之Texture Gather

    GPUS Lady
  • DAY15:阅读CUDA C runtime之纹理内存

    GPUS Lady
  • git练习之二 - version revert

    版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。

    Jerry Wang
  • 约束混凝土弹塑性本构模型中的顶点控制(CS NA)

    本工作的重点是约束混凝土在多轴载荷作用下的非线性材料响应的数值模拟。特别地,这里提出了一种改进的回归映射程序来处理屈服面中的奇异点(角点)问题,能够局部地捕获有...

    非过度曝光
  • CoppeliaSim(V-Rep)和ROS2的使用说明

    版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。

    zhangrelay
  • 你真的了解lambda吗?一文让你明白lambda用法与源码分析

    本文链接: http://www.cmlanche.com/2018/07/22/lambda用法与源码分析/

    程序猿DD

扫码关注云+社区

领取腾讯云代金券