SlideShare a Scribd company logo
© 2017 @nuits_jp
Blue Monkey
Architecture Overview
2017.03.14
© 2017 @nuits_jp
中村 充志 / Atsushi Nakamura
• Enterprise系アプリケーションアーキテクト
• Prism for WPFを仕事にて活用
• Xamarinを仕事にしたくて奮闘中
• Microsoft MVP Visual Studio and Developer
Technologies
• Twitter : @nuits_jp
• Blog : http://www.nuits.jp
• Company : RICOH JAPAN Corp.
2
自己紹介
© 2017 @nuits_jp
はじめに
© 2017 @nuits_jp
BlueMonkeyプロジェクトのゴール
【ゴール】
一定規模のチーム開発に耐えうる
アーキテクチャのリファレンス実装の提案
【重視しているポイント】
• テスト容易性・変更容易性の確保
• クロスプラットフォーム対応
• 特定バックエンドへの非依存
© 2017 @nuits_jp
アーキテクチャ上のキーワード
• Prism for Xamarin.Forms
• MVVM Pattern
• MVVMのM
© 2017 @nuits_jp
Prism for Xamarin.Forms
© 2017 @nuits_jp
MVVMパターンで辛くなりがちな点
Binding &
Command
Update
NotificationNotification
• 画面遷移
• 確認ダイアログ
• 選択ダイアログ
© 2017 @nuits_jp
What is Prism?
• XAML Application Framework
• Guidance
• Patterns & Practices
• Testable & Maintainable
• Open Source
• .NET Foundation
© 2017 @nuits_jp
What do you get?
• MVVM Support
• Commanding
• Messaging
• Navigation
• Page Dialog Service
• Dependency Injection
• Logging
© 2017 @nuits_jp
What do you get?
• MVVM Support
• Commanding
• Messaging
• Navigation
• Page Dialog Service
• Dependency Injection
• Logging
© 2017 @nuits_jp
What is Prism?
• XAML Application Framework
• Guidance
• Patterns & Practices
• Testable & Maintainable
• Open Source
• .NET Foundation
© 2017 @nuits_jp
MVVMパターンとは
© 2017 @nuits_jp
よくみかけるMVVMの図
Binding &
Command
Update
NotificationNotification
© 2017 @nuits_jp
MVVM is 何
© 2017 @nuits_jp
MVVM is PDS
Presentaion Domain Separation:PDS
© 2017 @nuits_jp
PDS is SoC
Separation of Concerns:SoC
Presentaion Domain Separation:PDS
© 2017 @nuits_jp
SoC Overview
Separation of Concerns:SoC
Presentaion Domain Separation:PDSInversion of Control:IoC
© 2017 @nuits_jp
よくみかけるMVVMの図
Binding &
Command
Update
NotificationNotification
© 2017 @nuits_jp
よくみかけるMVVMの図
Binding &
Command
Update
NotificationNotification
プレゼンテーション その他
© 2017 @nuits_jp
実際の割合
Binding &
Command
Update
NotificationNotification
プレゼンテー
ション
その他
© 2017 @nuits_jp
Mobile & Cross Platform開発
Modelにも
• 専門性の高い領域
• テストが難しい領域
が多数存在します
© 2017 @nuits_jp
Mobile & Cross Platformは課題の山
• プラットフォーム依存領域
• 時間
• 非同期処理
• プッシュ通知
• センサー類(位置情報、加速度、カメラ)
© 2017 @nuits_jp
Why Prism for Xamarin.Forms
• PrismはMVVMの課題だけでなく、これらの課題に対しても、ガ
イダンスを提供します
• Prismはアプリケーションを開発する上での、パターンとプラク
ティスの集合です
• そしてこれらは、テスト容易性と保守容易性を提供します
© 2017 @nuits_jp
MVVMのM
Binding &
Command
Update
NotificationNotification
プレゼンテー
ション
その他
© 2017 @nuits_jp
MVVMのM
© 2017 @nuits_jp
MVVMのMの原則
Binding &
Command
Update /
public Task Foo()
NotificationNotification
プレゼンテーション その他
1. ViewModelはModelの影(そしてまたViewはViewModelの影)
2. ModelについてViewModelが行うことは、イベントに対する反応と戻り値の
ないメソッドの呼び出ししかない事
出典:http://ugaya40.hateblo.jp/entry/model-mistake
© 2017 @nuits_jp
なぜ戻り値はTask縛りなのか?
読書中の書籍というModelがあり、ある視点から見ると目次というViewと
して表現され
別の視点から見ると本文のテキスト画面というViewとして表現される。
© 2017 @nuits_jp
MVVMのM どう整理する?
Binding &
Command
Update
NotificationNotification
プレゼンテーション その他
? ? ?
© 2017 @nuits_jp
BlueMonkeyのレイヤーアーキテクチャ
View
ViewModel
Model
© 2017 @nuits_jp
What is Usecase?
Usecase:経費を登録する
Usecaseとは、利用者にたいしてアプリ(システム)が提供する本質的な価値のこと
「それ」を終えた後、アプリ(システム)から離れてもよい単位と考えると分かりやすい
© 2017 @nuits_jp
BlueMonkeyのレイヤーアーキテクチャ
View
ViewModel
Model
【Usecase】
画面遷移間にまたがって状態を維持する
ドメインロジックをカプセル化する
• 経費を登録する
• 経費を閲覧する
• レポートを登録する
• レポートを閲覧する
【Service】
Usecaseを実現する為の、「機能」を提供する
• ExpenseService(バックエンドの通信クライ
アント)
• LoginService
• MediaService
• TimeService
© 2017 @nuits_jp
オフライン同期を考慮する
View
ViewModel
Model
UsecaseとServiceの間に
• オフライン同期
• キャッシュ
などを透過的に制御する層が欲しい。
バックエンドの実装から大きく影響を受け
るため、Usecaseに対して実装を隠蔽した
い。
要検討
© 2017 @nuits_jp
Blue monkey コンポーネント図
© 2017 @nuits_jp
BlueMonkeyコンポーネント図
cmp Component Model
BlueMonkey
ViewModelsViews Models
Services
Views ViewModels Usecases
ExpenseServices LoginService
MediaServices TimeService
Application
DroidiOS
BlueMonkey Transaction
Transaction.Unity
© 2017 @nuits_jp
BlueMonkeyコンポーネント図
cmp Component Model
BlueMonkey
ViewModelsViews Models
Services
Views ViewModels Usecases
ExpenseServices LoginService
MediaServices TimeService
Application
DroidiOS
BlueMonkey Transaction
Transaction.Unity
© 2017 @nuits_jp
BlueMonkeyコンポーネント図
cmp Component Model
BlueMonkey
ViewModelsViews Models
Services
Views ViewModels Usecases
ExpenseServices LoginService
MediaServices TimeService
Application
DroidiOS
BlueMonkey Transaction
Transaction.Unity
© 2017 @nuits_jp
BlueMonkeyコンポーネント図
cmp Component Model
BlueMonkey
ViewModelsViews Models
Services
Views ViewModels Usecases
ExpenseServices LoginService
MediaServices TimeService
Application
DroidiOS
BlueMonkey Transaction
Transaction.Unity
© 2017 @nuits_jp
BlueMonkeyコンポーネント図
cmp Component Model
BlueMonkey
ViewModelsViews Models
Services
Views ViewModels Usecases
ExpenseServices LoginService
MediaServices TimeService
Application
DroidiOS
BlueMonkey Transaction
Transaction.Unity
© 2017 @nuits_jp
BlueMonkeyコンポーネント図
cmp Component Model
BlueMonkey
ViewModelsViews Models
Services
Views ViewModels Usecases
ExpenseServices LoginService
MediaServices TimeService
Application
DroidiOS
BlueMonkey Transaction
Transaction.Unity
© 2017 @nuits_jp
BlueMonkeyコンポーネント図
cmp Component Model
BlueMonkey
ViewModelsViews Models
Services
Views ViewModels Usecases
ExpenseServices LoginService
MediaServices TimeService
Application
DroidiOS
BlueMonkey Transaction
Transaction.Unity
© 2017 @nuits_jp
Transaction?
Usecase:経費を登録する
Usecaseオブジェクトのライフサイクルを管理する仕組み
© 2017 @nuits_jp
コードを見てみましょう!
© 2017 @nuits_jp
制約事項
© 2017 @nuits_jp
現在未完了の領域
• ユーザーインターフェースへのデザインの適用
• オフライン同期、キャッシュ制御のアーキテクチャの提示
• 検索結果のページング処理
など
© 2017 @nuits_jp
Xamarin 技術同人誌 出します!
• う-13 「Xamaritans」
• 超技術書典(in ニコニコ長会議2017)でも

More Related Content

PPTX
Why prism for xamarin.forms
PPTX
いまさら学ぶMVVMパターン
PPTX
Xamarin の救世主 Unity !
PDF
Xamarinの歩き方
PDF
20171202 Xamarinの歩き方
PPTX
C++からC#まで Visual Studio 縛り (で死ぬ実験)
PPTX
Win/Mac/Android/iOS向け クロスプラットフォーム開発にXamarinが うまくハマりそうだった話
PDF
Visual Studio + xamarin で始めるモバイル アプリ開発
Why prism for xamarin.forms
いまさら学ぶMVVMパターン
Xamarin の救世主 Unity !
Xamarinの歩き方
20171202 Xamarinの歩き方
C++からC#まで Visual Studio 縛り (で死ぬ実験)
Win/Mac/Android/iOS向け クロスプラットフォーム開発にXamarinが うまくハマりそうだった話
Visual Studio + xamarin で始めるモバイル アプリ開発

What's hot (20)

PPTX
めとべや東京5_XAML
PDF
Xamarin バッドノウハウ大全
PDF
Xamarin 20141212 モバイルカフェスペシャル 「C#で作るiOS/Androidのクロスプラットフォームスマホアプリ開発」
PDF
Xamarin から使う Azure
PDF
Realm Mobile Platform 概要
PDF
Xamarin概要と活用方法
PDF
NET Standard と Xamarin
PDF
Xamarin概要と活用方法
PPTX
Xamarinを企業向けアプリ開発の プラットフォームとして選定し 実際にアプリをリリースした話
PDF
Xamarin 概要~Windows Embedded の業務用端末から Android へのシームレスな移行~
PPTX
私とXamarinと。
PDF
C#でのクロスプラットフォーム モバイル開発環境 Xamarin のご紹介
PDF
Xamarin.forms+azureで始めるモバイル開発
PPT
“なめらか”なメトロスタイルアプリを作るために ~WinRT の非同期性を活用したアプリ開発~
PDF
Xamarin で今日から始めるクロスプラットフォーム開発
PDF
モバイル向けクロスプラットフォーム開発ツール Xamarin の概要とその利点
PDF
Xamarin の概要と活用事例
PDF
わんくま名古屋 #38 (20160521) Xamarin入門
PPTX
Xamarin Overview
PPTX
Xamarin で Prism を使いたい! ~「正式対応」 まで待てない人のための Prism 利用 Tips~
めとべや東京5_XAML
Xamarin バッドノウハウ大全
Xamarin 20141212 モバイルカフェスペシャル 「C#で作るiOS/Androidのクロスプラットフォームスマホアプリ開発」
Xamarin から使う Azure
Realm Mobile Platform 概要
Xamarin概要と活用方法
NET Standard と Xamarin
Xamarin概要と活用方法
Xamarinを企業向けアプリ開発の プラットフォームとして選定し 実際にアプリをリリースした話
Xamarin 概要~Windows Embedded の業務用端末から Android へのシームレスな移行~
私とXamarinと。
C#でのクロスプラットフォーム モバイル開発環境 Xamarin のご紹介
Xamarin.forms+azureで始めるモバイル開発
“なめらか”なメトロスタイルアプリを作るために ~WinRT の非同期性を活用したアプリ開発~
Xamarin で今日から始めるクロスプラットフォーム開発
モバイル向けクロスプラットフォーム開発ツール Xamarin の概要とその利点
Xamarin の概要と活用事例
わんくま名古屋 #38 (20160521) Xamarin入門
Xamarin Overview
Xamarin で Prism を使いたい! ~「正式対応」 まで待てない人のための Prism 利用 Tips~
Ad

Similar to Blue monkey architecture overview (20)

PPTX
製造業向け量子コンピュータ時代のDXセミナー ~見える化、分析、予測、その先の最適化へ~
PDF
MvvmCross 入門
PDF
FutureStack Tokyo 19 -[パートナー講演]アマゾン ウェブ サービス ジャパン株式会社: New Relicを活用したAWSへのアプリ...
PDF
MAF2013 Enterprise Windows 8 – Architecture for rapid development of WinRT apps
PDF
Cake php×国産!オープンソースcms「basercms」が熱い!
PPTX
JSUG SpringOnePlatform 2016報告会 Case study2 - feed back - springoneplatform
PPTX
Xamarin+MVVMCross のあれこれ
PDF
iOS の動画アプリ開発に Xamarin を使ってみた @JXUG #2 East
PDF
FinOpsGreenITについて学んでみた_2024/07/11(木)開催資料
PDF
Rubyプログラミング教育に対する取り組みと事例紹介
PDF
As a service時代のitガバナンス
PDF
Game Development on AWS (ゲーム開発環境を向上させるためのAWS活用術)
PDF
Cloud Foundry Summit 2017 Recap
PDF
AWS における Microservices Architecture と DevOps を推進する組織と人とツール
PDF
今なぜサーバーレスなのか
PDF
SpotBugs(FindBugs)による 大規模ERPのコード品質改善
PPTX
コンテナ&サーバーレス:トレンドの考察と少し先の未来の展望
PDF
5分で分かるselenium conference berlin 2017
PDF
Xamarin 概要 2017/01/15
PDF
【VMware】jp developer-summit_2012_final_for_print
製造業向け量子コンピュータ時代のDXセミナー ~見える化、分析、予測、その先の最適化へ~
MvvmCross 入門
FutureStack Tokyo 19 -[パートナー講演]アマゾン ウェブ サービス ジャパン株式会社: New Relicを活用したAWSへのアプリ...
MAF2013 Enterprise Windows 8 – Architecture for rapid development of WinRT apps
Cake php×国産!オープンソースcms「basercms」が熱い!
JSUG SpringOnePlatform 2016報告会 Case study2 - feed back - springoneplatform
Xamarin+MVVMCross のあれこれ
iOS の動画アプリ開発に Xamarin を使ってみた @JXUG #2 East
FinOpsGreenITについて学んでみた_2024/07/11(木)開催資料
Rubyプログラミング教育に対する取り組みと事例紹介
As a service時代のitガバナンス
Game Development on AWS (ゲーム開発環境を向上させるためのAWS活用術)
Cloud Foundry Summit 2017 Recap
AWS における Microservices Architecture と DevOps を推進する組織と人とツール
今なぜサーバーレスなのか
SpotBugs(FindBugs)による 大規模ERPのコード品質改善
コンテナ&サーバーレス:トレンドの考察と少し先の未来の展望
5分で分かるselenium conference berlin 2017
Xamarin 概要 2017/01/15
【VMware】jp developer-summit_2012_final_for_print
Ad

More from Atsushi Nakamura (19)

PPSX
Settings SyncとCodespaceで体験する新世代へのパラダイムシフト
PPTX
C#メタプログラミング概略 in 2021
PPTX
Unicodeで半角全角を扱うAmbiguous(曖昧さ)とUncertainty(不確実性)の恐怖
PPTX
世界一わかりやすいClean Architecture - DroidKaigiバージョン
PPTX
世界一わかりやすいClean Architecture
PPTX
世界一わかりやすいClean Architecture release-preview
PPTX
世界一わかりやすいClean Architecture alpha-1
PPTX
Visual Studio 2019で始める「WPF on .NET Core 3.0」開発
PPTX
Desktop app dev strategy for .net core 3.0
PPTX
継続的にテスト可能な設計を考える
PPTX
継続的にテスト可能な設計を考える ベータ版
PPTX
α版 継続的にテスト可能な設計を考える
PDF
App center analyticsを使い倒そう
PPTX
Old:App center analyticsを使い倒そう
PPTX
Xamarin.forms navigation overview
PPTX
App center analyticsを使い倒そう
PPTX
「関心の分離」と「疎結合」 ソフトウェアアーキテクチャのひとかけら
PPTX
Xamarin Dev days 2 xamarin.forms ja
PPTX
Enterpriseから見たXamarinの可能性
Settings SyncとCodespaceで体験する新世代へのパラダイムシフト
C#メタプログラミング概略 in 2021
Unicodeで半角全角を扱うAmbiguous(曖昧さ)とUncertainty(不確実性)の恐怖
世界一わかりやすいClean Architecture - DroidKaigiバージョン
世界一わかりやすいClean Architecture
世界一わかりやすいClean Architecture release-preview
世界一わかりやすいClean Architecture alpha-1
Visual Studio 2019で始める「WPF on .NET Core 3.0」開発
Desktop app dev strategy for .net core 3.0
継続的にテスト可能な設計を考える
継続的にテスト可能な設計を考える ベータ版
α版 継続的にテスト可能な設計を考える
App center analyticsを使い倒そう
Old:App center analyticsを使い倒そう
Xamarin.forms navigation overview
App center analyticsを使い倒そう
「関心の分離」と「疎結合」 ソフトウェアアーキテクチャのひとかけら
Xamarin Dev days 2 xamarin.forms ja
Enterpriseから見たXamarinの可能性

Blue monkey architecture overview

Editor's Notes

  • #13: BlueMonkeyはXamarin.Formsを利用したアプリケーションです。 このため、MVVMパターンを採用しています。
  • #46: Xamarin.Android で始めるクロスプラットフォームモバイルアプリ開発 できるXamarin.Mac Prism for Xamarin.Forms入門と次の門 開発者のためのXamarin関連リポジトリ集