SlideShare a Scribd company logo
1 of 70
Download to read offline
Introduction of “ICONIX”
Practical Method of OOAD
for not being swept away by trends as a Java User
21th-Nov-2016
Naoya Kojima
@jugemix
Profile
u I am …
u Father / Husband / A just application developer interested in Application design & Testing
u I love making / drinking coffee very much (^^)v
u Specialty
u Automation Test ( with JavaSE AspectJ Junit/TestNG Selenium WebDriver )
u I make a keyword-driven test system.
Notice
um(_ _)m
本題までが⻑いですが、
何卒お付き合い下さい。
Today I talk about
Design Software
Application
Design
ICONIX
u(^_^)
u早速ですが
u(^_^;)
uそもそもDesignって
何をするんでしたっけ?
What is …
Software Design
u Quote from wikipedia https://en.wikipedia.org/wiki/Software_design
u(^_^;)
u・・・難しいですね
u(^_^)
u分からないので調べ
ました
What is …
Software Design 2
u Mr. Grady Booch Said …
u “Design is an ordered approach to exploit
answers to a problem.”
u Quote from Object-Oriented Analysis and
Design with Applications, 2nd Edition 1995
What is …
Software Design 3
u Dr. Jack Mostow ( Carnegie Mellon University ) Said …
u Purpose of design
u Satisfies a given (perhaps informally) functional specification
u Conforms to limitations of the target medium
u Meets implicit or explicit requirements on performance and resource
usage, e.g., time, space, power, cost
u Satisfies implicit or explicit design criteria on the form of the artifact,
e.g., style, simplicity, testability, maintainability, reliability, reusability,
manufacturability, modularity, etc. ( Make Quality !! )
u Satisfies restrictions on the design process itself, such as its length or
cost, or the tools available for doing the design (e.g., drafting table
versus graphic editor).
u Quote from Toward Better Models Of The Design Process 1985
What is …
Software Design 4
u Bjarne Stroustrup (development of the C++ programming language. ) Said …
u Purpose of design
u The purpose of the design is to create a clear and relatively simple internal
structure, what is called an architecture. Design is the final product of the design
process.
u Quote from Object-Oriented Analysis and Design with Applications, 2nd Edition 1995
What is …
Software Design 5
u Mr. Grady Booch summarize …
u The design includes tasks to balance the competing set of requirements,
u allowing you to think logically of the structure,
u considering trade-offs when requirements collide,
u and in general the implementation's perspective.
u The model that provides the design is the deliverable of the design.
u(^_^;)
u結局、何をすればDesign
と⾔えるのかな?
u(^_^;)
uそれに・・・
そもそもSoftwareって
何でしたっけ?
Software is …
Origin
u Quote from Wikipedia https://en.wikipedia.org/wiki/Software#Purpose.2C_or_domain_of_use
u by Alan Turing
u part of a computer system that consists of encoded information or computer instructions
u by John W. Tukey ( on developing statistical methods for computers where he invented the term "bit")
u In computer science and software engineering, computer software is all information processed by computer systems, programs
and data.
System Software is …
indirectly effects
u In low-level language
u Software written in machine language does not directly affect the user.
u But by combining changing the state of the processor, it is possible to give the user
an indirect effect such as changing the state of the Personal Computer.
u In high-level language
u Software written in machine language affect the user directly.
Non System Software is …
directly effects
u(^_^)
uつまり
Hardware
Low-Level Lang
High-Level Lang
System Software
Application Software
etc.
Software written in
high-level programming language is …
System Software
Application
Software
Java Application
Software
People
Device Drivers
Java
Device Driver
Devices
Utilities
Java Utility
Software
Programs
Software
Various types of
use useuse
u(^_^)
uSoftwareの種類毎に
User( Actor )が異なる
u(^_^)
uUse CaseはSoftwareの
Actorに対する振る舞い
u(^_^)
uしかもActorの実体
は様々
u (^_^)
u 経営を仕事とするActor
u ⼈事を仕事とするActor
u プリンタ制御をするActor
u メモリを管理するActor
u etc・・・
u(^_^)
uSoftwareの種類・⽬的に
応じて、設計⽅法も
多様に変化するのでは?
u(^_^)
uSoftwareの種類を
限定して設計⽅法を
調べよう
How do I …
Design
u With the word of Mr. Booch …
u The design includes tasks
u to balance the competing set of requirements,
u allowing you to think logically of the structure,
u considering trade-offs when requirements collide,
u 要求から問題領域を正確に捉えること
u 問題領域から解決領域へたどり着くプロセスを明確にすること
u and in general the implementation‘s perspective model that provides the design is
the deliverable of the design.
u 設計の成果物として実装をうながす為の「⾒取り図」的なものを⽤いること
u(^_^)
u抽象的な概念には
具体的な実装があるはず
How do I …
Application Design
u I thought …
u 要求から問題領域を正確に捉えること
u 要求分析(ドメイン分析)
u 問題領域から解決領域へたどり着くプロセスを明確にすること
u EAフレームワーク(ザックマン、TOGAF、FEAF、経済産業省EA)
u OOAD(ICONIX、責務駆動設計、ドメイン駆動設計、UP、RUP、etc.)
u 設計の成果物として実装をうながす為の「⾒取り図」的なものを⽤いること
u アーキテクチャ記述
u UML(シーケンス図、クラス図、etc.)
u(^_^)
uApplication Design
はこんなイメージ
How do I …
Application Design 2
u Abstract Application Structure
Requests
Application
Architecture
Something
Analysis
Design
u(^_^)
uということで
How do I …
Application Design 3
u In order to create an application, it is necessary to design
u The application architecture
u Something that makes up the architecture
u(^_^;)
u何度もすみません。
Architectureって
何でしたっけ?
What is …
Application Architecture
u Quote from Software Architecture Review and Assessment (SARA) Report Version 1.0
u Quote from ⾮機能要件記述とアーキテクチャ記述ガイド IPA SEI 2010年3⽉
What is …
Application Architecture 2
u Quote from Patterns of Enterprise Application Architecture
u アーキテクチャとは
u 主観的要素(重要とする要素により、形を変える)
u PJの熟練開発者がシステム設計に関して共通に理解していること
u 共通理解
u システムの主要なコンポーネント
u コンポーネントの相互作⽤
u 主要なコンポーネント
u 後で変更することが難しい決定事項
u ⼈の性格のようなもの(私⾒)
What is …
Application Architecture 3
u Quote from ⾮機能要件記述とアーキテクチャ記述ガイド IPA SEI 2010年3⽉
u(^_^)
uつまり
What is …
Application Architecture 4
u Abstract Application Structure
Requests
Application
Architecture
(Main-Components & Relations)
Non-Architecture
(Other Components & Relations)
Analysis
Design
What is …
Application Architecture 4
u (^_^)
u Application Architectureの詳細は
勉強中なのでまた今度
u ここではNon-Architectureの設計に
限定して議論しましょう
u(^_^;)
uところで・・・
毎度申し訳ありませんが、
Componentって何でしたっけ?
What is …
Component
u Quote from CMU SEI http://www.sei.cmu.edu/architecture/start/glossary/
u(^_^;)
u分かりづらいので、
これも調べましょう
What is …
Component 2
u Quote from 「オブジェクトデザイン」( レベッカ・ワーフスブラッ
ク他 )
u She said …
u ⼀般的に多くの異なるアプリケーションで使⽤することを意図した設計要素。
u コンポーネントを使えば、システムの残りの部分を構成し直すことなく、更新
や交換でき、そうなるようにインターフェースが設計される。
u Translator notes …
u フレームワークを「⼤きな粒度の再利⽤」と考えると、コンポーネントは「中
程度の粒度の再利⽤」単位と考えることができる。
u ⼀⽅、単⼀のクラスは再利⽤を⾏う単位としては「⼩程度の粒度の再利⽤」単
位と考えることができる。
u(^_^)
uつまり
What is …
Component 3
u Abstract Component Structure
Requests
Application
Architecture
Components
Object Object Object Object
Analysis
Design
Note
アーキテクチャを考慮すると、本定義
だけに限定されないと考えています
u(^_^)
uApplicationは複数のObjectで
構成されることが分かりました
u(^_^)
uではオブジェクト指向で
Designを考えていきましょう
u(^_^;)
uところで・・・
毎度申し訳ありませんが、
Objectって何でしたっけ?
What is …
Object
u Quote from 「オブジェクトデザイン」( レベッカ・ワーフスブラッ
ク他 )
u I understood that…
u ソフトウェアは部品を元に設計される
u このソフトウェア部品はオブジェクトである
u オブジェクトは他の部品に対してリクエストをして相互作⽤する
u この為、オブジェクトにはリクエストに応える義務が、ある期間に発⽣する
u つまり、オブジェクトには役割があり、役割通りに動作する責任が発⽣する
u また、オブジェクトは役割通りに動作をする為の判断材料となる情報を持つ
u(^_^)
uつまり
What is …
Object 2
責務
動作の
実⾏義務
情報の
蓄積義務
Note
タスクの実⾏を補助判断
する為に利⽤される
Note
適切に動作する為には判
断材料(情報)が必要
ロール
責務
責務
責務
What is …
Object 3
役割を通して関連する
タスク、情報の集合
What is …
Object 4
Object
ロール
ロール
ロール
What is …
Object 5
“右向き”
“左向き”
Component
Collaboration of Objects
Encapsulated Info
“回転⽅向”
Object
Task
“回転する”
u(^_^)
uよって
Object-Oriented Analysis and Design
u Abstract OOAD Structure
Requests
Application
Architecture
Components
Object Object Object Object
Analysis
Design
Object
Roles
Responsibilities
Task Info
has
Roles
Object-Oriented Analysis and Design
余談
u Architecture と Non-Architecture の設計順序
u Applicationの重要な要素であるArchitecture を設計してからComponentの設計を⾏
うことが⼀般的な考え⽅である
u ApplicationがRoles(役割)を持つことから、⼀⽅でRolesの配置先が明⽰されていれ
ば、ある程度並⾏して⾮主要コンポーネントを予備設計しておいても、詳細設計前
には紐付けすることをできるのではないだろうか
u(^_^)
u設計すべき対象について
理解できました
u(^_^;)
uでもObjectの設計は具体的に
どう進めればいいのかな?
The ICONIX
Practical Method of OOAD
u Quote from 「Use Case Driven Object Modeling with UML
Theory and Practice」Doug Rosenberg, others.
u Abstraction of ICONIX
u ICONIX⾃体はOOADよりも広い範囲をサポートする開発⼿法
u 静的+動的なワークフローが構成するイテレーティブなプロセス
u 1イテレーションでは、ユースケースまたはその論理的な集合に対
して、要求分析〜単体テストをスコープとする実践的な⼿法
u イテレーティブな為、agileプラクティスとの親和性が⾼い
u UP(統⼀プロセス)よりも使⽤するUMLやドキュメントの種類が少
なく、軽量である
u 他の⼿法との折衷案を採⽤してもよい(私⾒)
u マイルストーンと確認ポイントが⽰されているので分かりやすい
The ICONIX
Practical Method of OOAD 2
u Abstraction of ICONIX Process (One Iteration)
要求定義 機能要求 振る舞い要求
ドメイン分析
ドメインモデリング
レビュー
要求分析
予備設計
ロバストネス分析
属性追加(ドメイン
モデルの更新)
コントローラオブ
ジェクトの識別
レビュー
詳細設計 シーケンス図作成
操作の追加(ドメイ
ンモデルの更新)
シーケンス図の更新 レビュー
実装
コーディング
ユニットテスト実施
統合テスト、テスト
シナリオの実施
コードレビュー 各モデルの更新
To Next
Iteration
The ICONIX
Practical Method of OOAD 3
u 要求定義
機能要求
• システムができることを記述する。
• 例)1ヶ⽉ログインのないユーザは、パス
ワードを再設定しなければならない。
振る舞い要求
• アクター(ユーザ、システム等)との対話
を叙述的に記述(ユースケース記述)する。
• 例)ログイン画⾯で、ユーザはIDとパス
ワードを⼊⼒する。システムは、ユーザの
最終ログイン⽇を取得し、現在⽇付との⽐
較結果が1ヶ⽉以内かを判定する。また、
ログイン情報と⼀致するかを判定する。シ
ステムは、判定結果を元にメニュー画⾯を
表⽰する。
ドメイン分析、モデリング
• ユースケース記述から問題領域のオブジェ
クトを抽出する。
• 抽出にはCRCカードを使うとオブジェクト
の⽬的、責務、相互作⽤先の候補を挙げや
すい。(私⾒)
• ドメインオブジェクト同⼠を相互作⽤の観
点で結ぶ。
The ICONIX
Practical Method of OOAD 4
u 分析・予備設計
ロバストネス分析
•ユースケース記述をロバストネス図上に表現す
る。
•UC記述中、オブジェクトはバウンダリ、エン
ティティとし、タスク・処理はコントローラと
する。
•例)ログイン画⾯で、ユーザはIDとパスワード
を⼊⼒する。システムは、ユーザの最終ログイ
ン⽇を取得し、現在⽇付との⽐較結果が1ヶ⽉
以内かを判定する。また、ログイン情報と⼀致
するかを判定する。システムは、判定結果を元
にメニュー画⾯を表⽰する。
ドメインモデルの更新1
•ロバストネス図を記述した結果、ドメインモデ
ルに不⾜するオブジェクトがあれば追加する。
•例えば、UC記述上ではユーザはアクターだが、
判定処理を⾏う際にIDとパスワードはどこに格
納しておくのか?
•結果、「ユーザ情報」というエンティティ(タ
スクの実⾏を補助判断する情報を格納するオブ
ジェクト)が必要であると考えることができる。
•IDとパスワードはユーザ情報の属性とする。
コントローラオブジェクトの識別
•ロバストネス分析の結果、次の箇所をコント
ローラの候補とする。
•「ユーザの最終ログイン⽇を取得」
•「現在⽇付との⽐較結果が1ヶ⽉以内かを判定
する」
•「ログイン情報と⼀致するかを判定する」
The ICONIX
Practical Method of OOAD 5
u 詳細設計
シーケンス図作成
•ロバストネス図から、バウンダリ、エンティ
ティ、コントローラをシーケンス図に反映する。
•例)ログイン画⾯とユーザ情報はオブジェクト
として表現する。
•例)「ユーザの最終ログイン⽇を取得」、「現
在⽇付との⽐較結果が1ヶ⽉以内かを判定す
る」、「ログイン情報と⼀致するかを判定す
る」、「メニュー画⾯を表⽰する」は相互作⽤
(オブジェクト間のメッセージ)として表現す
る。
ドメインモデルの更新2
•シーケンス図を記述した結果、ドメインモデル
のオブジェクトにメッセージを追加する。
•その他、メッセージのインプット(引数)、ア
ウトプット(戻り値)等からオブジェクトに不
⾜する属性を判断する。
•この結果、ドメインモデルはクラス図として完
成する。
シーケンス図の更新
•Java EEやフレームワークを利⽤する場合は、
RequestDispatcherの実装オブジェクトもシーケ
ンス図上で表現することでActorとオブジェクト
間の相互作⽤がより詳細に分かるようになる。
The ICONIX
Practical Method of OOAD 6
u 実装
コーディング・ユニットテスト
の記述
• 完成したクラス図を元にクラス
を実装する。
• 設計を元にユニットテストを記
述する。
統合テスト・テストシナリオの
実施
• 設計を元に統合テスト、テスト
シナリオを実装する。
• テストシナリオにおいては、
ユースケースを元に実装するこ
とでユースケーステストを設計
することができる。
コードレビュー・各モデルの更
新
• コードレビューを実施し、パ
ターンの適⽤や適切な責務の実
装を促す。
• 次のIterationに備えてモデルを
更新する。
u(^_^)
u設計をする上で⾃分
の軸になりそうです
u(^_^)
u次回LTでは実践編を紹
介したいと思います
um(_ _)m
どうもありがとうご
ざいました

More Related Content

Similar to jjug_night_20161121

設計ビギナーが語るソフトウェア設計
設計ビギナーが語るソフトウェア設計設計ビギナーが語るソフトウェア設計
設計ビギナーが語るソフトウェア設計akkey342
 
Windowsストアアプリ開発ハンズオントレーニングに行ってきました 2012-09-22-lt
Windowsストアアプリ開発ハンズオントレーニングに行ってきました 2012-09-22-ltWindowsストアアプリ開発ハンズオントレーニングに行ってきました 2012-09-22-lt
Windowsストアアプリ開発ハンズオントレーニングに行ってきました 2012-09-22-ltTomokazu Kizawa
 
Intalio japan special cloud workshop
Intalio japan special cloud workshopIntalio japan special cloud workshop
Intalio japan special cloud workshopDaisuke Sugai
 
Sansan Tech Meetup Androidエンジニアが振り返る Google I/O
 Sansan Tech Meetup Androidエンジニアが振り返る Google I/O   Sansan Tech Meetup Androidエンジニアが振り返る Google I/O
Sansan Tech Meetup Androidエンジニアが振り返る Google I/O 健一 辰濱
 
デ部会 プロトタイプ
デ部会 プロトタイプデ部会 プロトタイプ
デ部会 プロトタイプNobuhiko Futagami
 
Phpではじめるオブジェクト指向(公開用)
Phpではじめるオブジェクト指向(公開用)Phpではじめるオブジェクト指向(公開用)
Phpではじめるオブジェクト指向(公開用)VOYAGE GROUP
 
Japanese for it bridge engineers
Japanese for it bridge engineersJapanese for it bridge engineers
Japanese for it bridge engineersVu Hung Nguyen
 
Software Engineering And Role of Agile
Software Engineering And Role of AgileSoftware Engineering And Role of Agile
Software Engineering And Role of AgileKenji Hiranabe
 
新しいソフトウェアエンジニアリングのためのパターンランゲージに向けて
新しいソフトウェアエンジニアリングのためのパターンランゲージに向けて新しいソフトウェアエンジニアリングのためのパターンランゲージに向けて
新しいソフトウェアエンジニアリングのためのパターンランゲージに向けてHironori Washizaki
 
20130629 KA法ワークショップ@DevLOVE仙台
20130629 KA法ワークショップ@DevLOVE仙台20130629 KA法ワークショップ@DevLOVE仙台
20130629 KA法ワークショップ@DevLOVE仙台chachaki chachaki
 
ソフトウェア工学の基礎
ソフトウェア工学の基礎ソフトウェア工学の基礎
ソフトウェア工学の基礎Tatsuya Yagi
 
13_B_5 Who is a architect?
13_B_5 Who is a architect?13_B_5 Who is a architect?
13_B_5 Who is a architect?Atsushi Fukui
 
Androidテスティング実践3 ユニットテスト・CI編
Androidテスティング実践3 ユニットテスト・CI編Androidテスティング実践3 ユニットテスト・CI編
Androidテスティング実践3 ユニットテスト・CI編株式会社 NTTテクノクロス
 
【16-E-4】残業ゼロで開発スピードが10倍に!もう元の開発体制には戻れないデンソー流のアジャイル開発
【16-E-4】残業ゼロで開発スピードが10倍に!もう元の開発体制には戻れないデンソー流のアジャイル開発【16-E-4】残業ゼロで開発スピードが10倍に!もう元の開発体制には戻れないデンソー流のアジャイル開発
【16-E-4】残業ゼロで開発スピードが10倍に!もう元の開発体制には戻れないデンソー流のアジャイル開発Developers Summit
 
Frameworks We Live By: Design by day-to-day framework development: Multi-para...
Frameworks We Live By: Design by day-to-day framework development: Multi-para...Frameworks We Live By: Design by day-to-day framework development: Multi-para...
Frameworks We Live By: Design by day-to-day framework development: Multi-para...Atsuhiro Kubo
 
Android開発者とデザイナーの効率的な連携について
Android開発者とデザイナーの効率的な連携についてAndroid開発者とデザイナーの効率的な連携について
Android開発者とデザイナーの効率的な連携についてlychee .
 
スマートフォンアプリケーション開発の最新動向
スマートフォンアプリケーション開発の最新動向スマートフォンアプリケーション開発の最新動向
スマートフォンアプリケーション開発の最新動向Tsutomu Ogasawara
 
Visual Studio による開発環境・プログラミングの進化
Visual Studio による開発環境・プログラミングの進化Visual Studio による開発環境・プログラミングの進化
Visual Studio による開発環境・プログラミングの進化Fujio Kojima
 
OSSを利用したプロジェクト管理
OSSを利用したプロジェクト管理OSSを利用したプロジェクト管理
OSSを利用したプロジェクト管理Tadashi Miyazato
 

Similar to jjug_night_20161121 (20)

設計ビギナーが語るソフトウェア設計
設計ビギナーが語るソフトウェア設計設計ビギナーが語るソフトウェア設計
設計ビギナーが語るソフトウェア設計
 
Windowsストアアプリ開発ハンズオントレーニングに行ってきました 2012-09-22-lt
Windowsストアアプリ開発ハンズオントレーニングに行ってきました 2012-09-22-ltWindowsストアアプリ開発ハンズオントレーニングに行ってきました 2012-09-22-lt
Windowsストアアプリ開発ハンズオントレーニングに行ってきました 2012-09-22-lt
 
Angularを利用したシステム開発事例
Angularを利用したシステム開発事例Angularを利用したシステム開発事例
Angularを利用したシステム開発事例
 
Intalio japan special cloud workshop
Intalio japan special cloud workshopIntalio japan special cloud workshop
Intalio japan special cloud workshop
 
Sansan Tech Meetup Androidエンジニアが振り返る Google I/O
 Sansan Tech Meetup Androidエンジニアが振り返る Google I/O   Sansan Tech Meetup Androidエンジニアが振り返る Google I/O
Sansan Tech Meetup Androidエンジニアが振り返る Google I/O
 
デ部会 プロトタイプ
デ部会 プロトタイプデ部会 プロトタイプ
デ部会 プロトタイプ
 
Phpではじめるオブジェクト指向(公開用)
Phpではじめるオブジェクト指向(公開用)Phpではじめるオブジェクト指向(公開用)
Phpではじめるオブジェクト指向(公開用)
 
Japanese for it bridge engineers
Japanese for it bridge engineersJapanese for it bridge engineers
Japanese for it bridge engineers
 
Software Engineering And Role of Agile
Software Engineering And Role of AgileSoftware Engineering And Role of Agile
Software Engineering And Role of Agile
 
新しいソフトウェアエンジニアリングのためのパターンランゲージに向けて
新しいソフトウェアエンジニアリングのためのパターンランゲージに向けて新しいソフトウェアエンジニアリングのためのパターンランゲージに向けて
新しいソフトウェアエンジニアリングのためのパターンランゲージに向けて
 
20130629 KA法ワークショップ@DevLOVE仙台
20130629 KA法ワークショップ@DevLOVE仙台20130629 KA法ワークショップ@DevLOVE仙台
20130629 KA法ワークショップ@DevLOVE仙台
 
ソフトウェア工学の基礎
ソフトウェア工学の基礎ソフトウェア工学の基礎
ソフトウェア工学の基礎
 
13_B_5 Who is a architect?
13_B_5 Who is a architect?13_B_5 Who is a architect?
13_B_5 Who is a architect?
 
Androidテスティング実践3 ユニットテスト・CI編
Androidテスティング実践3 ユニットテスト・CI編Androidテスティング実践3 ユニットテスト・CI編
Androidテスティング実践3 ユニットテスト・CI編
 
【16-E-4】残業ゼロで開発スピードが10倍に!もう元の開発体制には戻れないデンソー流のアジャイル開発
【16-E-4】残業ゼロで開発スピードが10倍に!もう元の開発体制には戻れないデンソー流のアジャイル開発【16-E-4】残業ゼロで開発スピードが10倍に!もう元の開発体制には戻れないデンソー流のアジャイル開発
【16-E-4】残業ゼロで開発スピードが10倍に!もう元の開発体制には戻れないデンソー流のアジャイル開発
 
Frameworks We Live By: Design by day-to-day framework development: Multi-para...
Frameworks We Live By: Design by day-to-day framework development: Multi-para...Frameworks We Live By: Design by day-to-day framework development: Multi-para...
Frameworks We Live By: Design by day-to-day framework development: Multi-para...
 
Android開発者とデザイナーの効率的な連携について
Android開発者とデザイナーの効率的な連携についてAndroid開発者とデザイナーの効率的な連携について
Android開発者とデザイナーの効率的な連携について
 
スマートフォンアプリケーション開発の最新動向
スマートフォンアプリケーション開発の最新動向スマートフォンアプリケーション開発の最新動向
スマートフォンアプリケーション開発の最新動向
 
Visual Studio による開発環境・プログラミングの進化
Visual Studio による開発環境・プログラミングの進化Visual Studio による開発環境・プログラミングの進化
Visual Studio による開発環境・プログラミングの進化
 
OSSを利用したプロジェクト管理
OSSを利用したプロジェクト管理OSSを利用したプロジェクト管理
OSSを利用したプロジェクト管理
 

More from Naoya Kojima

What’s Next For Selenium?
What’s Next For Selenium?What’s Next For Selenium?
What’s Next For Selenium?Naoya Kojima
 
Automated Analytics Testing
Automated Analytics TestingAutomated Analytics Testing
Automated Analytics TestingNaoya Kojima
 
20170710 hifive-test-meetup
20170710 hifive-test-meetup20170710 hifive-test-meetup
20170710 hifive-test-meetupNaoya Kojima
 
JJUG CCC 2017 Spring LT about JPA
JJUG CCC 2017 Spring LT about JPAJJUG CCC 2017 Spring LT about JPA
JJUG CCC 2017 Spring LT about JPANaoya Kojima
 
JJUG CCC 2017 Spring LT about Twice Submit
JJUG CCC 2017 Spring LT about  Twice SubmitJJUG CCC 2017 Spring LT about  Twice Submit
JJUG CCC 2017 Spring LT about Twice SubmitNaoya Kojima
 
20161222 selenium adventcalender
20161222 selenium adventcalender20161222 selenium adventcalender
20161222 selenium adventcalenderNaoya Kojima
 
20161218 selenium study4
20161218 selenium study420161218 selenium study4
20161218 selenium study4Naoya Kojima
 
20161212 selenium adventcalender
20161212 selenium adventcalender20161212 selenium adventcalender
20161212 selenium adventcalenderNaoya Kojima
 
20161203 selenium adventcalender
20161203 selenium adventcalender20161203 selenium adventcalender
20161203 selenium adventcalenderNaoya Kojima
 
20161218 selenium study4-part1
20161218 selenium study4-part120161218 selenium study4-part1
20161218 selenium study4-part1Naoya Kojima
 
Azureを使って手軽にブラウザテストの自動化をはじめよう
Azureを使って手軽にブラウザテストの自動化をはじめようAzureを使って手軽にブラウザテストの自動化をはじめよう
Azureを使って手軽にブラウザテストの自動化をはじめようNaoya Kojima
 

More from Naoya Kojima (11)

What’s Next For Selenium?
What’s Next For Selenium?What’s Next For Selenium?
What’s Next For Selenium?
 
Automated Analytics Testing
Automated Analytics TestingAutomated Analytics Testing
Automated Analytics Testing
 
20170710 hifive-test-meetup
20170710 hifive-test-meetup20170710 hifive-test-meetup
20170710 hifive-test-meetup
 
JJUG CCC 2017 Spring LT about JPA
JJUG CCC 2017 Spring LT about JPAJJUG CCC 2017 Spring LT about JPA
JJUG CCC 2017 Spring LT about JPA
 
JJUG CCC 2017 Spring LT about Twice Submit
JJUG CCC 2017 Spring LT about  Twice SubmitJJUG CCC 2017 Spring LT about  Twice Submit
JJUG CCC 2017 Spring LT about Twice Submit
 
20161222 selenium adventcalender
20161222 selenium adventcalender20161222 selenium adventcalender
20161222 selenium adventcalender
 
20161218 selenium study4
20161218 selenium study420161218 selenium study4
20161218 selenium study4
 
20161212 selenium adventcalender
20161212 selenium adventcalender20161212 selenium adventcalender
20161212 selenium adventcalender
 
20161203 selenium adventcalender
20161203 selenium adventcalender20161203 selenium adventcalender
20161203 selenium adventcalender
 
20161218 selenium study4-part1
20161218 selenium study4-part120161218 selenium study4-part1
20161218 selenium study4-part1
 
Azureを使って手軽にブラウザテストの自動化をはじめよう
Azureを使って手軽にブラウザテストの自動化をはじめようAzureを使って手軽にブラウザテストの自動化をはじめよう
Azureを使って手軽にブラウザテストの自動化をはじめよう
 

jjug_night_20161121

  • 1. Introduction of “ICONIX” Practical Method of OOAD for not being swept away by trends as a Java User 21th-Nov-2016 Naoya Kojima @jugemix
  • 2. Profile u I am … u Father / Husband / A just application developer interested in Application design & Testing u I love making / drinking coffee very much (^^)v u Specialty u Automation Test ( with JavaSE AspectJ Junit/TestNG Selenium WebDriver ) u I make a keyword-driven test system.
  • 4. Today I talk about Design Software Application Design ICONIX
  • 7. What is … Software Design u Quote from wikipedia https://en.wikipedia.org/wiki/Software_design
  • 10. What is … Software Design 2 u Mr. Grady Booch Said … u “Design is an ordered approach to exploit answers to a problem.” u Quote from Object-Oriented Analysis and Design with Applications, 2nd Edition 1995
  • 11. What is … Software Design 3 u Dr. Jack Mostow ( Carnegie Mellon University ) Said … u Purpose of design u Satisfies a given (perhaps informally) functional specification u Conforms to limitations of the target medium u Meets implicit or explicit requirements on performance and resource usage, e.g., time, space, power, cost u Satisfies implicit or explicit design criteria on the form of the artifact, e.g., style, simplicity, testability, maintainability, reliability, reusability, manufacturability, modularity, etc. ( Make Quality !! ) u Satisfies restrictions on the design process itself, such as its length or cost, or the tools available for doing the design (e.g., drafting table versus graphic editor). u Quote from Toward Better Models Of The Design Process 1985
  • 12. What is … Software Design 4 u Bjarne Stroustrup (development of the C++ programming language. ) Said … u Purpose of design u The purpose of the design is to create a clear and relatively simple internal structure, what is called an architecture. Design is the final product of the design process. u Quote from Object-Oriented Analysis and Design with Applications, 2nd Edition 1995
  • 13. What is … Software Design 5 u Mr. Grady Booch summarize … u The design includes tasks to balance the competing set of requirements, u allowing you to think logically of the structure, u considering trade-offs when requirements collide, u and in general the implementation's perspective. u The model that provides the design is the deliverable of the design.
  • 16. Software is … Origin u Quote from Wikipedia https://en.wikipedia.org/wiki/Software#Purpose.2C_or_domain_of_use u by Alan Turing u part of a computer system that consists of encoded information or computer instructions u by John W. Tukey ( on developing statistical methods for computers where he invented the term "bit") u In computer science and software engineering, computer software is all information processed by computer systems, programs and data.
  • 17. System Software is … indirectly effects u In low-level language u Software written in machine language does not directly affect the user. u But by combining changing the state of the processor, it is possible to give the user an indirect effect such as changing the state of the Personal Computer.
  • 18. u In high-level language u Software written in machine language affect the user directly. Non System Software is … directly effects
  • 20. Hardware Low-Level Lang High-Level Lang System Software Application Software etc. Software written in high-level programming language is …
  • 21. System Software Application Software Java Application Software People Device Drivers Java Device Driver Devices Utilities Java Utility Software Programs Software Various types of use useuse
  • 25. u (^_^) u 経営を仕事とするActor u ⼈事を仕事とするActor u プリンタ制御をするActor u メモリを管理するActor u etc・・・
  • 28. How do I … Design u With the word of Mr. Booch … u The design includes tasks u to balance the competing set of requirements, u allowing you to think logically of the structure, u considering trade-offs when requirements collide, u 要求から問題領域を正確に捉えること u 問題領域から解決領域へたどり着くプロセスを明確にすること u and in general the implementation‘s perspective model that provides the design is the deliverable of the design. u 設計の成果物として実装をうながす為の「⾒取り図」的なものを⽤いること
  • 30. How do I … Application Design u I thought … u 要求から問題領域を正確に捉えること u 要求分析(ドメイン分析) u 問題領域から解決領域へたどり着くプロセスを明確にすること u EAフレームワーク(ザックマン、TOGAF、FEAF、経済産業省EA) u OOAD(ICONIX、責務駆動設計、ドメイン駆動設計、UP、RUP、etc.) u 設計の成果物として実装をうながす為の「⾒取り図」的なものを⽤いること u アーキテクチャ記述 u UML(シーケンス図、クラス図、etc.)
  • 32. How do I … Application Design 2 u Abstract Application Structure Requests Application Architecture Something Analysis Design
  • 34. How do I … Application Design 3 u In order to create an application, it is necessary to design u The application architecture u Something that makes up the architecture
  • 36. What is … Application Architecture u Quote from Software Architecture Review and Assessment (SARA) Report Version 1.0 u Quote from ⾮機能要件記述とアーキテクチャ記述ガイド IPA SEI 2010年3⽉
  • 37. What is … Application Architecture 2 u Quote from Patterns of Enterprise Application Architecture u アーキテクチャとは u 主観的要素(重要とする要素により、形を変える) u PJの熟練開発者がシステム設計に関して共通に理解していること u 共通理解 u システムの主要なコンポーネント u コンポーネントの相互作⽤ u 主要なコンポーネント u 後で変更することが難しい決定事項 u ⼈の性格のようなもの(私⾒)
  • 38. What is … Application Architecture 3 u Quote from ⾮機能要件記述とアーキテクチャ記述ガイド IPA SEI 2010年3⽉
  • 40. What is … Application Architecture 4 u Abstract Application Structure Requests Application Architecture (Main-Components & Relations) Non-Architecture (Other Components & Relations) Analysis Design
  • 41. What is … Application Architecture 4 u (^_^) u Application Architectureの詳細は 勉強中なのでまた今度 u ここではNon-Architectureの設計に 限定して議論しましょう
  • 43. What is … Component u Quote from CMU SEI http://www.sei.cmu.edu/architecture/start/glossary/
  • 45. What is … Component 2 u Quote from 「オブジェクトデザイン」( レベッカ・ワーフスブラッ ク他 ) u She said … u ⼀般的に多くの異なるアプリケーションで使⽤することを意図した設計要素。 u コンポーネントを使えば、システムの残りの部分を構成し直すことなく、更新 や交換でき、そうなるようにインターフェースが設計される。 u Translator notes … u フレームワークを「⼤きな粒度の再利⽤」と考えると、コンポーネントは「中 程度の粒度の再利⽤」単位と考えることができる。 u ⼀⽅、単⼀のクラスは再利⽤を⾏う単位としては「⼩程度の粒度の再利⽤」単 位と考えることができる。
  • 47. What is … Component 3 u Abstract Component Structure Requests Application Architecture Components Object Object Object Object Analysis Design Note アーキテクチャを考慮すると、本定義 だけに限定されないと考えています
  • 51. What is … Object u Quote from 「オブジェクトデザイン」( レベッカ・ワーフスブラッ ク他 ) u I understood that… u ソフトウェアは部品を元に設計される u このソフトウェア部品はオブジェクトである u オブジェクトは他の部品に対してリクエストをして相互作⽤する u この為、オブジェクトにはリクエストに応える義務が、ある期間に発⽣する u つまり、オブジェクトには役割があり、役割通りに動作する責任が発⽣する u また、オブジェクトは役割通りに動作をする為の判断材料となる情報を持つ
  • 53. What is … Object 2 責務 動作の 実⾏義務 情報の 蓄積義務 Note タスクの実⾏を補助判断 する為に利⽤される Note 適切に動作する為には判 断材料(情報)が必要
  • 54. ロール 責務 責務 責務 What is … Object 3 役割を通して関連する タスク、情報の集合
  • 55. What is … Object 4 Object ロール ロール ロール
  • 56. What is … Object 5 “右向き” “左向き” Component Collaboration of Objects Encapsulated Info “回転⽅向” Object Task “回転する”
  • 58. Object-Oriented Analysis and Design u Abstract OOAD Structure Requests Application Architecture Components Object Object Object Object Analysis Design Object Roles Responsibilities Task Info has Roles
  • 59. Object-Oriented Analysis and Design 余談 u Architecture と Non-Architecture の設計順序 u Applicationの重要な要素であるArchitecture を設計してからComponentの設計を⾏ うことが⼀般的な考え⽅である u ApplicationがRoles(役割)を持つことから、⼀⽅でRolesの配置先が明⽰されていれ ば、ある程度並⾏して⾮主要コンポーネントを予備設計しておいても、詳細設計前 には紐付けすることをできるのではないだろうか
  • 62. The ICONIX Practical Method of OOAD u Quote from 「Use Case Driven Object Modeling with UML Theory and Practice」Doug Rosenberg, others. u Abstraction of ICONIX u ICONIX⾃体はOOADよりも広い範囲をサポートする開発⼿法 u 静的+動的なワークフローが構成するイテレーティブなプロセス u 1イテレーションでは、ユースケースまたはその論理的な集合に対 して、要求分析〜単体テストをスコープとする実践的な⼿法 u イテレーティブな為、agileプラクティスとの親和性が⾼い u UP(統⼀プロセス)よりも使⽤するUMLやドキュメントの種類が少 なく、軽量である u 他の⼿法との折衷案を採⽤してもよい(私⾒) u マイルストーンと確認ポイントが⽰されているので分かりやすい
  • 63. The ICONIX Practical Method of OOAD 2 u Abstraction of ICONIX Process (One Iteration) 要求定義 機能要求 振る舞い要求 ドメイン分析 ドメインモデリング レビュー 要求分析 予備設計 ロバストネス分析 属性追加(ドメイン モデルの更新) コントローラオブ ジェクトの識別 レビュー 詳細設計 シーケンス図作成 操作の追加(ドメイ ンモデルの更新) シーケンス図の更新 レビュー 実装 コーディング ユニットテスト実施 統合テスト、テスト シナリオの実施 コードレビュー 各モデルの更新 To Next Iteration
  • 64. The ICONIX Practical Method of OOAD 3 u 要求定義 機能要求 • システムができることを記述する。 • 例)1ヶ⽉ログインのないユーザは、パス ワードを再設定しなければならない。 振る舞い要求 • アクター(ユーザ、システム等)との対話 を叙述的に記述(ユースケース記述)する。 • 例)ログイン画⾯で、ユーザはIDとパス ワードを⼊⼒する。システムは、ユーザの 最終ログイン⽇を取得し、現在⽇付との⽐ 較結果が1ヶ⽉以内かを判定する。また、 ログイン情報と⼀致するかを判定する。シ ステムは、判定結果を元にメニュー画⾯を 表⽰する。 ドメイン分析、モデリング • ユースケース記述から問題領域のオブジェ クトを抽出する。 • 抽出にはCRCカードを使うとオブジェクト の⽬的、責務、相互作⽤先の候補を挙げや すい。(私⾒) • ドメインオブジェクト同⼠を相互作⽤の観 点で結ぶ。
  • 65. The ICONIX Practical Method of OOAD 4 u 分析・予備設計 ロバストネス分析 •ユースケース記述をロバストネス図上に表現す る。 •UC記述中、オブジェクトはバウンダリ、エン ティティとし、タスク・処理はコントローラと する。 •例)ログイン画⾯で、ユーザはIDとパスワード を⼊⼒する。システムは、ユーザの最終ログイ ン⽇を取得し、現在⽇付との⽐較結果が1ヶ⽉ 以内かを判定する。また、ログイン情報と⼀致 するかを判定する。システムは、判定結果を元 にメニュー画⾯を表⽰する。 ドメインモデルの更新1 •ロバストネス図を記述した結果、ドメインモデ ルに不⾜するオブジェクトがあれば追加する。 •例えば、UC記述上ではユーザはアクターだが、 判定処理を⾏う際にIDとパスワードはどこに格 納しておくのか? •結果、「ユーザ情報」というエンティティ(タ スクの実⾏を補助判断する情報を格納するオブ ジェクト)が必要であると考えることができる。 •IDとパスワードはユーザ情報の属性とする。 コントローラオブジェクトの識別 •ロバストネス分析の結果、次の箇所をコント ローラの候補とする。 •「ユーザの最終ログイン⽇を取得」 •「現在⽇付との⽐較結果が1ヶ⽉以内かを判定 する」 •「ログイン情報と⼀致するかを判定する」
  • 66. The ICONIX Practical Method of OOAD 5 u 詳細設計 シーケンス図作成 •ロバストネス図から、バウンダリ、エンティ ティ、コントローラをシーケンス図に反映する。 •例)ログイン画⾯とユーザ情報はオブジェクト として表現する。 •例)「ユーザの最終ログイン⽇を取得」、「現 在⽇付との⽐較結果が1ヶ⽉以内かを判定す る」、「ログイン情報と⼀致するかを判定す る」、「メニュー画⾯を表⽰する」は相互作⽤ (オブジェクト間のメッセージ)として表現す る。 ドメインモデルの更新2 •シーケンス図を記述した結果、ドメインモデル のオブジェクトにメッセージを追加する。 •その他、メッセージのインプット(引数)、ア ウトプット(戻り値)等からオブジェクトに不 ⾜する属性を判断する。 •この結果、ドメインモデルはクラス図として完 成する。 シーケンス図の更新 •Java EEやフレームワークを利⽤する場合は、 RequestDispatcherの実装オブジェクトもシーケ ンス図上で表現することでActorとオブジェクト 間の相互作⽤がより詳細に分かるようになる。
  • 67. The ICONIX Practical Method of OOAD 6 u 実装 コーディング・ユニットテスト の記述 • 完成したクラス図を元にクラス を実装する。 • 設計を元にユニットテストを記 述する。 統合テスト・テストシナリオの 実施 • 設計を元に統合テスト、テスト シナリオを実装する。 • テストシナリオにおいては、 ユースケースを元に実装するこ とでユースケーステストを設計 することができる。 コードレビュー・各モデルの更 新 • コードレビューを実施し、パ ターンの適⽤や適切な責務の実 装を促す。 • 次のIterationに備えてモデルを 更新する。