Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
複雑なドメインに挑む.pdf
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Yuki Sakai
September 04, 2025
Programming
3k
5
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
複雑なドメインに挑む.pdf
Yuki Sakai
September 04, 2025
More Decks by Yuki Sakai
See All by Yuki Sakai
Dart and Flutter MCP serverで実現する AI駆動E2Eテスト整備と自動操作
yukisakai1225
0
2.9k
Flutterアプリを⾃然⾔語で操作する
yukisakai1225
0
420
Other Decks in Programming
See All in Programming
AI がコードを書く時代における新卒エンジニアの仕事風景 (2026) / New Graduate Engineers in the Era of AI Coding (2026)
sushichan044
0
190
AI駆動開発を妨げる技術的負債の解消アプローチ / ai-refactoring-approach
minodriven
17
8.5k
「AIで開発し、AIを届ける」をEvalでつなぐ 〜AIネイティブに始めるプロダクト開発の実践〜 / Connecting "Develop with AI, deliver AI" with Eval
rkaga
4
5.6k
トークンをケチるな、設計しろ:GitHub Copilotを賢く使うコンテキスト戦略
ochtum
0
270
Go1.27で導入されるジェネリクスメソッドでできること
mackee
0
240
Developing with AI Agents — Codex, Claude Code & Cowork Practical Guide
x5gtrn
PRO
0
1.3k
キャリア迷子上等 ─ "ない道"は自分で作ればいい
16bitidol
3
2.7k
分散システム、なんですぐ死んでしまうん?耐障害性を高めたいあなたのためのレジリエンスパターン入門
mshibuya
2
910
20260623_Loop Engineeringで自分の分身の問い合わせBotを作る
ryugen04
0
110
PHPで使える日時の表現と、その知り方 #frontend_phpcon_do
o0h
PRO
0
280
Signal Forms: Details & Live Coding @enterJS 2026 in Mannheim
manfredsteyer
PRO
0
210
作って学ぶ、 JSX (TSX) ランタイムの基本
syumai
7
1.7k
Featured
See All Featured
Writing Fast Ruby
sferik
630
63k
My Coaching Mixtape
mlcsv
0
160
A Modern Web Designer's Workflow
chriscoyier
698
190k
Agile that works and the tools we love
rasmusluckow
331
22k
Utilizing Notion as your number one productivity tool
mfonobong
4
340
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
170
How to train your dragon (web standard)
notwaldorf
97
6.7k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
330
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
220
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
320
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.3k
Transcript
© LayerX Inc. 複雑なドメインに挑む LayerX バクラク事業部アプリチーム 酒井佑旗 〜複雑なドメインに20代として取り組むということ〜
⽬次 Agenda • バクラクのドメインの難しさ • 複雑なドメインへのアプローチ • 20代で複雑なドメインに取り組む⾯⽩さ
© LayerX Inc. 3 株式会社LayerX バクラク事業部モバイルチーム 2023年6⽉インターン開始 2025年4⽉新卒⼊社 酒井佑旗 ⾃⼰紹介
FlutterKaigi2025でAI x E2Eについて話します
バクラクのドメインの難しさ ワークフローはなぜ難しいのか
5 © LayerX Inc. • 各企業が⾃由にワークフローを設計可能 • 故にビジネスロジックがとても複雑 • 加えて、UX
を重視した結果、クライアントサイドに ビジネスロジックが集中 バクラク申請‧経費精算とは 「経費精算や様々な稟議を⾏う SaaS」 バクラク申請‧経費精算の難しさ
6 © LayerX Inc. バクラク申請‧経費精算とは • 各企業が⾃由にワークフローを設計可能 • 故にビジネスロジックがとても複雑 •
加えて、UX を重視した結果、クライアントサイドに ビジネスロジックが集中 「経費精算や様々な稟議を⾏う SaaS」 バクラク申請‧経費精算の難しさ → 今⽇はそのごく⼀部を話します
フィールドの ⼊⼒⽅法をどう表すか
8 © LayerX Inc. フィールドの⼊⼒⽅法をどう表すか 複雑なドメインに向き合う • ⾦額フィールドにはさまざまな⼊⼒⽅法が存在 ◦ ⼿動⼊⼒、OCRによる⾃動⼊⼒、サジェストからの
⼊⼒、変更不可の⾃動⼊⼒ • ⼊⼒⼿段によってその後の挙動が異なる ◦ システムによって固定値が⼊⼒される場合、ユー ザーは変更することができない → あなたならどのように実現しますか? ⾦額の⼊⼒を例に考えてみましょう
9 © LayerX Inc. 機能要件 フィールドの⼊⼒⽅法をどう表すか ⼿動⼊⼒ OCRによる⾃動⼊⼒ システムによる固定値⼊⼒ •
⼊⼒⽅法は3種類 ◦ ⼿動⼊⼒ ◦ OCRによる⾃動⼊⼒ ◦ システムによる固定値⼊⼒ • ⼊⼒⽅法でテキストフィールドのデザインを変えたい • 「システムによる固定値⼊⼒」の場合、 ユーザー⼊⼒は受け付けない ⾦額⼊⼒のサンプル
10 © LayerX Inc. ⼊⼒⽅法ごとのフラグを持たせる? フィールドの⼊⼒⽅法をどう表すか class PaymentAmountField extends StatelessWidget
{ const PaymentAmountField({ required this.amount, required this.isFilledBySystem, required this.isFilledByOCR, super.key, }); final int amount; final bool isFilledBySystem; final bool isFilledByOCR; @override Widget build(BuildContext context) { return SampleTextField( amount: amount, isFixed: isFilledBySystem, borderColor: isFilledByOCR ? Colors.grey : Colors.purple, showIcon: isFilledByOCR, ); } }
11 © LayerX Inc. ⼊⼒⽅法ごとのフラグを持たせる? フィールドの⼊⼒⽅法をどう表すか class PaymentAmountField extends StatelessWidget
{ const PaymentAmountField({ required this.amount, required this.isFilledBySystem, required this.isFilledByOCR, super.key, }); final int amount; final bool isFilledBySystem; final bool isFilledByOCR; @override Widget build(BuildContext context) { return SampleTextField( amount: amount, isFixed: isFilledBySystem, borderColor: isFilledByOCR ? Colors.grey : Colors.purple, showIcon: isFilledByOCR, ); } } • isFilledBySystem と isFilledByOCR が ともにtrueだったら? • ⼊⼒⽅法が増えたら? • ⼊⼒値がamount以外を持つようになったら? • ⼊⼒⽅法による仕様の違いがさらに複雑になった ら? • ⼊⼒⽅法とUI仕様が密すぎない?
12 © LayerX Inc. ではどうする? フィールドの⼊⼒⽅法をどう表すか Sealedクラスを使おう
13 © LayerX Inc. Sealedとは フィールドの⼊⼒⽅法をどう表すか • 列挙可能なサブタイプの集合を定義する • switch
によるパターンマッチングで網羅性保証される • アプリケーション固有のドメイン状態を型レベルで表現することに使われる
14 © LayerX Inc. • ⼊⼒⽅法を表すSealedクラスを定義 • amountは抽象クラスで定義 • ⼊⼒⽅法ごとに具象クラスを作成
⼊⼒⽅法をSealedクラスを定義 Sealedクラスを使う sealed class InputValue { const InputValue({required this.amount}); final int amount; } class ManualValue extends InputValue { const ManualValue({required super.amount}); } class OcrCompletedValue extends InputValue { const OcrCompletedValue({required super.amount}); } class SystemFixedValue extends InputValue { const SystemFixedValue({required super.amount}); }
15 © LayerX Inc. UIをSealedクラスを⽤いた形に更新 Sealedクラスを使う class PaymentAmountField extends StatelessWidget
{ const PaymentAmountField({ required this.inputValue, super.key, }); final InputValue inputValue; @override Widget build(BuildContext context) { return SampleTextField( amount: inputValue.amount, isFixed: inputValue.isFixed, borderColor: inputValue.borderColor, showIcon: inputValue.showIcon, ); } } extension on InputValue { bool get isFixed => switch (this) { ManualValue() => false, OcrCompletedValue() => false, SystemFixedValue() => true, }; bool get showIcon => switch (this) { ManualValue() => false, OcrCompletedValue() => true, SystemFixedValue() => false, }; Color get borderColor => switch (this) { ManualValue() => Colors.blue, OcrCompletedValue() => Colors.grey, SystemFixedValue() => Colors.grey, }; } わかりやすやのためにor句は未使⽤です
16 © LayerX Inc. • 型による制約で無効な状態を防ぐことができる ◦ 例えば isFilledBySystem と
isFilledByOCR が両方trueになることがなくなる • ⼊⼒⽅法の表現と仕様を分離 • 型によるパターンマッチングを使うことができるので、⼊⼒⽅法の増減に気づきやすい ◦ コンパイラが指摘してくれる Sealedクラスにより得られる恩恵 Sealedクラスを使う
17 © LayerX Inc. これは序の⼝ フィールドの⼊⼒⽅法をどう表すか • ユーザーによるフォームカスタマイズ • フィールドAの⼊⼒状態により、フィールドBの表⽰‧⾮表⽰が切り替わる
• フィールドAの⼊⼒状態により、フィールドBのバリデーションが変化する • APIによる⾮同期バリデーション • 多くの申請種別、明細種別 • 下書き保存、申請後の修正 他にもまだまだ強敵がいます
20代で複雑なドメインに 取り組む⾯⽩さ
19 © LayerX Inc. • 経験豊富なテックリードやEMも「過去⼀難しい」と感じるドメイン • 若⼿の内からこのしたドメインに挑戦できるのは⼤きな成⻑機会 • ドメインの複雑さの裏には多くのユーザーペインが多く存在
◦ ユーザーインパクトが⼤きく、価値提供に繋がりやすい ◦ LayerXではアウトカムを重視しており、チームとしてユーザー体験にフォーカスできている なぜ⾯⽩い? 20代で複雑なドメインに取り組む⾯⽩さ
20 © LayerX Inc. カジュアル⾯談お待ちしております もっと複雑なドメインの話、LayerXのAI活⽤ なんでもお話します!