1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

オブジェクト指向や変更容易性について

Last updated at Posted at 2024-11-10

概要

オブジェクト指向や変更容易性についての参考書を読んで
興味深い内容を紹介いたします。

参考書

1)「良いコード/悪いコードで学ぶ設計入門」by 仙場大也
2)「オブジェクト指向のこころ」by アラン・シャロウェイ、ジェームズ・R・トロット

オブジェクト指向

・インターフェイスを使用することを意識してプログラミングすること
・クラスの継承よりも集約を多用すること
・実体間の関連に意識を向けること
・クラスを設計する際
 ・流動的要素を見つけ出し、凝集度を高く、結合度の低くする
 ・何をもって目的を達成したとみなすかを考える

変更容易性

・分岐を書きそうになったらInterfaceを使用すること
・異常な値を早期に検知させること
・bestではなくbetterを意識すること
・驚き最小の原則を意識すること
・UML図では、ただ単にモデル分けするのではなく、目的別に分類すること
・コーディング規約を利用すること
・コーディングを続けること

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?