オブジェクト指向設計の原則
(Principles Of Object Oriented Design)

Advertisement

Principles Of Object Oriented Design

オブジェクト指向原則は、RobertCecilMartin, BertrandMeyer, BarbaraLiskovを含む様々な人達により考え出され、RobertCecilMartinが纏めたもの。オブジェクト指向を用いて設計を行う際に有用となる概念集。

原文はhttp://www.objectmentor.com/で入手可能。
このページ内の原則説明はDesign Principles and Design Patternsより引用。

5つのクラス設計原則(There are five principles of class design)

The SingleResponsibilityPrinciple(SRP)

責務単一原則

The OpenClosedPrinciple(OCP)

開放閉鎖原則
A module should be open for extension but closed for modification.
モジュールは拡張に対して開いており、変更に対しては閉じている必要がある。

The LiskovSubstitutionPrinciple(LSP)

Liskovの置換原則
Subclasses should be substitutable for their base classes.
サブクラスは基本クラスと置換可能でなければならない。

The DependencyInversionPrinciple(DIP)

依存性逆転原則
Depend upon Abstractions. Do not depend upon concretions.
依存は抽象的にする。実装に対して依存させてはならない。

The InterfaceSegregationPrinciple(ISP)

インタフェース分離原則
Many client specific interfaces are better than one general purpose interface
汎用的なひとつのインタフェースよりも、多くの特化したインタフェースを利用する。

3つのパッケージ凝集原則(There are three principles of package cohesion)

The ReuseReleaseEquivalencePrinciple(REP)

再利用開放等価原則
The granule of reuse is the granule of release.
再利用できる最小単位はリリースできる最小単位。

The CommonClosurePrinciple(CCP)

共通閉鎖原則
Classes that change together, belong together.
あるクラスの変更により、同時に変更されるクラス。

The CommonReusePrinciple(CRP)

共通再利用原則
Classes that aren't reused together should not be grouped together.
再利用できるのはクラスではなく一連のグループ。

3つのパッケージ結合原則(There are three principles of package coupling)

The AcyclicDependenciesPrinciple(ADP)

非環式依存原則
The dependencies between packages must not form cycles.

The StableDependenciesPrinciple(SDP)

安定依存原則
Depend in the direction of stability.

The StableAbstractionsPrinciple(SAP)

安定抽象概念原則
Stable packages should be abstract packages.

リンク

Advertisement

ショートカット

634トップページ
このカテゴリのトップページに戻る
634ラボ

サイト検索

Google

Web サイト内

Y!ログール