Coder Social home page Coder Social logo

design-system-for-me's Introduction

πŸ“ Component Architecture

λ³Έ ν”„λ‘œμ νŠΈμ˜ μ»΄ν¬λ„ŒνŠΈ μ•„ν‚€ν…μ³λŠ” CDD(μ»΄ν¬λ„ŒνŠΈ 개발 주도 방법둠)을 지ν–₯ν•˜κ³  μžˆμŠ΅λ‹ˆλ‹€. λͺ¨λ“  νŽ˜μ΄μ§€λŠ” μ»΄ν¬λ„ŒνŠΈμ˜ Atom λ‹¨μœ„λΆ€ν„° μ‹œμž‘ν•΄ Bottom-Up λ°©μ‹μ˜ ꡬ쑰둜 μž‘μ„±λ˜μ—ˆμŠ΅λ‹ˆλ‹€.

-------> Atom -------> Molecule -------> Organism -------> Page

μ™œ μ„Έ κ°€μ§€λ‘œ λ‚˜λˆ„μ—ˆλ‚˜μš”?

  • Organisms의 Section μ»΄ν¬λ„ŒνŠΈλŠ” μŠ€ν† λ¦¬λΆ μž‘μ„±μ— μš©μ΄ν•©λ‹ˆλ‹€. Page μ»΄ν¬λ„ŒνŠΈμ—μ„œ 기쑴의 μ›μž λ‹¨μœ„μ˜ μ»΄ν¬λ„ŒνŠΈλ₯Ό μ‘°ν•©ν•΄ μž‘μ„±ν•˜μ˜€λ‹€λ©΄, νŠΉμ • μ„Ήμ…˜ λ³„λ‘œ μŠ€ν† λ¦¬λΆμ— λ¬Έμ„œν™”κ°€ λΆˆκ°€λŠ₯ν•œ λ¬Έμ œκ°€ λ°œμƒν•©λ‹ˆλ‹€.

  • μ»΄ν¬λ„ŒνŠΈλ₯Ό λ‹¨μœ„ λ³„λ‘œ λ‚˜λˆˆλ‹€λŠ” μ˜λ―ΈλŠ” μ»¨ν…μŠ€νŠΈ μžμ›λ“€μ„ λ‚˜λˆ„μ–΄ 관리할 수 μžˆλ‹€λŠ” μ˜λ―Έκ°€ λ©λ‹ˆλ‹€. 예λ₯Ό λ“€μ–΄ 비동기 μš”μ²­, 연산에 μ‹œκ°„μ΄ ν•„μš”ν•œ 데이터가 νŽ˜μ΄μ§€ μ»΄ν¬λ„ŒνŠΈμ—μ„œ ν•œκΊΌλ²ˆμ— λ Œλ”λ§λœλ‹€λ©΄, UX 상 λ¬Έμ œκ°€ λ°œμƒν•  μ—Όλ €κ°€ ν½λ‹ˆλ‹€. λ³Έ μ»΄ν¬λ„ŒνŠΈ μ•„ν‚€ν…μ³μ˜ Layoutκ³Ό Section μ»΄ν¬λ„ŒνŠΈλ₯Ό ν•¨κ»˜ μ‚¬μš©ν•œλ‹€λ©΄, Layout을 톡해 도메인에 λŒ€ν•œ μ»¨ν…μŠ€νŠΈ μžμ›μ„ ν•œμ •ν•΄ 관리할 수 있고, ν•œμ •λœ μžμ›μ—μ„œ νŠΉμ • μ„Ήμ…˜μ— ν•„μš”ν•œ λ°μ΄ν„°λ§Œ constateλ₯Ό ν™œμš©ν•œ ν›…μœΌλ‘œμ„œ 가져와 관리할 수 있게 λ©λ‹ˆλ‹€. μ΄λŠ”, React 18의 Suspense(React-Queryλ₯Ό ν¬ν•¨ν•œ) 및 Fallback μ „λž΅μ—λ„ μœ λ¦¬ν•©λ‹ˆλ‹€.

components
γ„΄ Atoms
- 더이상 μͺΌκ°œμ§ˆ 수 μ—†λŠ” μ΅œμ†Œλ‹¨μœ„μ˜ 곡톡 μ»΄ν¬λ„ŒνŠΈκ°€ 이 곳에 μœ„μΉ˜ν•©λ‹ˆλ‹€. μ•„ν† λ―Ή λ””μžμΈ νŒ¨ν„΄μ˜ Atoms와 μœ μ‚¬ν•©λ‹ˆλ‹€.
γ„΄ Molecules
- 각 λ„λ©”μΈμ—μ„œ μž¬μ‚¬μš© κ°€λŠ₯ν•œ UI μ»΄ν¬λ„ŒνŠΈκ°€ 이 곳에 μœ„μΉ˜ν•©λ‹ˆλ‹€. AtomsλŠ” μ „μ—­μ—μ„œ μž¬μ‚¬μš©μ΄ κ°€λŠ₯ν•˜λ‹€λ©΄, Molecules에 μœ„μΉ˜ν•œ μ»΄ν¬λ„ŒνŠΈλŠ” ν•΄λ‹Ή 도메인 λ‚΄μ—μ„œλ§Œ μ‚¬μš© κ°€λŠ₯ν•©λ‹ˆλ‹€.
γ„΄ Organisms
- ν•˜λ‚˜μ˜ μ»¨ν…μŠ€νŠΈ μžμ›μ„ κ³΅μœ ν•˜λŠ” λ ˆμ΄μ•„μ›ƒ μ»΄ν¬λ„ŒνŠΈμ™€ ν•΄λ‹Ή μžμ›μ„ μ‚¬μš©ν•˜λŠ” μ—¬λŸ¬ 개의 Molecule UI μ»΄ν¬λ„ŒνŠΈκ°€ 유기적으둜 배치된 Section μ»΄ν¬λ„ŒνŠΈκ°€ 이 곳에 μœ„μΉ˜ν•©λ‹ˆλ‹€.

QnA

Sectionμ—μ„œ 훅을 μ‚¬μš©ν•˜λŠ” κ²½μš°μ™€ Layoutμ—μ„œ 훅을 μ‚¬μš©ν•˜λŠ” κ²½μš°λŠ” μ–΄λ– ν•œ 차이가 μžˆλ‚˜μš”?

Layout은 Section을 μ΄λ£¨λŠ” λΆ€λͺ¨ μ»΄ν¬λ„ŒνŠΈμž…λ‹ˆλ‹€. λ”°λΌμ„œ λΆ€λͺ¨ μ»΄ν¬λ„ŒνŠΈμ—μ„œ ν•˜μœ„ Section듀이 μ‚¬μš©ν•  곡톡 μ»¨ν…μŠ€νŠΈμ— λŒ€ν•΄ μžμ›μ„ 곡유 μ‹œν‚¬ λͺ©μ μ΄ μžˆλ‹€λ©΄, Layout μ»΄ν¬λ„ŒνŠΈμ—μ„œ 훅을 μ„ μ–Έν•΄ constateλ₯Ό 톡해 κ³΅μœ ν•©λ‹ˆλ‹€. Sectionμ—μ„œ λ”°λ‘œ 훅을 κ°€μ Έλ‹€ μ“°λŠ” κ²½μš°λŠ” λ™μΌν•œ Layout μ»΄ν¬λ„ŒνŠΈ λ ˆμ΄μ–΄μ— μžˆλŠ” λ‹€λ₯Έ Sectionμ—κ²Œ μ»¨ν…μŠ€νŠΈ μžμ›μ„ κ³΅μœ μ‹œν‚¬ λͺ©μ μ΄ 없을 λ•Œμž…λ‹ˆλ‹€.

κ·Έλ ‡λ‹€λ©΄ μ™œ Layoutμ—μ„œ 곡유 μ»¨ν…μŠ€νŠΈλ₯Ό λ§Œλ“œλ‚˜μš”? 기쑴에 μ‚¬μš©ν•˜λ˜ λ‹€λ₯Έ λ°©μ‹μœΌλ‘œλŠ” ν•΄κ²°ν•  수 μ—†λŠ” κ³Όμ œκ°€ μžˆμ—ˆλ‚˜μš”?

이λ₯Ό μ„€λͺ…λ“œλ¦¬κΈ° μœ„ν•΄μ„œλŠ” μ œκ°€ Layout-Section ꡬ쑰둜 ν”„λ‘œμ νŠΈλ₯Ό μˆ˜ν–‰ν•˜κΈ° μ „ 기쑴에 κ²ͺμ—ˆλ˜ 기술 뢀채에 λŒ€ν•΄ Trade-Offλ₯Ό κ·Ήλ³΅ν•œ 사둀λ₯Ό μ„€λͺ…λ“œλ €μ•Όν•  것 κ°™μŠ΅λ‹ˆλ‹€.

κ³Όκ±° Layout μ»΄ν¬λ„ŒνŠΈλ₯Ό μ‚¬μš©ν•˜μ§€ μ•Šκ³  νŽ˜μ΄μ§€λ₯Ό κ΅¬μ„±ν•œ κ²°κ³Ό λ‹€μŒκ³Ό 같은 문제점이 λ°œμƒν•˜μ˜€μŠ΅λ‹ˆλ‹€.

  • λ ˆμ΄μ–΄λ‘œ λ‚˜λˆ„μ–΄μ Έ μžˆμ§€ μ•Šμ•„ νŽ˜μ΄μ§€ λ‚΄μ—μ„œ 어디에 μœ„μΉ˜ν•˜λŠ” μ»΄ν¬λ„ŒνŠΈμΈμ§€ λ‹¨λ²ˆμ— νŒŒμ•…μ΄ 어렀움
  • Section μ»΄ν¬λ„ŒνŠΈ 없이 κ΅¬μ„±λ˜λ‹€ λ³΄λ‹ˆ 좔상화 λ ˆλ²¨μ„ μ œν•œν•˜κΈ° μ–΄λ €μ›Œμ§€λ―€λ‘œ 가독성이 μ €ν•˜λ¨
  • νŽ˜μ΄μ§€μ—μ„œ μƒνƒœλ₯Ό μ²˜λ¦¬ν•˜λ‹€λ³΄λ‹ˆ Top-Down λ°©μ‹μ˜ λ¦¬μ•‘νŠΈ μ»΄ν¬λ„ŒνŠΈ λ Œλ”λ§ μ „λž΅μ— μžˆμ–΄ λΆˆλ¦¬ν•¨

μ΄λŸ¬ν•œ 기술 뢀채λ₯Ό ν•΄κ²°ν•˜κΈ° μœ„ν•΄ Layout-Section ꡬ쑰λ₯Ό λ„μž…ν•˜μ˜€μœΌλ©°, λ°©ν–₯성은 λ‹€μŒκ³Ό κ°™μ•˜μŠ΅λ‹ˆλ‹€.

  • νŽ˜μ΄μ§€μ—μ„œ λ ˆμ΄μ–΄λ₯Ό λ‹€λ£° 수 있게 Layout μ»΄ν¬λ„ŒνŠΈλŠ” Compound μ»΄ν¬λ„ŒνŠΈλ‘œ μž‘μ„±ν•˜λ„λ‘ ν•©λ‹ˆλ‹€.
  • 좔상화 λ ˆλ²¨μ„ μ½”λ“œμ—μ„œ μ œν•œν•  수 μžˆλ„λ‘ Atomic-design νŒ¨ν„΄μ„ μ‚¬μš©ν•˜κ³  λ¬Έμ„œλ₯Ό 톡해 각 단계가 κ°€μ§€λŠ” 의미λ₯Ό μ œν•œν•©λ‹ˆλ‹€.
  • κ²½μš°μ— 따라 Section μ»΄ν¬λ„ŒνŠΈμ™€ Layout μ»΄ν¬λ„ŒνŠΈ μ»¨ν…μŠ€νŠΈ λ‚΄μ—μ„œ μƒνƒœλ₯Ό μ²˜λ¦¬ν•  수 μžˆλ„λ‘ ν•˜μ—¬, λ¦¬λ Œλ”λ§λ˜λŠ” λ²”μœ„λ₯Ό κ΅¬λΆ„ν•©λ‹ˆλ‹€.

ν•˜μ§€λ§Œ λͺ¨λ“  것이 μ™„λ²½ν•˜μ§€λ§Œμ€ μ•ŠμŠ΅λ‹ˆλ‹€. ν•˜κΈ°μ— λŒ€ν•œ 뢀뢄은 기쑴의 Atomic-design νŒ¨ν„΄μ˜ 단점과 λ™μΌν•©λ‹ˆλ‹€.

  • μ½”λ“œ μƒμ˜ κ·œμœ¨μ„ λ¬Έμ„œλ‘œμ„œ μ œκ³΅ν•˜λ―€λ‘œ κ°œλ°œμžκ°€ μ½”λ“œλ₯Ό μž‘μ„±ν•  λ•Œ μ–΄λŠμ •λ„μ˜ ν•™μŠ΅ λΉ„μš©μ΄ λ°œμƒν•  수 μžˆμŠ΅λ‹ˆλ‹€.
  • μ»΄ν¬λ„ŒνŠΈκ°€ νŽ˜μ΄μ§€μ— μ œκ³΅λ˜κΈ°κΉŒμ§€ 각 과정이 μ‘΄μž¬ν•˜κΈ° λ•Œλ¬Έμ— κ΄€λ¦¬ν•΄μ•Όν•˜λŠ” 파일의 μˆ˜κ°€ λ§Žμ•„μ§ˆ 수 μžˆμŠ΅λ‹ˆλ‹€.

Using RXJS (ReactiveX)

RXJS을 톡해 μ˜΅μ €λ²„λΈ” νŒ¨ν„΄μœΌλ‘œ μŠ€νŠΈλ¦Όμ„ κ΅¬μ„±ν•˜λ„λ‘ μ²˜λ¦¬ν•˜μ˜€μŠ΅λ‹ˆλ‹€.

μ˜΅μ €λ²„λΈ”μ€ λ‹€μŒκ³Ό 같은 λ³€μˆ˜ 넀이밍을 κ°€μ§‘λ‹ˆλ‹€. ${λ³€μˆ˜λͺ…}$ - λ³€μˆ˜λͺ… 끝에 '$' κΈ°ν˜Έκ°€ λΆ™μŠ΅λ‹ˆλ‹€.

design-system-for-me's People

Contributors

lucas0530 avatar

Stargazers

PooLyum Lim avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.