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.
要获取更多Jerry的原创文章,请关注公众号"汪子熙":
相关推荐
资源名称:sap abap开发从入门到精通 内容简介: 《SAP ABAP开发从入门到精通》以应用实例的形式,讲解了SAPABAP开发的相关知识点,详细介绍了SAPABAP开发者必须掌握的包与变更传输系统(CTS)、数据类型、数据库...
从实例学sap abap编程,从实例学sap abap编程,从实例学sap abap编程
SAP ABAP IDOC Interface
SAP ABAP 数据库操作,快速学会ABAP!
《SAP ABAP开发技术详解(实例篇)(第二版) [1] 》除了对对SAP ABAP开发所需的常用技术(SAP报表、批量导入、对话程序、函数)做了详尽的介绍,包括基本报表、交互式报表、复杂报表、ALV(SAP List Viewer)报表、...
《SAP ABAP开发从入门到精通》以应用实例的形式,讲解了SAP ABAP开发的相关知识点,详细介绍了SAP ABAP开发者必须掌握的包与变更传输系统(CTS)、数据类型、数据库、模块化程序、内表、调试、ABAP数据字典、锁对象...
SAP ABAP开发学习——第9课:ALV2(视频教程) 1.SAP ABAP开发入门学习 2.含视频教程学习、PPT、作业 3.视频非常清晰
【SAP ABAP】调用API接口实例.abap
SAP ABAP 代码备份下载到本地程序代码
SAP ABAP开发学习——第19课:实战讲解(视频教程) 1.SAP ABAP开发入门学习 2.含视频教程学习、PPT、作业 3.视频非常清晰
ABAP开发从入门到精通_高清自学版 SAP+ABAP开发从入门到精通 SAP开发自学必读 SAP SAP开发自学入门到精通完整版HANA开发
SAP ABAP程序性能调优介绍.pptx
sap abap经典中文帮助 sap abap经典中文帮助
SAP ABAP 调用外部接口webservice案例分享,含接口配置及ABAP调用代码
全面介绍SAP ABAP语言编程与开发(SAP官方文档)
SAP ABAP开发详解与高端应用,想学习ABAP开发的可以看一下。
sap abap程序 举例大全 包含所以ABAP开发程序类型
SAP ABAP 常用T-CODE SAP ABAP
SAp abap 非常清晰的abap学习资料
网上收集整理的SAP abap PA 试题2,还有部分资料