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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
mikan
May 10, 2024
Technology
100
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
UIの構成要素に関する考察
モバイル開発LTナイト 〜アプリ開発者交流会〜 の発表資料です
https://karabiner.connpass.com/event/316762/
mikan
May 10, 2024
More Decks by mikan
See All by mikan
形式手法を使って仕様をコーディングしよう
mikanichinose
0
140
Navigation3でやりとりした画面引数をSavedStateHandleから引き出せない理由
mikanichinose
0
35
Lazy APIを使ってGradleビルド速度を改善する
mikanichinose
1
92
Navigation3でViewModelにデータを渡す方法
mikanichinose
0
770
「脳に収まるコードの書き方」を読んで学んだこと
mikanichinose
1
240
RepositoryのSSoT化
mikanichinose
0
100
Kotlin Multiplatform 始めました
mikanichinose
1
170
Web APIをなぜつくるのか
mikanichinose
0
4.3k
イベントをどう管理するか
mikanichinose
3
420
Other Decks in Technology
See All in Technology
VS Code × GitHub Copilot での Fabric 開発
ryomaru0825
1
160
LT:「このままでいいのかな?」から一歩踏み出した私のデータキャリア選択〜社会人3年目に上京を決意したリアル〜Snowflake女子会 vol.8
snowwmn0824
0
110
「大丈夫そう?」をObservabilityで確かめる
mrmtsu
0
230
Lambda MicroVMsが分からなすぎたので使い所を1から考えてみた
tsukuboshi
1
240
キャリアLT今日までそして明日から
kentapapa
1
120
Oracle Cloud Infrastructure(OCI):Onboarding Session(はじめてのOCI/Oracle Supportご利⽤ガイド)
oracle4engineer
PRO
3
21k
Amazon Bedrock Agents ClassicからAmazon Bedrock AgentCoreへ移行した際、ガードレール設定が2箇所に割れた話
matsunobu
0
160
Mastering Agentic Development: Harness Engineering for Effective Coding Agents
konippi
3
640
企業の現実世界をグラフで写し取る
sansantech
PRO
0
200
TiDBファミリーにDWHが新登場!! TiDB最新情報 / TiDB update 202609
yoshiakiyamasaki
0
160
個別開発で終わらせない。 現場の課題をプロダクトの強さに変える StockmarkのFDE
ktkrhr
0
380
Coil3を内部実装から読み解く~キャッシュ戦略とAVIF画像の描画〜/nikkei-tech-talk50
nikkei_engineer_recruiting
0
150
Featured
See All Featured
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
550
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
380
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
380
A Modern Web Designer's Workflow
chriscoyier
699
190k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
510
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
120
120k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
31k
Visualization
eitanlees
153
17k
Designing Experiences People Love
moore
143
24k
Six Lessons from altMBA
skipperchong
29
4.5k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
540
SEO for Brand Visibility & Recognition
aleyda
0
4.8k
Transcript
UI の構成要素に関する考察 モバイル開発LT ナイト 〜アプリ開発者交流会〜 mikan( 一瀬喜弘)
自己紹介 object Mikan { val name = " 一瀬喜弘" val
company = "karabiner.tech" val work = Engineer.Android val hobby = listOf( " 漫画", " アニメ", " ゲーム", " 折り紙", "OSS 開発・コントリビュート", ) }
Compose で大きめの画面のUI を 組んだときのつらみ
Composable 関数のパラメータ 多すぎ
@Composable fun HomeScreen( aSectionUiModel: ASectionUiModel, onClickAItem: (itemId: String) -> Unit,
onClickHelp: () -> Unit, bSectionUiModel: BSectionUiModel, onClickBItem: (itemId: String) -> Unit, onClickMoreButton: () -> Unit, cSectionUiModel: CSectionUiModel, onClickBItem: (itemId: String) -> Unit, dSectionUiModel: DSectionUiModel, onClickDItem: (itemId: String) -> Unit, eSectionUiModel: ESectionUiModel, ) { /* ... */ }
ラムダ式の区別がつかない
onClickHelp: () -> Unit, onClickMoreButton: () -> Unit, @Composable fun
HomeScreen( aSectionUiModel: ASectionUiModel, onClickAItem: (itemId: String) -> Unit, bSectionUiModel: BSectionUiModel, onClickBItem: (itemId: String) -> Unit, cSectionUiModel: CSectionUiModel, onClickBItem: (itemId: String) -> Unit, dSectionUiModel: DSectionUiModel, onClickDItem: (itemId: String) -> Unit, eSectionUiModel: ESectionUiModel, ) { /* ... */ }
理想 UiState やイベントハンドラーは1 本化されて高凝集な状態 @Composable fun HomeScreen( uiModel: HomeUiModel, onUiEvent:
(UiEvent) -> Unit, ) { /* ... */ }
闇雲に実装しても沼にはまるの でUI の作りを見直す
None
None
None
UI は大きく分けて2 つのものを もっているのではないか
状態 と イベント
状態 画面を構成する動的な情報を含んだデータホルダー 任意の時刻における状態を取得することができる 連続的
イベント ユーザーインタラクションやエラー等を表現したもの 特定の時刻に特定のイベントが発行される 離散的
スクリーンレベルとUI レベル
スクリーンレベルの状態 ローディング 成功 エラー スクリーンレベルのイベント エラー 画面遷移
UI レベルの状態 UI レベルのイベント ユーザーインタラクション
UI レベルの状態とイベントは階 層構造を持つ → 今回は割愛
どう実装に落とし込むのか データホルダーとしてStateFlow( 状態) とSharedFlow( イベント) をもちいる イベントの合成だったり、イベントをもとに新しいイベントを発行したり、非同期処理を実行したり、状態を 更新したり → FRP
だったりTEA(The Elm Architecture) 、圏論等の関数型プログラミングの知見をつかう