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
BCD Designに学ぶ、package by featureのための一貫したfeature...
Search
airRnot
November 30, 2025
1.4k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
BCD Designに学ぶ、package by featureのための一貫したfeatureの切り方
airRnot
November 30, 2025
More Decks by airRnot
See All by airRnot
コンポーネント命名入門 / getting-started-with-component-naming
airrnot1106
0
67
コンポーネント名には何を含めるべきなのか? / what-should-be-included-in-component-names
airrnot1106
0
310
N度目のObsidian挑戦
airrnot1106
0
87
Featured
See All Featured
The SEO Collaboration Effect
kristinabergwall1
1
570
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
430
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
330
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.7k
Everyday Curiosity
cassininazir
0
320
BBQ
matthewcrist
89
10k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
260
Optimizing for Happiness
mojombo
378
71k
The Spectacular Lies of Maps
axbom
PRO
1
990
The Language of Interfaces
destraynor
162
27k
Building Applications with DynamoDB
mza
96
7.2k
Why Our Code Smells
bkeepers
PRO
340
58k
Transcript
BCD Designに学ぶ、 package by featureのための 一貫したfeatureの切り方 2025/11/30 フロントエンドカンファレンス関西2025 airRnot /
@airRnot1106
自己紹介 airRnot Webアプリケーションエンジニア : @airRnot1106 : @airRnot1106 2
Package by Featureとは 機能(Feature)ごとにコードを分類する設計手法 Package by Layer 技術的な役割で分類 Package by
Feature 機能で分類 src/ ├── components/ │ ├── UserProfile.tsx │ └── ProductCard.tsx ├── hooks/ │ ├── useUser.ts │ └── useProduct.ts └── contexts/ ├── UserContext.tsx └── ProductContext.tsx src/ └── features/ ├── user/ │ ├── UserProfile.tsx │ ├── useUser.ts │ └── UserContext.tsx └── product/ ├── ProductCard.tsx ├── useProduct.ts └── ProductContext.tsx 3
Package by Featureとは 機能で分類するといっても、具体的にどうすればいいの? (機能を把握しないと分類できない) 4
BCD Designとは コンポーネントを関心・状況・基礎の3つの軸で分類する手法 https://qiita.com/misuken/items/19f9f603ab165e228fe1 5
BCD Designとは コンポーネントを関心・状況・基礎の3つの軸で分類する手法 6
BCD Designとは 例: リポジトリを作成するボタンリンクなので RepositoryCreateButtonLink Domain(関心): Repository Case(状況): Create Base(基礎):
ButtonLink 7
BCD Designが教えてくれたこと 「明名」という概念 8
BCD Designが教えてくれたこと 明名という概念 「何の何をどうするUI」という法則に従って命名することで、 簡単に一貫性のあるコンポーネント名を導きだせる 「ユーザ」の「プロフィール」を「編集」する「ボタン」 UserProfileEditButton 何 何 どう
UI 9
BCD Designが教えてくれたこと 明名という概念 コンポーネント名は決めるものではなく その依存や性質によって勝手に決まるもの 名前を明らかにする、明名 10
BCD Designが教えてくれたこと 明名という概念 これってPackage by Featureでも 同じことが言えるのでは……? 11
Featureを明名する 明名によって明らかにしたDomainをそのままFeatureとして切る 例: 「ユーザ」の「貢献」を表示する機能 (Base(基礎)はFeatureレベルだと関係ないので気にしなくてOK) features/user-contribution 12
Featureを明名する 明名によって明らかにしたDomainをそのままFeatureとして切る 例: 「ユーザ」の「貢献」を表示する機能 (Base(基礎)はFeatureレベルだと関係ないので気にしなくてOK) features/user-contribution とにかく、日本語で機能名を認識するのが重要! 13
BCD Designが教えてくれたこと その2 Featureは後方一致で分類する user とuser-contribution は同じ粒度の別のFeature ❌ ✅️ user
はuser が関心の対象 user-contribution はcontribution が関心の対象 関心の対象ごとにまとめる features/ └── user/ ├── UserProfile.tsx └── user-contribution/ └── UserContributionGraph.ts features/ ├── user/ │ └── UserProfile.tsx └── user-contribution/ └── UserContributionGraph.ts 14
BCD Designが教えてくれたこと その2 Featureは後方一致で分類する general-user とpremium-user は同じFeature ❌ ✅️ general-user
もpremium-user も、関心の対象はどちらもuser 後方一致の原則により、同じuser のFeatureに属する features/ ├── general-user/ │ └── GeneralUserProfile.tsx └── premium-user/ └── PremiumUserProfile.tsx features/ └── user/ ├── general-user/ │ └── GeneralUserProfile.tsx └── premium-user/ └── PremiumUserProfile.tsx 15
まとめ 命名ではなく明名を意識する 「何の何をどうする機能」という 日本語のフレーズで機能名を認識する Featureは後方一致で、関心の対象ごとにまとめる 16
ご清聴ありがとうございました!