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
コンポーネント設計のすゝめ__ベストプラクティスを学ぶLunch_LT_.pdf
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
MJ
October 03, 2023
Programming
2k
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
コンポーネント設計のすゝめ__ベストプラクティスを学ぶLunch_LT_.pdf
MJ
October 03, 2023
Other Decks in Programming
See All in Programming
Everything will be SERVERLESS — 信じて運用した10年の経験値 / Everything Will be Serverless — Lessons Learned from 10 Years of Operational Experience
seike460
PRO
1
180
Vue Fes Japan 2026 タイムテーブル徹底解説
448jp
1
250
20260914 AIエージェント時代のPlatform Engineering LLM基盤とプロダクトの責務境界線
kanfab1
7
2.1k
モジュールの視点からSwiftを読み解く #iosdc
s_shimotori
0
180
TiDB Cloudのカスタムコントローラーによるオートスケール対応
takaidohigasi
0
130
Intent as Code
shoppingjaws
6
1k
FreeBSDでZabbixを動かす
kenkino
0
300
XHTMLが残したもの
yosuke_furukawa
PRO
2
810
AgentCore CLI で進化した AWS での AI エージェントの作り方 : 必要な機能を必要な時に
icoxfog417
PRO
3
350
数年滞っていたダークモード対応をおよそ2週間で完了させる
chigichan24
0
720
SONY CISC-NEWS NWS-1750 + NWB-225 フレームバッファの NetBSD/news68k ドライバ実装 / OSC2026Hiroshima
tsutsui
0
120
【高い買い物LT会】初任給で話題の国産フィジカルAIを買った話
akagami
PRO
0
160
Featured
See All Featured
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
1
610
SEO for Brand Visibility & Recognition
aleyda
0
4.7k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.8k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.5k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
700
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
510
Ruling the World: When Life Gets Gamed
codingconduct
0
340
Embracing the Ebb and Flow
colly
88
5.2k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.4k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
870
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
Transcript
Copyright © aumo, Inc. All Rights Reserved. コンポーネント毎に責務の範囲を明確にしたら開発 速度、保守性が向上して幸せになった話 アウモ株式会社
村田 翔 2023.10.04 コンポーネント設計のすゝめ 〜ベストプラクティスを学ぶLunch LT〜
Copyright © aumo, Inc. All Rights Reserved. • Atomic Design
• Nuxt.js 今回のキーワード
Copyright © aumo, Inc. All Rights Reserved. aumoについて
Copyright © aumo, Inc. All Rights Reserved. おでかけ情報サービスの「施設検索サービス」 → 5ジャンルをドメイン区切りで展開、1つのコンテナで稼働させている構成
今回の対象
Copyright © aumo, Inc. All Rights Reserved. 課題
Copyright © aumo, Inc. All Rights Reserved. • サービスを跨いだ使い回しを想定したコンポーネント設計ではな かった
• コンポーネント毎に固有値を持つような設計のため、類似した コンポーネントをサービス毎に用意する状況 最初は1ジャンルのサービス展開であったため...
Copyright © aumo, Inc. All Rights Reserved. • Moleculesなのか?Organismsなのか?どのレベルに当ては めるべきか迷う
• 状態管理はどこでするべきか? • プロパティで値渡しのバケツリレーになりがち • marginはどのレベルで定義するべきか などなど... Atomic Design※で遭遇しがちな問題に直面
Copyright © aumo, Inc. All Rights Reserved. Brad Frost氏が発案。構成要素を「Atoms(原子)、Molecules(分子)、Organisms(有機体)、 Template(テンプレート)、Page(ページ)」の階層に分けた設計手法。
※Atomic Designとは
Copyright © aumo, Inc. All Rights Reserved. 対応策
Copyright © aumo, Inc. All Rights Reserved. コンポーネント毎に責務の範囲を明確化 レベル Atomic
Design ディレクトリ 責務 1 Atoms(原子) ~components/atoms ・最小UIコンポーネント 2 Molecules(分子) ~components/molecules ・Atomsを組合せたUIコンポーネント 3 Organisms(有機体) ~components/organisms ・複数のAtoms、Moleculesを持つUIコンポーネント ・ビジネスロジック ・状態管理(Dispatch/Render) 4 Template(テンプレート) ~layouts ・下位レベルのコンポーネントを組み合わせた UIフレーム 5 Page(ページ) ~pages ・アプリケーションのルート ・router関連の処理 ・認証認可 ・状態管理(Dispatch) Atomic Designに合わせて責務を区切る
Copyright © aumo, Inc. All Rights Reserved. 最小単位のUIコンポーネント 1.
Atoms(原子) ▼ポイント ・プロパティで上位レベルから値を埋め込むため、データは基本的に利用しない ・外枠にmarginを持たせない
Copyright © aumo, Inc. All Rights Reserved. Atomsを組み合わせたコンポーネント 2. Molecules(分子)
▼ポイント ・プロパティでOrganismsから値を埋め込むため、データは基本的に利用しない ・外枠にmarginを持たせない
Copyright © aumo, Inc. All Rights Reserved. 複数のAtomsとMoleculesを組み合わせたコンポーネント 3. Organisms(有機体)
▼ポイント ・状態管理、Storeから下位レベルのコンポーネントに埋め込む値を渡す ・外枠にmarginを持たせない
Copyright © aumo, Inc. All Rights Reserved. 下位レベルのコンポーネントを組み合わせたUIフレーム 4. Template(テンプレート)
▼ポイント ・レイアウトを定義するのに特化、データの受け渡しは行わない
Copyright © aumo, Inc. All Rights Reserved. アプリケーションのルート 5. Page(ページ)
▼ポイント ・APIから必要な情報を取得し、Storeにcommitする
Copyright © aumo, Inc. All Rights Reserved. まとめ
Copyright © aumo, Inc. All Rights Reserved. • コンポーネントが再利用しやすい状態になる •
重複コードの排除による開発効率、保守性向上 • 状態管理がカオス状態になることを避けることによる開発効 率、保守性向上 • 誰がコードレビューしても指摘のブレがなくなる コンポーネント毎に責務の範囲を明確化することで
Copyright © aumo, Inc. All Rights Reserved. ご清聴ありがとうございました テックブログで取組発信中