プリンキピア

第2章計算論的思考と設計の再利用性

INDUSTRY SPOTLIGHT産業の現場から
Case Study: Making Online Shopping Easier with Smart Design事例研究:賢い設計でオンラインの買い物を簡単にする
Imagine an online store called SwiftShop. They had a problem. Even though they had lots of great products to buy, people were leaving their website without buying anything. It was like having a store full of customers who walked in and out without buying anything! The business challenge is SwiftShop wanted to make shopping on their website easier and more fun. They wanted people to stay longer, buy more, and come back again and again. SwiftShop decided to use smart design tricks to fix their website and make it super easy to shop. Here’s how they did it:
英語のヒント
SwiftShopというオンラインストアを思い浮かべよう。この店には問題があった。すばらしい商品が数多くあるのに、人々は何も買わずにウェブサイトを離れていた。店内には客が大勢いるのに、誰も買わずに出入りしているような状態だった。SwiftShopが直面するビジネス上の課題は、サイトでの買い物を、より簡単で楽しいものにすることだった。長く滞在して、多くの商品を買い、何度も戻ってきてほしいと考えた。そこで賢い設計上の工夫を使ってサイトを直し、とても買い物しやすくすることにした。その方法を見てみよう。
• User interface (UI) design patterns: Breadcrumb navigation: SwiftShop added breadcrumb trails so shoppers could easily see where they were on the website and find their way back if they got lost.
英語のヒント
• ユーザーインターフェース(UI)のデザインパターン:パンくずナビゲーション。SwiftShopは、利用者がサイト内の現在位置を簡単に把握し、迷ったら戻れるよう、パンくずリストを追加した。
• Progress indicators: During checkout, SwiftShop put in progress bars so shoppers knew how far along they were in the buying process.
英語のヒント
• 進捗表示:購入手続きの際、どこまで進んだかが買い手にわかるよう、SwiftShopは進捗バーを設けた。
• Information architecture (IA) design patterns: Card sorting: SwiftShop asked real shoppers to help organize their products. By sorting cards and asking people how they’d group things, SwiftShop made it easier to find what customers were looking for.
英語のヒント
• 情報アーキテクチャー(IA)のデザインパターン:カードソーティング。SwiftShopは、実際の買い物客に商品の整理を手伝ってもらった。カードを分類し、商品をどうグループ分けするかを尋ねることで、顧客が求めるものを見つけやすくした。
• Faceted search: SwiftShop added filters so shoppers could narrow down their searches by attributes like price, size, and brand.
英語のヒント
• ファセット検索:SwiftShopは絞り込み機能を追加し、価格、サイズ、ブランドなどの属性から検索範囲を狭められるようにした。
• Interaction design (IxD) patterns: One-click purchase: To speed up the buying process, SwiftShop let registered users buy with just one click.
英語のヒント
• インタラクション設計(IxD)のパターン:ワンクリック購入。購入手続きを速くするため、SwiftShopは登録済みの利用者が一度のクリックだけで買えるようにした。
• Personalized recommendations: SwiftShop used machine learning algorithms to suggest products that customers might like based on what they’ve bought before.
英語のヒント
• 個別のおすすめ:SwiftShopは機械学習のアルゴリズムを使い、過去の購入品に基づいて、顧客が好みそうな商品を提案した。
• Results: After making these changes, SwiftShop saw great results:
• 結果:これらの変更を加えた後、SwiftShopは大きな成果を得た。
◦ More people buying: With the new features, more people ended up buying products from SwiftShop.
◦ 購入者の増加:新しい機能によって、SwiftShopから実際に商品を買う人が増えた。
◦ Happier shoppers: Customers spent more time on the website, which meant they liked shopping there more.
◦ 買い物客の満足度の向上:顧客のサイト滞在時間が長くなり、そこでの買い物を以前より好んでいることが示された。
◦ More repeat customers: Because it was easier to shop, people kept coming back to SwiftShop again and again.
◦ リピーターの増加:買い物が簡単になったため、人々は何度もSwiftShopを訪れるようになった。
So, by using smart design tricks like breadcrumb navigation, progress indicators, card sorting, faceted search, one-click purchase, and personalized recommendations, SwiftShop made their online store a better place to shop.
こうしてSwiftShopは、パンくずナビゲーション、進捗表示、カードソーティング、ファセット検索、ワンクリック購入、個別のおすすめといった賢い設計の工夫を使い、オンラインストアをより買い物しやすい場所に変えた。
Layering and Componentization階層化と部品化
Two heuristics are inherent to the design of business solutions and the creation of business solution architectures. These heuristics are known as layering and componentization and can be thought of as design approaches followed with an intent of architectural concerns.
英語のヒント
ビジネスソリューションの設計と、そのアーキテクチャーの作成には、二つのヒューリスティクスが本質的に含まれる。階層化と部品化である。これらは、アーキテクチャー上の関心事を考慮して採用する設計方法と考えられる。
Componentization has already been introduced as a computational thinking and adaptive design reuse technique.1 Layering in business solution architecture involves creating distinct layers that abstract specific aspects of the overall architecture. This heuristic enables the separation of concerns between layers and improves modularity. Each layer comprises components, and a layer may consist of multiple components. This hierarchical structure helps organize and separate different functionalities or responsibilities within the architecture, making it easier to manage and understand.
英語のヒント
部品化は、計算論的思考と適応的な設計の再利用の技法として、すでに紹介した。1ビジネスソリューションのアーキテクチャーにおける階層化では、全体のアーキテクチャーの特定の側面を抽象化する、別々の層を作る。このヒューリスティクスにより、層の間で関心事を分離でき、モジュール性が高まる。各層は部品からなり、一つの層が複数の部品を含むこともある。この階層構造によって、アーキテクチャー内の異なる機能や責務が整理・分離され、管理と理解が容易になる。
The layering strategy is based on the concept of separating different concerns. This method structures software design into distinct, stacked layers, with each layer tasked with specific functions. Commonly, business solution architectures are organized into three main layers: the presentation, business logic, and data management layers. The presentation layer is the user’s touchpoint, handling the user interface (UI) and delivering the user experience (UX), which is the overall experience that a person has when interacting with a product, service, or system. The business logic layer holds the business logic for the business solution or application, separating the UI/UX from the business-centric computations. This separation affords the flexibility to adjust business operations as needs evolve without disrupting other system components. Although not tied to a specific domain, the data management layer is responsible for interacting with persistent storage systems like databases and various data processing mechanisms. In a layered architecture, information and commands flow through each layer, enhancing the design’s abstraction level, which denotes the granularity or detail at which a system is represented. Despite its structured approach and abstraction benefits, software designed in this layered manner might lean toward a monolithic build, potentially making modifications challenging. Layered architecture can lead to tightly connected layers in software, making it difficult to change one part without affecting others. This tight connection can also make it harder to update or expand the software.
英語のヒント
階層化の戦略は、異なる関心事を分離するという考えに基づく。ソフトウェア設計を、積み重ねられた別々の層に構造化し、各層に特定の機能を担当させる。一般的なビジネスソリューションのアーキテクチャーは、プレゼンテーション層、ビジネスロジック層、データ管理層の三つの主要な層からなる。プレゼンテーション層は利用者との接点であり、ユーザーインターフェース(UI)を扱い、ユーザーエクスペリエンス(UX)を提供する。UXとは、人が製品、サービス、システムを使うときに得る体験全体である。ビジネスロジック層は、解決策やアプリケーションの業務上の論理を保持し、UI・UXと、ビジネスを中心とする計算とを分離する。この分離によって、ほかのシステム部品を妨げずに、ニーズの変化に合わせて業務を調整する柔軟性が得られる。データ管理層は、特定の業務領域に結びつくものではないが、データベースのような永続的な記憶システムや、さまざまなデータ処理の仕組みとのやり取りを担当する。階層化アーキテクチャーでは、情報や命令が各層を通って流れ、設計の抽象化水準が高まる。抽象化水準とは、システムをどの粒度、どの程度の細かさで表すかを示すものである。構造の明確さや抽象化の利点があっても、このように階層化して設計したソフトウェアは、一枚岩の構成に傾き、修正が難しくなることがある。階層化アーキテクチャーによって層同士が密接につながると、一部を変えるだけでもほかの部分へ影響し、変更が難しくなる。この密接な結びつきは、更新や拡張も難しくすることがある。
A monolithic structure is a type of system or application where all the parts are closely combined into one single unit. This setup means that everything from the user interface to data handling and processing is interconnected within one big software application. While this can make the system easier to set up and manage initially, it also means that changing one part can require changes throughout the whole system, making it less flexible. As illustrated in Figure 2.10, there are many more recent variations of layered architectures that also provide complementary capabilities, such as tiered architectures, service-oriented architectures (SOA), and microservices architectures.2
英語のヒント
モノリシックな構造とは、すべての部分が密接に結合され、一つの単位になっているシステムやアプリケーションの構成である。ユーザーインターフェースからデータの取り扱いや処理まで、すべてが一つの大きなソフトウェアの中でつながっている。初期の構築や管理は容易になる場合があるが、一部を変更するにはシステム全体で変更が必要になることもあり、柔軟性が低くなる。図2.10のように、階層化アーキテクチャーには、階層配置型アーキテクチャー、サービス指向アーキテクチャー(SOA)、マイクロサービスアーキテクチャーなど、補完的な機能も提供する、さらに新しい多くの変種がある。2
1 Componentization was used initially in component-based business solution architectures that were derived from the Object Management Group’s Object Management Architecture (OMA), including CORBA 3, JEE, DCOM, and COM+. 2 Per an article written by Thoughtworks Martin Fowler in 2014, the microservice architectural style is an approach to developing a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms, often an HTTP resource API. These services are built around business capabilities and independently deployable by fully automated deployment machinery. There is a bare minimum of centralized management of these services, which may be written in different programming languages and use different data storage technologies.
英語のヒント
1 部品化は当初、Object Management GroupのObject Management Architecture(OMA)から派生した、部品に基づくビジネスソリューションのアーキテクチャーで使われた。CORBA 3、JEE、DCOM、COM+などがその例である。2 Thoughtworksのマーティン・ファウラーが2014年に書いた記事によれば、マイクロサービスというアーキテクチャー様式は、小さなサービスの組として一つのアプリケーションを開発する方法である。各サービスは自分自身のプロセスで動作し、多くの場合HTTPリソースAPIなどの軽量な仕組みで通信する。これらのサービスは業務上の能力を中心に構築され、完全に自動化された配備の仕組みによって独立に配備できる。サービスの集中管理は必要最小限にとどまり、サービスごとに異なるプログラミング言語で書き、異なるデータ保存技術を使うこともできる。
Figure 2.10

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

Figure 2.10 The different layered architectures include tiered architectures, service-oriented architectures (SOA), and microservices architectures. (attribution: Copyright Rice University, OpenStax, under CC BY 4.0 license)
図2.10 階層化アーキテクチャーのさまざまな種類には、階層配置型アーキテクチャー、サービス指向アーキテクチャー(SOA)、マイクロサービスアーキテクチャーがある。(出典:著作権Rice University、OpenStax。CC BY 4.0ライセンス)
Detailed coverage of these specific architectures is not part of the scope of this chapter. They will be discussed in more detail in multiple later chapters. It’s fundamental to understand that each software architecture model is crafted to address the key challenges found in its preceding models. Being well-versed in various architectural approaches equips you to devise a robust and effective architecture for your specific project. While no software architecture can claim absolute perfection, an approach can be deemed highly suitable or “relatively perfect” if it aligns well with the specific requirements and goals of your current project.
英語のヒント
これら個々のアーキテクチャーを詳しく扱うことは、本章の範囲を超える。後の複数の章で詳しく説明する。各ソフトウェアアーキテクチャーモデルは、それに先行するモデルの重要な課題に対処するために作られていると理解することが、基本となる。さまざまなアーキテクチャーの方法をよく知ることで、自分のプロジェクトに適した、堅牢で効果的なアーキテクチャーを考案できる。絶対的に完璧だといえるアーキテクチャーはないが、現在のプロジェクトに固有の要件や目標にうまく適合していれば、非常に適切、あるいは「相対的に完璧」と評価できる。