Hybris的extension和ABAP的package

An extension can contain business logic, type definitions, a web application, or a Hybris Management Console configuration. That way, you link up in one place all of the functionality that covers a certain field of use, for example a webshop.
這個概念和ABAP裏的package很是相似。
好比這個alipay是成都團隊開發的一個extension:web

典型結構:app

UI:this

一個細微的差別是,咱們知道在ABAP package裏建立的全部object,均可以被其餘package的代碼訪問。即便這些object沒有加到package interface的visible element裏,runtime也不會報錯。spa

Hybris的extension裏的大多數folder下的object,訪問控制的behavior和ABAP package一致。除了/web folder下的UI實現:This directory contains the web extension module parts of the extension (JSP files, libraries). Sources and resources from this directory are only accessible to a Web application containing the extension. They cannot be accessed from another extension.ip

Hybris啓動時加載的extension列表:element

注意,即便是不少Hybris core的功能,也是以extension的方式實現的,這一點對於從ABAP轉過來的developer一開始會特別confusing,由於在ABAP裏extension通常意味着屬於partner或者客戶.
好比這個extension,是Hybris core的一部分.開發


要獲取更多Jerry的原創文章,請關注公衆號"汪子熙":
rem

相關文章
相關標籤/搜索