강의

멘토링

로드맵

BEST
Programming

/

etc. (Programming)

オブジェクト - 設計原則編

オブジェクト指向的なコードを書くために知っておくべき様々な設計原則を、動作するコードを中心に学習します。

  • eternity
oop
Software Test
software-design

学習した受講者のレビュー

こんなことが学べます

  • オブジェクト指向設計原則

  • 設計原則を使ってコードの問題点を把握する方法

  • リファクタリングでコードを進化させる方法

  • テストとコード品質の関係

オブジェクト指向設計の原則、
適用する方法を理解する🤔

オブジェクトを執筆しながら地面の制約のために含めることができなかったり、十分に説明できなかったトピックが多いが、その中で最も惜しい点が設計原則に関する内容を体系的に整理できなかったということです。いくつかの設計原則は簡単に言及したり、凝集度、結合度、カプセル化の観点から原則の背景と必要性を説明したりしていますが、設計という文脈内でさまざまな原則を結びつける方法と、これらの原則を適用するために必要な具体的なガイドは収録できませんでした。

この部分を補完するために、オブジェクト - 設計原則では、純粋に設計原則に焦点を当て、コードを評価および改善するときに設計原則を適用する実用的な方法を具体的なコードレベルで説明します。講義では、設計原則に基づいてコードの問題を特定し改善する方法を学ぶことができます。その結果、講義を聞いた後は、さまざまな設計原則をまとめてメンテナンスしやすいコードを設計する方法を理解できます。

講義で扱う設計原則は次のとおりです。

  • 単一抽象化レベルの原則( Single Level of Abstraction Principle , SLAP )

  • 単一責任原則( Single Responsibility Principle , SRP )

  • オープン - 閉鎖原則 ( Open-Closed Principle , OCP )

  • リスコフ置換原則 ( Liskov Substitution Principle , LSP )

  • 依存性逆転原則( Dependency Inversion Principle , DIP )

  • インターフェイス分離の原則 Interface Segregation Principle 、ISP)

  • ディミッタの法則( Law of Demeter , LoD )

  • 尋ねないでください原則(Tell Don't Ask、TDA)

  • コマンドクエリ分離の原則( Command Query Seperation CQS

  • 重複してはいけない原則 ( Don't Repeat Yourself, DRY )


このようなことを学びます。

設計原則の概念と必要性

すべての設計原則は、設計の品質を向上させるという目的を共有しています。しかし、それぞれの設計原則の詳細な目標は異なります。したがって、設計原則を理解する出発点は、それぞれの設計原則が改善しようとする目標を理解し、現在のコードをその目標に合わせて改善するのが適切かどうかを判断することです。

講義を聞くと、各設計原則がなぜ必要であり、いつ役に立つのかを自然に理解することができます。

設計原則を適用するための具体的なガイド

設計原則の定義を理解するだけでは不十分です。設計原則の最も重要な部分は、いつ、どの設計原則を適用するかを理解し、適切な方法で設計原則を適用することです。

講義では、それぞれの設計原則を適用するときに従うことができる実用的なガイドを提示します。このガイドは、コードを評価して改善するために使用できる基準とコンパスとして利用できます。

設計原則とユニットテスト

テストを念頭に置くと、凝集度が高くなり、結合度が低くなり、変更をカプセル化できる設計が得られます。そして設計原則を考慮してコードを実装すると、テストを作成して実行することも容易になります。

講義では、それぞれの設計原則がテストにどのようなプラスの効果をもたらすかを説明することで、テストと設計原則の関係を理解できるように構成しました。

設計原則とリファクタリング

十分にシンプルで適切に保守可能な設計を得るためには、継続的なリファクタリングが不可欠です。設計原則は、コードのどこをリファクタリングし、どの目標にリファクタリングするかについてのガイダンスを提供します。

講義では、サンプルコードを設計原則の観点からリファクタリングする過程を通じて、自然に設計原則を理解できるように構成しました。

4つの具体的なサンプルコード

講義は、テキストアドベンチャーゲーム、ゲーム収益管理アプリケーション、繰り返しスケジュール管理アプリケーション、通貨管理システムの4つの例を設計原則を適用しながらリファクタリングする方法で行われます。

講義を聞いた後、さまざまな状況でさまざまな設計原則を適用することで、設計原則、リファクタリング、テスト間の関係を直感的に理解することができます。

設計原則を総合的に適用する方法

設計原則は独立して使用されません。コードを書くときは、さまざまな設計原則を包括的に適用するのが一般的です。そして、ある設計原則に従うためには、他の設計原則も一緒に考慮する必要があります。設計原則を複雑に考慮すると、さまざまな状況で設計をトレードオフする能力が向上します。

講義では、連続的なリファクタリングによってコードが改善される過程を示しながら、さまざまな設計原則を複合的に活用する方法を学習できるようになります。

オブジェクト - 基礎編との関係

オブジェクト - 設計の原則を聞くために、オブジェクト - ベースを最初に聞く必要はありません。オブジェクト基盤が責任主導の設計を使用してメンテナンス可能な設計を作成するトップダウン方式を扱う場合、オブジェクト設計原則はコードをメンテナンス可能にリファクタリングするボトムアップ方式を扱います。


2つの講義はオブジェクト指向の設計を異なる観点で扱っているので、相互に依存せずに補完的な関係を持っています。したがって、どのような順序で講義を見ても構いません。両方の講義を見た後は、オブジェクト指向の総合的な視覚を得ることができます。

この点で特別です。

📌言語に依存しないオブジェクト指向設計の原則を説明します。

📌の例はJavaで実装されていますが、講義が提供する概念はどの言語や環境にも適用できます。

📌重要な内容で満たされた1400ページ分のスライドを提供します。

📌概念を単純なテキストではなく視覚的な絵で表現し、内容を理解しやすいように構成しました。

📌リファクタリングプロセスを画像を使って渡すので、コードの変更プロセスを簡単に理解できます。

受講前の注意

学習資料

  • 1400ページ分の講義スライドがPDF形式で提供されています。

  • レッスンで使用されるサンプルコードはFitHubから入手できます。
    講義ごとに例を受け取ることが不便な方は、 統合本を受け取れば、より快適に学習することができます。

選手の知識と注意事項

  • サンプルコードはJavaで書かれているので、Javaの基本的な文法を知っておくとスムーズな学習が可能です。

  • できるだけ基本的なJDKだけを使ってレッスンを作成しましたが、いくつかの例ではJSON解析のために

    Jackson ライブラリ, インメモリレディスサポートのためのembedded-redis ライブラリ

    、Redis JavaクライアントJedisライブラリ

    、GUIアプリケーション開発にSwingフレームワークを使用する部分が含まれています。
    これらのライブラリを知らなくても、重要な原則を学ぶのに無理がないように構成しました。


  • 単体テストライブラリとしてJunitAssertJを使用してください。

こんな方に
おすすめです

学習対象は
誰でしょう?

  • オブジェクト指向設計原則の概念と適用方法について知りたい方

  • オブジェクト指向の概念をコードに適用するのに苦労する方々

  • 良いコード設計のための基本的な原則とガイドが必要な方々

前提知識、
必要でしょうか?

  • Java 基本文法

  • オブジェクト指向言語を使ったコーディング経験

こんにちは
です。

2,297

受講生

141

受講レビュー

92

回答

5.0

講座評価

2

講座

객체지향 설계와 도메인-주도 설계에 관심이 많으며 행복한 팀과 깔끔한 코드, 존중과 협력이 훌륭한 소프트웨어를 낳는다는 믿음을 가지고 있는 평범한 개발자입니다. 개발자, 교육자, 관리자를 오가며 익힌 다양한 경험을 바탕으로 좋은 코드와 함께 좋은 프로덕트를 만들기 위해 노력하고 있습니다.

저서로는 『객체지향의 사실과 오해』와 『오브젝트』가 있고 번역서로는 『엘레강트 오브젝트』가 있으며 『만들면서 배우는 클린 아키텍처』에 감수자로 참여했습니다.

💡개인블로그 : https://eternity-object.tistory.com/

 

カリキュラム

全体

33件 ∙ (6時間 16分)

講座資料(こうぎしりょう):

授業資料
講座掲載日: 
最終更新日: 

受講レビュー

全体

36件

5.0

36件の受講レビュー

  • haedallog님의 프로필 이미지
    haedallog

    受講レビュー 14

    平均評価 4.9

    5

    100% 受講後に作成

    It's an honor to leave the first review. After completing `<Object - Basics>`, I immediately took `<Object - Design Principles>` as well and am now writing this review. The advantages of the course are as follows: 1. It's easy to understand intuitively because it's not just listing principles but includes actual code examples. ㄴ I thought I knew the SOLID principles because I encounter them often, but after watching the lecture, I realized that was my misconception. 2. Convenience has increased compared to `<Object - Basics>`. ㄴ A link to the relevant repo is provided through the course materials, making it easy to access. ㄴ The presenter is no longer visible, making the presentation much easier to see. There are also some slightly disappointing aspects (They are minor). 1. The volume level differs slightly for each video, which is a bit distracting. 2. There are also cases where there are errors in the videos. 3. If colloquial phrases like '되게 됩니다.' were refined, it would feel tidier. 4. There are instances where the notation for foreign words differs (e.g., 메서드/메소드), and it would be a bit tidier if this were unified. I highly recommend watching `<Object - Basics>` as well. It allows for a broader understanding of the course. If you don't know what object-oriented design is, I strongly recommend this course. I plan to recommend it to many people around me as well 😊😊 Thank you to Jo Young-ho for planning this great course. I expect my code to change significantly in the future. Work less, earn more 😊😊😊

    • eternity
      知識共有者

      I remember you recently left a review for "Object - Basic Course", and you've already completed it. Congratulations on completing the course, and thank you for leaving a review. :) I'm glad the course was helpful. I decided to remove my face from the videos at the request of many acquaintances, and I'm glad the reaction has been positive... Due to health reasons, the filming period was extended, which resulted in slightly varying audio levels. If anyone finds this inconvenient, I will consider re-recording "Object - Basic Course" along with it in the future. :) I'm creating, filming, and editing the course by myself, and this course ended up having more presentation slides than expected. Although I checked in between, it seems there were parts I didn't notice. I apologize for releasing it without thoroughly checking this part. I will also review it again and make corrections as quickly as possible. :) If it's convenient for you, please let me know about any errors in the video or inconsistencies in the slides, and I will correct and update them as quickly as possible. The phrase "Work less, earn more" resonates with me. I hope the course helps reduce maintenance costs and improve code quality. Thank you!

  • 개발인생님의 프로필 이미지
    개발인생

    受講レビュー 2

    平均評価 5.0

    5

    100% 受講後に作成

    I really enjoyed the lecture. I thought I knew the design principles well, but unexpectedly, there were many things I had misunderstood. Explaining using code made it easy to understand. I was unsure how to refactor code, but after the lecture, I was able to establish some clear criteria. Thank you for creating a great lecture!

    • eternity
      知識共有者

      Thank you for leaving a review, GaeBalInSaeng-nim. I'm glad the design principles, organized to be applicable when writing actual code, were helpful. :) If you have any questions, feel free to leave them anytime! Congratulations on completing the course, and have a happy start to your week.

  • enciel02028311님의 프로필 이미지
    enciel02028311

    受講レビュー 3

    平均評価 5.0

    5

    30% 受講後に作成

    It's exciting like watching a movie, as the story about design continues~ I'll keep listening carefully~ Thank you for the good lecture!

    • eternity
      知識共有者

      Thank you for leaving a review, Byung-mo Kim. It's structured to show how design principles are applied while improving examples, and it seems you're enjoying it. :) The difficulty increases slightly as you go towards the latter part, but more interesting content awaits, so please make sure to complete the course. If you have any questions or parts that need correction, please feel free to ask anytime. Have a great Friday night and spend happy days.

  • soljie742878님의 프로필 이미지
    soljie742878

    受講レビュー 2

    平均評価 5.0

    修正済み

    5

    100% 受講後に作成

    Following the basic course, this seems like the best lecture on object-oriented programming. It is very substantial as it is composed of well-structured content from concepts to examples.

    • eternity
      知識共有者

      Thank you for leaving a course review, soljie74. If 'Object - Basic' explained how to write object-oriented code, 'Object - Design Principles' aimed to explain how to improve design using object-oriented principles, and I'm glad it was helpful. If you have any questions or suggestions for improvement, please feel free to ask anytime. Congratulations on completing the course, and have a good rest of your weekend!

  • chrispark님의 프로필 이미지
    chrispark

    受講レビュー 6

    平均評価 5.0

    5

    100% 受講後に作成

    This is a premium lecture on the core principles and fundamentals of object-oriented development~ I can say there's a world of difference between developing with knowledge of these principles versus developing without them. If you're currently developing without knowing these principles, you'll eventually realize that you've been writing spaghetti code~!! :) Let's all keep fighting today to create code that's easy to maintain~ 😊

    • eternity
      知識共有者

      Thank you so much for leaving a review, Chris Park. As you mentioned, I hope many people will be able to write clean code based on design principles. I'm so grateful that you're satisfied with the course, and I'll work hard to prepare the next course as well! Have a happy weekend. :)

¥13,058

eternityの他の講座

知識共有者の他の講座を見てみましょう!

似ている講座

同じ分野の他の講座を見てみましょう!