Release Reuse Equivalency Principle (REP) - OO設計のREP再利用・リリース等価原則
2008/08/14 00:04Update
再利用の単位とリリースの単位は等価である
Robert C. Martin氏による有名なオブジェクト指向設計(OOD)の原則“Principles of OOD”があります。
本文は“Principles of OOD”のパッケージの設計原則である再利用・リリース等価原則:Release Reuse Equivalency Principle (REP) について学びます。
REP再利用・リリース等価原則は、パッケージ設計の凝集問題を解決します。
The granule of reuse is the granule of release.
再利用の単位とリリースの単位は等価である
Robert C. Martin氏は「再利用」性について次のように述べます。
I prefer to define reuse as follows. I reuse code if, and only if, I never need to look at the source code (other than the public portions of header files). I need only link with static libraries or include dynamic libraries. Whenever these libraries are fixed or enhanced, I receive a new version which I can then integrate into my system when opportunity allows.
再利用可能なコートとは、不具合の改修や機能の増強につれ、コードのバージョンアップがあった場合、それを利用したシステムでは、ソースコードを見ずに、時機をみて単なる スタティック ライブラリを入れ替えるだけで動作すべきである。
パッケージは関連し合うクラス同士の集合体であり、言い換えると、クラスは他のクラスに依存している場合がほとんどです。そのため、リリースの最小単位はパッケージであることが考えられます。
REP再利用・リリース等価原則はパッケージの設計原則を定めています。
■ 再利用単位はリリース単位は等価である。
■ パッケージに含まれたクラスすべてが再利用可能であるか、再利用不可であります。再利用可能なパッケージの中に再利用不可なクラスを含めてはいけません。再利用不可のクラスは他のコンポーネントを参照しているため、該当クラスを含めたパッケージまでは再利用不可になってしまうため。
Granularity
by Robert C. Martin。「PDF。英語」
Principles and Patterns
by Robert C. Martin。「PDF。英語」
本文は“Principles of OOD”のパッケージの設計原則である再利用・リリース等価原則:Release Reuse Equivalency Principle (REP) について学びます。
REP再利用・リリース等価原則は、パッケージ設計の凝集問題を解決します。
概要
The granule of reuse is the granule of release.
再利用の単位とリリースの単位は等価である
Robert C. Martin氏は「再利用」性について次のように述べます。
I prefer to define reuse as follows. I reuse code if, and only if, I never need to look at the source code (other than the public portions of header files). I need only link with static libraries or include dynamic libraries. Whenever these libraries are fixed or enhanced, I receive a new version which I can then integrate into my system when opportunity allows.
再利用可能なコートとは、不具合の改修や機能の増強につれ、コードのバージョンアップがあった場合、それを利用したシステムでは、ソースコードを見ずに、時機をみて単なる スタティック ライブラリを入れ替えるだけで動作すべきである。
パッケージは関連し合うクラス同士の集合体であり、言い換えると、クラスは他のクラスに依存している場合がほとんどです。そのため、リリースの最小単位はパッケージであることが考えられます。
REP再利用・リリース等価原則はパッケージの設計原則を定めています。
■ 再利用単位はリリース単位は等価である。
■ パッケージに含まれたクラスすべてが再利用可能であるか、再利用不可であります。再利用可能なパッケージの中に再利用不可なクラスを含めてはいけません。再利用不可のクラスは他のコンポーネントを参照しているため、該当クラスを含めたパッケージまでは再利用不可になってしまうため。
参考資料
Granularity
by Robert C. Martin。「PDF。英語」
Principles and Patterns
by Robert C. Martin。「PDF。英語」
Sponsored Link
- Relative Articles
- Single Responsibility Principle (SRP) - OO設計のSRP単一責任原則 - (2008/06/08 01:34)
- Interface Segregation Principle (ISP) - OO設計のISPインターフェイス分離原則 - (2008/06/08 22:18)
- Liskov Substitution Principle (LSP) - OO設計のLSP リスコフ置換原則 - (2008/06/09 13:18)
- Dependency Inversion Principle (DIP) - OO設計のDIP依存逆転原則 - (2008/06/09 14:56)
- The Stable Dependencies Principle (SDP) - OO設計のSDP安定依存原則 - (2008/06/09 16:53)
- The Acyclic Dependencies Principle (ADP) - OO設計のADP非循環依存原則 - (2008/06/09 17:33)
- The Stable Abstractions Principle (SAP) - OO設計のSAP安定度・抽象度等価原則 - (2008/06/09 17:48)
- The Common Closure Principle (CCP) - OO設計のCCP閉鎖性共通原則 - (2008/06/09 18:04)
- The Common Reuse Principle (CRP) - OO設計のCRP全再利用原則 - (2008/06/09 18:24)
- オブジェクト指向設計の原則 概要 - (2008/07/21 22:03)