層 (物件導向設計)

面向对象设计中的(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.