プリンキピア

第9章ソフトウェア工学

Elaboration Framework Activity推敲の活動
The elaboration phase further analyzes the requirements to produce design models of the system to be developed. In this phase, you take a deeper dive into the specifics of the software. Requirements are refined in detail, a detail design is created that outlines the architecture of the software, and the potential risks associated with the project are identified and assessed. Design models are defined at a high-level initially to represent the various facets of the architecture of the solution that is being developed at a given level of scope. The scope could be that of a whole enterprise, a portfolio of solutions contemplated by a business unit, or a specific solution being developed by a business unit as part of a given project. Architectural facets are typically based on architectural domains specified in mainstream architecture frameworks. For example, The Open Group Architecture Framework (TOGAF) splits high-level architecture representations into four domains: business architecture, application architecture, data/information/knowledge/wisdom architecture, and infrastructure architecture. Various high-level modeling languages and associated tools may be used to facilitate the creation of high-level architecture models (e.g., TOGAF’s Archimate Certified Tools4 ). The management of enterprise and solution architectures is described in more detail in Chapter 10 Enterprise and Solution Architectures Management of this book.
英語のヒント
推敲のフェーズでは、要求をさらに分析し、開発するシステムの設計モデルを作る。ソフトウェアの具体的な内容へ、より深く踏み込む段階である。要求を詳しく練り上げ、アーキテクチャの概要を示す詳細設計を作成し、プロジェクトに関わる潜在的なリスクを洗い出して評価する。設計モデルはまず高水準で定義し、対象範囲における仕組みのアーキテクチャのさまざまな側面を表す。対象範囲は企業全体の場合もあれば、一つの事業部門が検討する複数の仕組みのポートフォリオ、あるいはその部門が特定のプロジェクトで開発する一つの仕組みの場合もある。アーキテクチャの側面は、一般に主要なアーキテクチャフレームワークで指定される領域に基づく。たとえば、The Open Group Architecture Framework(TOGAF)は、高水準のアーキテクチャ表現を、業務、アプリケーション、データ・情報・知識・知恵、インフラという四つの領域に分ける。高水準のモデルの作成には、各種の高水準モデリング言語と関連ツールを利用できる。TOGAFのArchiMate認定ツール4などがその例である。エンタープライズアーキテクチャとソリューションアーキテクチャの管理は、本書の第10章「エンタープライズアーキテクチャとソリューションアーキテクチャの管理」で、さらに詳しく述べる。
A detailed-level design model may then be derived from the high-level architecture model, and it is typically represented using a combination of low-level modeling languages (e.g., BPMN, UML, SysML). At this level of design, a conceptual solution that fulfills the requirements is created and seeks to answer the question “How will the system fulfill the requirements?” The conceptual solution leverages the inputs collected in the inception phase to design a software product. This information is generally organized into two types of design: logical and physical.
英語のヒント
続いて、高水準のアーキテクチャモデルから詳細水準の設計モデルを導き出すことができる。これは通常、BPMN、UML、SysMLなど、低水準のモデリング言語を組み合わせて表す。この設計段階では、要求を満たす概念上の解決策を作り、「システムはどのように要求を満たすか」という問いに答えようとする。その概念上の解決策は、立ち上げで集めた情報を使ってソフトウェア製品を設計するものである。情報は通常、論理設計と物理設計という二種類に整理される。
Logical design ignores any physical aspects. For example, a cruise control system needs to keep track of the maximum speed selected and whether the cruise control system is on or off. This information is gathered as part of the logical design and needs to be captured via a diagram that also identifies the corresponding relationships. This type of information is often captured as a set of entities (or actors) that enable the grouping of descriptive information and attributes.
英語のヒント
論理設計では物理的な側面を考慮しない。たとえば、クルーズコントロールは、選択された最高速度と、装置がオンかオフかを把握しなければならない。この情報を論理設計の一環として集め、関連する関係も明示した図によって記録する必要がある。こうした情報は、記述的な情報や属性をまとめられる、一連のエンティティまたはアクターとして表すことが多い。
A graphical representation of the method for effectively implementing what was determined in the logical design of a software solution is a physical design. It includes defining where information comes from and where it goes within the planned system. It includes defining how information is obtained, processed, and/or how it is presented. For example, the physical design for turning on or off the cruise control system within an automobile can include using controls made available to the driver on the steering wheel to turn on or off the cruise. There could also be controls via pressing the brake pedal to turn off the system.
英語のヒント
ソフトウェアの論理設計で決めたことを、効果的に実装する方法を図で表したものが物理設計である。計画中のシステムのなかで、情報がどこから来てどこへ行くか、どのように取得し、処理し、表示するかなどを定義する。たとえば、自動車のクルーズコントロールをオン・オフする物理設計では、ハンドルにある操作部を運転者が使って切り替える方法を採用できる。また、ブレーキペダルを踏むと装置をオフにする操作も考えられる。
Work on the logical and physical designs is generally performed first as a high-level design software engineering action followed by a detail-level design software engineering action. The focus of the high-level design (HLD) software engineering action is on providing a general description of the overall system design, and can include information on the overall aspects of a system including its architecture, data, systems, services, and platforms as well as the relationships among various modules and components. Its focus is to convert the requirements into a high-level representation of the solution that can then be further refined as part of detail-level design.
英語のヒント
論理設計と物理設計の作業は、通常、まず高水準設計のアクションとして行い、その後に詳細水準の設計を行う。高水準設計(HLD)では、システム全体の設計を大まかに記述することを重視する。アーキテクチャ、データ、システム、サービス、プラットフォームなどの全体的な側面と、各種モジュールや構成要素の間の関係についての情報を含めることができる。その主眼は、要求を仕組みの高水準の表現へ変換し、後の詳細設計でさらに練り上げられるようにすることにある。
The focus of the detail-level design (DLD) software engineering action is to detail or expand upon the HLD. As part of the DLD, every element of a system is provided with detailed specifications, and the logic for each component within each module of a system solution is determined. DLD is then used to implement the actual solution as part of the construction phase of the software process.
英語のヒント
詳細水準の設計(DLD)では、HLDを詳しくし、展開することを重視する。DLDでは、システムのあらゆる要素に詳細な仕様を与え、各モジュール内の構成要素ごとに処理の論理を決める。続いて、開発工程の構築フェーズで、このDLDを使って実際の仕組みを実装する。
Some of the differences between HLD and DLD are:
HLDとDLDには、たとえば次のような違いがある。
• HLD gives high-level descriptions of functionality, whereas DLD gives details of the functional logic within each component of a system.
• HLDは機能を高水準で説明し、DLDは各構成要素の内部で機能を実現する論理を詳しく示す。
• HLD is created first, with DLD created as an extension of the HLD.
• HLDを先に作り、その拡張としてDLDを作る。
• HLD is based on the requirements of the software solution, whereas DLD is based on extending the HLD. DLD should, however, still align with the requirements.
• HLDはソフトウェアへの要求に基づき、DLDはHLDを展開することに基づく。ただし、DLDも要求との整合性を保たなければならない。
• HLD provides elements such as data and information design, whereas DLD provides the information needed to create the actual programming specification and test plan for using the data.
• HLDはデータや情報の設計などの要素を示し、DLDは、そのデータを使う実際のプログラミング仕様とテスト計画を作るために必要な情報を示す。
• A solution architect is generally involved with the HLD. Programmers and designers are generally involved with DLD.
• HLDには一般にソリューションアーキテクトが関わる。DLDには一般にプログラマーや設計者が関わる。
Software Architecture Work Product
成果物としてのソフトウェアアーキテクチャ
The software architecture work product acts as a blueprint of the solution being worked on. Imagine you’re building a house. Before construction begins, you would create a blueprint that outlines the overall structure, major components (foundation, walls, roof), and how they fit together. This blueprint is similar to a software architecture. In software development, a software architecture provides a high-level overview of a software system. It describes the system’s major components, their interrelationships, and how they work together. This high-level representation helps developers understand the overall design before delving into details.
英語のヒント
ソフトウェアアーキテクチャという成果物は、開発中の仕組みの設計図として働く。家を建てるところを想像してみよう。着工前には、全体の構造、基礎・壁・屋根などの主要な構成要素、それらの組み合わせ方を示す設計図を作る。この設計図に相当するのが、ソフトウェアアーキテクチャである。開発では、アーキテクチャがシステムを高水準で概観するための情報を提供する。主要な構成要素と相互関係、それらが協調して働く方法を記述する。この表現によって、開発者は細部へ踏み込む前に全体の設計を理解できる。
4 https://www.visual-paradigm.com/features/archimate-tools/
4 https://www.visual-paradigm.com/features/archimate-tools/
A solution is typically represented at various levels of abstraction. Software design involves using software architectures to represent solutions at a high-level of abstraction. A software architecture constitutes a relatively small, intellectually graspable view of how a solution is structured and how its components work together. The goal of software architecture modeling is to allow the software engineer to view and evaluate the system as a whole before moving to component design. This step enables the software engineer to:
英語のヒント
一つの仕組みは通常、さまざまな抽象度で表される。ソフトウェア設計では、アーキテクチャによって高い抽象度で表現する。アーキテクチャは、仕組みの構造と構成要素の協調のしかたを、比較的小さく、頭の中で把握できる形で示すものである。アーキテクチャをモデル化する目標は、個別の構成要素を設計する前に、システムを全体として見て評価できるようにすることにある。この段階によって、エンジニアは次のことを行える。
• ensure that the design model encompasses the various solution requirements
• 設計モデルが、その仕組みに対するさまざまな要求を含んでいることを確かめる。
• make it possible to survey various design alternatives early on to facilitate the adoption of the best possible model
• 早い段階で複数の設計案を検討し、可能な限り最良のモデルを採用しやすくする。
• limit the risk of building software that does not meet the requirements
• 要求を満たさないソフトウェアを作ってしまうリスクを抑える。
When you look at a blueprint, you can see the major elements of a building and their relationships to each other. When you look at a software system at a high-level of abstraction, such as the extremely high-level shown in Figure 9.7 of a web browser, you can see its major components and the main connections between them. For example, at a high-level, a web browser connects to a web server via HTTP requests, and the web server interacts with a relational database via SQL queries to create an HTML web page that is rendered dynamically and sent back to the web browser for display.
英語のヒント
建物の設計図を見ると、主要な要素と相互の関係が分かる。ソフトウェアシステムも、図9.7のWebブラウザーの例のように、極めて高い抽象度で見ると、主要な構成要素と、その間の主な接続が見える。たとえば大まかにいえば、WebブラウザーはHTTP要求でWebサーバーへ接続する。WebサーバーはSQL問い合わせを通じてリレーショナルデータベースとやり取りし、動的に描画されるHTMLのWebページを作成してブラウザーへ返し、表示させる。
Figure 9.7

attribution: Copyright Rice University, OpenStax, under CC BY 4.0 license · CC BY 4.0 · Source出典

Figure 9.7 The software architecture displays a system’s major components (in this case, web browser, web server, and database) and connections (HTTP requests and SQL queries) at a high-level of abstraction. (attribution: Copyright Rice University, OpenStax, under CC BY 4.0 license)
図9.7 ソフトウェアアーキテクチャは、システムの主要な構成要素(この例ではWebブラウザー、Webサーバー、データベース)と接続(HTTP要求とSQL問い合わせ)を、高い抽象度で示す。(帰属:Rice University、OpenStax著作権、CC BY 4.0ライセンス。)
Software architecture is an important part of the creation of a software solution, and it should always be designed by an experienced software engineer because changes in the software architecture typically have drastic effects on the solution implementation such as constructing solutions that do not meet the nonfunctional requirements.
英語のヒント
アーキテクチャは、ソフトウェアによる仕組みの作成において重要な部分を占める。変更すると、非機能要件を満たさない仕組みを構築してしまうなど、実装へ大きな影響を及ぼすことが多い。そのため、必ず経験のあるソフトウェアエンジニアが設計すべきである。
When designing software architecture, you can leverage various types of software patterns that facilitate the reuse of preexisting solutions. Two examples of such patterns are an architectural style and architectural or design pattern. An architectural style is a transformation that is imposed on the design of an entire system. The intent is to establish a structure for all components of the system. Architectural or design patterns also impose a transformation on the design of an architecture, but they differ from a style because they operate at a lower level of abstraction. Patterns can be used in conjunction with an architectural style that shapes the overall structure of a system.
英語のヒント
アーキテクチャの設計では、既存の解決策の再利用を助ける、各種のソフトウェアパターンを活用できる。例として、アーキテクチャスタイルと、アーキテクチャパターンまたは設計パターンがある。スタイルとは、システム全体の設計へ適用する変換であり、すべての構成要素の構造を定めることを意図する。アーキテクチャパターンや設計パターンも、アーキテクチャの設計へ変換を加えるが、より低い抽象度で作用する点がスタイルとは異なる。パターンは、全体構造を形づくるアーキテクチャスタイルと組み合わせて使える。
A software architecture is one of the work products that results from the HLD software engineering action. Software architectures are important work products because they provide high-level representations of solutions that facilitate communication among all stakeholders. They also highlight early design decisions that have a profound impact on all software engineering work that follows
英語のヒント
ソフトウェアアーキテクチャは、HLDのアクションから得られる成果物の一つである。高水準で仕組みを表し、すべての利害関係者の間の意思疎通を助けるため、重要な成果物となる。また、以後のすべての開発作業へ大きな影響を及ぼす、初期の設計判断を明らかにする。
When it comes to Agile software processes, the goal of creating software architecture work products as part of the HLD software engineering action is to avoid rework. In that case, user stories are leveraged to create and evolve an architectural model (sometimes referred to as a “walking skeleton”) before constructing the software. The use of Agile software processes sometimes makes it difficult to manage architectural design especially when the team is developing large systems from scratch rather than adding small services piecemeal to an existing system. Agile approaches typically focus on small increments for which it may be difficult to produce an all-encompassing architecture that will be able to accommodate subsequent increments that have not been completely defined yet. This may lead to having to refactor the architecture, which could be very costly, as it may require changing a lot of the code that has already been developed. Therefore, it is recommended that teams thoroughly consider architectural design when taking on large projects that do not build on an already defined and solid architecture. This brings up the question as to whether big design up front (BDUF) is the preferred method in this case. It is also the reason Agile teams should include software engineers with a strong background in architecture (ideally, (enterprise architecture), who can foresee the type of designs that are required to avoid costly refactoring efforts in the future.
英語のヒント
アジャイル型の工程で、HLDの一環としてアーキテクチャの成果物を作る目標は、やり直しを避けることである。ソフトウェアを構築する前に、ユーザーストーリーを使ってアーキテクチャモデルを作り、発展させる。このモデルは「動く骨組み」と呼ばれることもある。アジャイル型の工程では、アーキテクチャの設計を管理しにくくなる場合がある。特に、既存のシステムへ小さなサービスを少しずつ追加するのでなく、大規模なシステムを一から開発する場合に難しくなる。アジャイルは通常、小さな追加分に焦点を合わせるため、まだ完全に定義されていない後続の追加分まで受け入れられる、全体を包含したアーキテクチャを作りにくい。その結果、アーキテクチャのリファクタリングが必要になることがある。開発済みの多くのコードを変更しなければならない場合もあり、費用は非常に大きくなり得る。そこで、既に定義された確かなアーキテクチャを土台としない大規模なプロジェクトに取り組む際は、設計を十分に検討することが推奨される。ここで、事前に大規模な設計を行うBDUFが望ましいのか、という問題が生じる。また、このことは、アジャイルチームにアーキテクチャ、できればエンタープライズアーキテクチャに詳しいエンジニアを含めるべき理由でもある。そのような人なら、将来の高価なリファクタリングを避けるために必要となる設計の種類を見通せる。
The Scrum and Kanban Agile process models, as you’ll learn later in the chapter, allow software architects to add user stories to the evolving storyboard and to work with the product owner to prioritize their architectural stories in work units called sprints. Well-run Agile projects include the delivery of software architecture documentation during each sprint. After the sprint is complete, the architect reviews the working prototype for quality before the team presents it to the stakeholders in a formal sprint review.
英語のヒント
本章の後半で学ぶScrumとKanbanのアジャイルモデルでは、アーキテクトが更新中のストーリーボードへユーザーストーリーを追加し、プロダクトオーナーと協力して、スプリントという作業単位のなかでアーキテクチャに関するストーリーの優先順位を付けられる。適切に運営されるアジャイルプロジェクトでは、各スプリントでアーキテクチャの文書も提供する。スプリントが終わると、チームが正式なスプリントレビューで利害関係者に試作品を見せる前に、アーキテクトが動作する試作品の品質を点検する。
As mentioned earlier, the focus of the HLD software engineering action is on providing a general description of the overall system design. It can include information on the overall aspects of a system, including its architecture, data, systems, services, and platforms as well as the relationships among various modules and components. Its focus is achieved by converting the requirements into a high-level solution that can then be further refined as part of the Low-Level Design (LLD) software engineering action.
前述のとおり、HLDはシステム全体の設計を大まかに記述することを重視する。アーキテクチャ、データ、システム、サービス、プラットフォームなどの全体的な側面と、さまざまなモジュールや構成要素の間の関係を含めることができる。要求を高水準の解決策へ変換し、その後、低水準設計(LLD)のアクションでさらに詳細化できるようにすることで、この目的を達成する。