Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
数独ではじめるアルゴリズム 第二章 UI
Search
Ryosuke Uchiyama
October 28, 2020
Programming
47
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
数独ではじめるアルゴリズム 第二章 UI
Ryosuke Uchiyama
October 28, 2020
More Decks by Ryosuke Uchiyama
See All by Ryosuke Uchiyama
AWSでサーバレスな書籍管理アプリを作る
step63r
0
64
PythonでSlack通知botを作る
step63r
0
23
ChatGPT実践
step63r
1
390
IoT実践! 行先予定表を電子ペーパーで作る
step63r
0
46
React x Socket.ioで人狼サーバを作る 第一章 フロントエンド実装
step63r
0
32
深層強化学習で東方AI 第一章 DQNの基本
step63r
0
330
Build 2021 プレイバック
step63r
0
44
WPFで実践アプリ開発! 第四章 機能の実装 Part 2
step63r
0
61
WPFで実践アプリ開発! 第三章 機能の実装 Part 1
step63r
0
140
Other Decks in Programming
See All in Programming
高専キャリア LT 発表内容
crysta1221
6
5.7k
世界の中心で、AI(App Intents)をさけぶ ー App Intents中心設計の実践ガイド
touyou
0
430
マイコン向けの軽量Ruby「PicoRuby」で各種デバイスを制御するネイティブアプリの実現手法
bash0c7
0
370
go-spidermonkeyでAIエージェントのCode Modeを実装する
syumai
3
1.5k
What We Talk About When We Talk About XP
m_seki
2
570
モジュールの視点からSwiftを読み解く #iosdc
s_shimotori
0
110
kubernetes コンポーネント開発入門 / 新卒N年目の勉強会&交流会!〜〇〇への誘い〜 #n_study
mazrean
0
220
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
290
Go × SIMDで高速化するベクトル検索 ~ルーフラインモデルでSIMDが効く境界を探れ! ~
po3rin
1
240
技術的負債を組織課題として解く-増えすぎたマイクロサービスとの戦い-
reimaru
1
510
XP祭りでしか伝わらないフリップネタ #xpjug
murabayashi
0
150
AGENTS.md Is Not Enough:Build Skills, Don't Download Them
lx_t
0
110
Featured
See All Featured
GraphQLとの向き合い方2022年版
quramy
50
15k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
6.2k
Building the Perfect Custom Keyboard
takai
2
870
Balancing Empowerment & Direction
lara
6
1.3k
The Curse of the Amulet
leimatthew05
2
14k
Paper Plane (Part 1)
katiecoart
PRO
1
11k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.6k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
202
76k
Tell your own story through comics
letsgokoyo
1
1.1k
Crafting Experiences
bethany
1
330
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
230
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
280
Transcript
数独ではじめるアルゴリズム 第二章 UI Ryosuke Uchiyama step63r
グラフ構造と深さ優先探索(DFS) 0 1 2 3 4 11 5 8 6
7 9 10 12 13 14 前 回 の あ ら す じ
入れられる数字の選択肢が少ないマスから埋めていく 3 6 5 4 8 7 9 4 5
1 9 7 3 5 6 8 9 6 5 4 4 6 5 5 6 5 3 5 3 4 5 6 5 3 4 4 4 6 5 5 5 4 4 5 5 5 4 4 5 5 5 4 7 3 3 4 3 4 4 5 6 4 4 5 6 5 4 4 6 4 5 7 7 4 6 7 7 5 6 6 8 問題 入れられる数字の残数 ここから処理するよりも… この辺から処理した方が速い! 前 回 の あ ら す じ
一意に決まるマスはあらかじめ埋めておく 3 6 5 4 8 7 9 4 5
1 9 7 3 5 6 8 9 問題 5 8 3 6 5 4 8 7 5 9 4 6 5 9 1 5 9 7 3 5 6 8 5 9 5 前処理後の問題 前 回 の あ ら す じ
今後やること • UI実装(WPFかXamarinあたり) • モバイル対応(iOSアプリをビルドする環境がない……つらたん……) • OCR(問題をカメラで撮ってAzure Cognitive Servicesとかで盤面認識&自動解答) •
マルチスレッド(たぶんやらないやつ) 前 回 の あ ら す じ
WPFとMVVMパターン
WPFにおける見た目 <> C# XAML (MainWindow.xaml) コードビハインド (MainWindow.xaml.cs)
素直に分離 <> XAML (MainWindow.xaml) C# コードビハインド (MainWindow.xaml.cs) C# その他クラス 見た目
ロジック
データバインディングに最適化 <> XAML + コードビハインド C# C# その他クラス C# 見た目
ロジック データバインドの ソース
MVVMパターン View ViewModel Model データ バインディング コマンド メソッド呼出し プロパティ設定 変更通知
変更通知
なぜMVVMなのか • 見た目とロジックを分離できる • 分離できるのでテストコードが書きやすくなる • コードビハインドの記述が減る(複雑な描画処理の場合は必要) • UIスレッド外からの変更通知が容易に受け取れる •
Viewがインスタンスを持たなくてもオブジェクトの操作が可能になる
Xamarin
今までのアプリ開発 iOS App Android App Windows App Objective-C Xcode Java
Eclipse C# Visual Studio
Xamarin • ネイティブAPIを100%移植 • ネイティブアプリを作成できる • C# / .NET /
Visual Studioで開発できる • コードを共通化できる • 画面も共通化できる
Xamarinネイティブ iOS C# UI Android C# UI Windows C# UI
Shared C# Backend
Xamarin.Forms Shared C# Backend Shared UI Code iOS Android Windows
つくったもの
SudokuApp MainPage Button Button SudokuControl SudokuControl Entry Entry Entry Entry
Entry Entry Entry Entry Entry ︙ … MainViewModel カメラ起動 コマンド 解答実行 コマンド SudokuControlViewModel 数独 プロパティ 盤面 プロパティ メッセージ通知 連動 Sudoku 盤面 メンバ変数 深さ優先探索 メソッド
Demo
今後やること • UI実装(WPFかXamarinあたり) • モバイル対応(iOSアプリをビルドする環境がない……つらたん……) • OCR(問題をカメラで撮ってAzure Cognitive Servicesとかで盤面認識&自動解答) •
マルチスレッド(たぶんやらないやつ)