0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Atomic Designについて勉強してみた⑤ (Pages, Templates)

Last updated at Posted at 2022-09-30

今回は、Atomic Designの中でも一番大きい粒度であるPages・Templatesについて学んだことを書いていきたいと思います。

atomic.png
出典元:https://atomicdesign.bradfrost.com/chapter-2/ 

Templates

最終的にレイアウトデザインを確認するためのコンポーネント。
Apiを叩いたりデータを流し込んだりせずに、空のまま定義する
Templatesがあることで、データとデザインの分離が可能になるので、テスト等が容易になる。

Pages

ユーザーの目に触れる部分、実際にApiを叩いたりルーティングを行なってデータの流し込みを行う。
Templatesを埋め込む大枠として定義する。
自分たちのプロダクトでは、ここでAxiosでApiを叩いてサーバサイドからデータを取得し、Templates以下に流し込みを行っていました。

まとめると、PagesとTemplatesはデザインとデータ(実際のコンテンツ)の棲み分けを行うために存在しているということになります。

ちなみに急に科学用語でなくなる理由ですが、PagesとTemplatesに関しては開発者以外と会話する際に使用する部分と定義しているからだそうです。
科学用語と使い分けることでそこの棲み分けも明確にしています。

参考文献

  • 五藤佑典, 「Atomic Design ~堅牢で使いやすいUIを効率良く設計する」, 技術評論社, 2018

  • Atomic Design by Brad Frost https://atomicdesign.bradfrost.com/

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?