層 (物件導向設計)

物件導向設計中的(layer)是一群和其他模組有類似耦合性類別[1]。層也可以說是一組可復用的軟件組件,可以在類似的環境下復用。

各層的模組會用狀的階級架構來規劃,各層模組之間的依賴關係會用連接來表示。各層之間的依賴關係可能是繼承[2]複合英語Object composition或聚合(aggregation)關係,不過也有可能是其他的關係。

分層是許多書籍中都會提到的架構模式,例如《Pattern-Oriented Software Architecture英語Pattern-Oriented Software Architecture》書中就有提到[3]

相關條目 編輯

參考資料 編輯

  1. ^ Lakos, John. Large-scale C++ software design' . Addison-Wesley. 1997. 
  2. ^ Monperrus, Martin; Beugnard, Antoine; Champeau, Joël. A Definition of "Abstraction Level" for Metamodels. 2009 16th Annual IEEE International Conference and Workshop on the Engineering of Computer Based Systems. [2021-04-23]. doi:10.1109/ecbs.2009.41. (原始內容存檔於2021-04-23). 
  3. ^ Pattern-Oriented Software Architecture - A System of Patterns 互聯網檔案館存檔,存檔日期2008-06-16.