Skip to Content
C4モデル (Japanese Edition)
book

C4モデル (Japanese Edition)

by Simon Brown
June 2026
Intermediate
180 pages
2h 27m
Japanese
O'Reilly Media, Inc.
Content preview from C4モデル (Japanese Edition)

第7章 動的 図

この作品はAIを使って翻訳されている。ご意見、ご感想をお待ちしている:translation-feedback@oreilly.com

これまで見てきた図は、ソフトウェアシステム、コンテナ、構成要素、コードという4つの抽象化レベルにおいて、ソフトウェアシステムの静的構造について考え、説明し、コミュニケーションするためのアプローチを提供している。私がソフトウェアシステムを文書化する必要があった際、作成した図のほとんどは静的構造の説明でもあった。

しかし、ソフトウェアは静的なものではなく、実際に何かを行うためには実行されなければならない。このため、個々の機能の実行中に実行時で何が起きるかを示す図を作成することは有用である。これが、C4モデルにおける動的図の目的である。

動的図の重要な側面

動的図の意図、範囲、コンテンツ、ユースケース、対象読者を理解することで、いつ、どのようにそれらを使用すべきかがわかるようになる。

意図

静的構造図は、ソフトウェアシステムを構成する静的要素と関係の完全なセットを示すものであるが、個々の機能には、実行時にコラボレーションするそれらの要素のサブセットのみが関与する。動的図の意図は、その機能の提供に使用される要素のみを示すことで、個々の機能が実行時にどのように動作するかを説明することにある。

範囲

動的図の範囲は、伝えたいストーリーやその伝え方によって異なる。最も抽象化レベルの高いレベルでは、特定のビジネス機能を提供するためにソフトウェアシステムが実行時にどのようにコラボレーションするかを示すことができる。最も低いレベルでは、構成要素内のコード要素が実行時にどのようにやり取りして、その構成要素の特定の機能を実行するかを示すことができる。

静的な構造図と同様に、図の範囲は可能な限り限定することを推奨する。例えば、あるコンテナ内の構成要素が別のコンテナ内の構成要素とどのようにやり取りをするかを示すこともできる。しかし、特にそれらのコンテナが複数のソフトウェアシステムにまたがる場合は、そうした誘惑に負けない方が賢明だ。この背後にある理由については、第11章で基礎を超えた内容を取り上げる際に詳しく説明する。

コンテンツ

動的図は、要素、より具体的には要素のインスタンスが、実行時にどのようにやり取りをするかを示すものである。UMLのシーケンス図やコラボレーション図の概念を用いて、振る舞いを視覚化することができる。

シーケンス図

UMLシーケンス図(図7-1)は、やり取りする複数の要素インスタンス(左から右)とタイムライン(上から下)を示す。この図は、メッセージの送信やリクエストの発行などを通じて、要素がどのようにコラボレーションするかを(水平矢印を用いて)示す。矢印の垂直方向の順序は、開始から終了までのシーケンスを表す。

A UML sequence diagram illustrating interaction flow with messages from element A to B, and then from B to C, showing steps 1 and 2.
図7-1. UMLシーケンス図の例

UMLシーケンス図は通常、実行時にコラボレーションするクラスのインスタンス(オブジェクト)を示すものだが、人、ソフトウェアシステム、コンテナ、構成要素といった他の静的要素のインスタンスを示すことを妨げるものは何もない。

すでにUMLシーケンス図に慣れているなら、ガード条件、ループ、ライフラインイベント(例:生成や破棄)を使って、さらに詳細に指定できることはご存知だろう。UMLツールを使って動的な図を作成しているなら、これらのUML機能が価値をもたらすと判断すれば、遠慮なく活用してほしい。 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

製品志向のエンジニア (Japanese Edition)

製品志向のエンジニア (Japanese Edition)

Drew Hoskins
AIプロジェクトの管理 (Japanese Edition)

AIプロジェクトの管理 (Japanese Edition)

Malini Jain Runtasewee, Adrián González Sánchez
AIに適したデータ設計図 (Japanese Edition)

AIに適したデータ設計図 (Japanese Edition)

Navnit Shukla, Kien Pham, Srikanth Sopirala, Harsha Tadiparthi

Publisher Resources

ISBN: 0642572404864