ããã«ã¡ã¯ããã¯ã©ã¯ç³è«ã»çµè²»ç²¾ç® ãã¤ãã£ãã¢ããªã¨ã³ã¸ãã¢ã®yoheiã§ãã
æè¿ã¯ãããæ£ç¾©æã®é転è£å¤ãã¬ã¤åç»ãè¦ãªããæ³å¾ã®åå¼·ãã¦ã¾ãã好ããªã©ã¸ãªã¯ç空ã¸ã§ã·ã«ã®ã©ã¸ãªç¶ã¡ããã§ããM-1ãå¿æ´ãã¦ã¾ãï¼
ãã®è¨äºã¯LayerXããã¯ã¢ãã«ã¬2023ã®26æ¥ç®ã®è¨äºã§ããåå㯠赤羽ãã ããGoè¨èªã®ORMã§ããGORMãv1ããv2ã¸ã®ãã¤ã°ã¬ã¼ã·ã§ã³ãã話ããæ¸ãã¦ããã¾ããã27æ¥ç®ã®è¨äº id:itkq ããããã勤怠をいい感じにする社内Slackアプリ #LayerXテックアドカレ - LayerX エンジニアブログããã¹ãããã¾ãããä¸ç·ã«ã覧ããã ãããã¨ï¼
ãã¯ã©ã¯ç³è«ã»çµè²»ç³è«ã§ã¯ç¾å¨ã®ã¢ãã¤ã«ã¢ããªãFlutterã§ã®ãªãã¬ã¼ã¹ãé²ãã¦ãã¾ãããã®ããã§ãã¼ã ã¨ãã¦UIã³ã³ãã¼ãã³ã(Widget)ãã©ã®ç¨ã«ä½ã£ã¦ãããè¨è¨(UI Component Architecture)ã決ãéçºãé²ãã¦ãã¾ãã
ããæè¿ãAtomic DesignããLayerXç¬èªã®è¨è¨ã«è½ã¡çããã®ã§ããªãAtomic Designããç¬èªè¨è¨ã«ç§»è¡ããã®ããç´¹ä»ãã¦ããã¾ãã
(â»Atomic Designã«ã¤ãã¦ã¯è²ã ãªãµã¤ãã§ç´¹ä»ãã¦ããã®ã§ãä»åã¯å²æããã¦ããã ãã¾ã)
ã¢ããªã§ä½¿ç¨ãã¦ããæè¡
ã¾ããFlutterã¢ããªã§å©ç¨ãã¦ããæè¡ã®ä¸é¨ã説æãã¦ããã¾ãã
- API
- GraphQL
- ç¶æ
管ç
- Flutter hooksï¼1UIã³ã³ãã¼ãã³ãå ã®ç¶æ 管çï¼
- Riverpod (UIã³ã³ãã¼ãã³ããã¾ããå ´åã®ç¶æ 管ç)
- Widgetã«ã¿ãã°
Atomic Designãæ¡ç¨ããçç±ï¼
LayerXã§ã¯å ã Webã¢ããªã§Atomic Designãæ¡ç¨ãã¦ãããããããã«å£ã£ã¦ãã£ã¦ããããmolecules, Organismsãªã©åå²ãã¦ããã°ã¦ã¼ã¹ã±ã¼ã¹ã«ãããéçºããããããªãã®ã§ã¯ã¨èããAtomic Designãæ¡ç¨ãã¾ããã
Atomic Designã®æ§æ
LayerXã§ã®UIã³ã³ãã¼ãã³ãã¯Atoms, Molecules, Organisms, Parts, Templates, Pagesã¨6ã¤ã®è¦ç´ ã§æ§æãã¦ãã¾ãã(Partsã«é¢ãã¦ã¯ç¬èªã®è¦ç´ ã«ãªã£ã¦ãã¾ã)
åè¦ç´ ãç°¡åã«èª¬æãã¦ãã¾ãã
Atoms
- ãã¼ã¸ãæ§æãããã以ä¸åããããªãæå°æ§æè¦ç´
- ãã¡ã¤ã³ã«ä¾åããªã
Molecules
- æå³ãæã¤è¦ç´
- Atomsãçµã¿åããã¦ä½æããã
- ãã¡ã¤ã³ã«ä¾åããªã
Organisms
- ãµã¼ãã¹ã¨ãã¦æå³ã®ããåä½ã§æ©è½ããè¦ç´
- Atoms, Molecules, Organismsãçµã¿åããã¦ä½æããã
- ãã¡ã¤ã³ã«ä¾åãã
- Fragment colocationãå®ç¾©ã¯ã§ãããAPI Callã¯ã§ããã ãããªãï¼parts, pagesã§è¡ãï¼
- ãã¸ãã¯ãæã¤
Templates
- ãã¼ã¸å ¨ä½ã®éª¨çµã¿
- Atoms, Molecules, Organismsãçµã¿åããã¦ä½æããã
- ãã¡ã¤ã³ã«ä¾åãã
- ãã¸ãã¯ã¯æããªã
- 1ã¤ã® Parts or Page ã«1ã¤ã®templateãåå¨ãã
Parts
- PageæªæºãOrganisms以ä¸ã®UIã³ã³ãã¼ãã³ã
- ãã¡ã¤ã³ã«ä¾åãã
- ãã¸ãã¯ãæã¤
- ãã¼ã¿åå¾ãè¡ã
Pages
- UIã®æçµå½¢æ
- routeå®ç¾©ã¨ãã¦ã§ã¦ãã
- ãã¡ã¤ã³ã«ä¾åãã
- ãã¸ãã¯ãæã¤
- ãã¼ã¿åå¾ãè¡ã
ã¾ã¨ããã¨ä»¥ä¸ããã«ãªãã¾ãã
è¦ç´ | ä¾åå¯è½UIã³ã³ãã¼ãã³ã | ãã¡ã¤ã³ä¾å | Dataåå¾(APIå®è¡ãªã©) | Fragment Colocationè¨±å¯ |
---|---|---|---|---|
Atoms | x | x | x | x |
Molecules | Atoms | x | x | x |
Organisms | Atoms, Molecules, Organisms | o | â³ | o |
Templates | Atoms, Molecules, Organisms | o | x | x |
Parts | Templates | o | o | o |
Pages | Templates | o | o | x |
Partsãçã¾ããèæ¯ã¨ãã¦ã¯ãã¿ããè¤æ°åããããããã®ä¸èº«ã§å¥ã ã®APIãå®è¡ãã¦ããããPagesã§APIãå®è¡ãã¦ãã¾ãã¨ãã¼ã¿ãå¤æ´ãããå ´åãªã©ã«ç»é¢å ¨ä½ï¼å ¨ã¦ã®ã¿ãï¼ãåæç»ããã¦ãã¾ããã¨ã«ãªãã¾ããããã§ã¯ããã©ã¼ãã³ã¹ãè¯ããªãã®ã§ãPagesã§ã¯ãªããAPIãå®è¡ããè¦ç´ ãã»ããï¼ã¨ãªããPartsãèªçãã¾ãããï¼GraphQLã使ã£ã¦ããã®ã§ãOrganismsã¯Fragment Colocationã®å®ç¾©ã®ã¿ã§APIã®å®è¡ã¯Pagesã®ã¿ã§è¡ãã¨ããè¨è¨ã§ããï¼
ãªãAtomic Designããããã®ãï¼
çµè«ãè¨ãã¨ãè¦ç´ æ°ãå¤ãç ©éããå¢ãã¦ãã¾ãèªèé½é½¬ãç¡é§ãªè¨è¿°ãå¤ããªãéçºé度ãåºãªããªã£ãããã§ãã
- ãã¤ã¢ãã°ãBottomSheetã¯Organismsãªã®ããPartsãªã®ãï¼
- Organismsã§APIå®è¡è¨±å¯ããã¦ããªãã®ã§ãç°¡åãªAPIå®è¡ããå¦çã§ãPartsãä½ããªãã¨ãããªãï¼è¤éãªOrganismsãããã°ç°¡åãªPartsãåå¨ãã¦ãã¾ã£ã¦éåæããã£ãï¼
- å½¹å²ã®å¤æ´ã«ããã¬ã¤ã¤ã¼ã®ç§»åãçºçããå¤æ´ã³ã¹ããããï¼ex. Organismsã§ä½æãã¦ãããéä¿¡ãå¿ è¦ã«ãªã£ãã®ã§Partsã«å¤æ´ããï¼
- ãã§ã«å®è£ æ¸ã¿ã®UIã³ã³ãã¼ãã³ãã ã£ãããOrganismsãPartsã®èªèãæã£ã¦ãããéè¤ããUIã³ã³ãã¼ãã³ããä½æãã¦ãã
- ãã¸ãã¯ã¯Flutter Hooksã«ããé è½ã§ãã¦ããããPages, Templatesã®åå²ã®ã¡ãªãããç¡ãç¡é§ãªè¨è¿°ãå¢ãã¦ãã
æ°ããªç»é¢ãéçºããæã«ãã¬ãã¥ã¢ã¼ã¨ã¬ãã¥ã¤ã¼ã§è¦ç´ ã®ã¬ã¤ã¤ã¼ãåããç¸è«&ææ»ããçºçãã¦ããç¶æ ã§ããã
New UI Component Architecture
ãããã®èª²é¡æãããã¼ã ã§è©±ãåããã·ã³ãã«ã§ããããããè¨è¨ã«ãããã¨ã«ãã¾ããã
以ä¸ã®åºæºã«ããè¦ç´ ãåãããã¨ã«ãã¾ããã
- ãã¡ã¤ã³ä¾åã®æç¡
- Routeã®Destinationã¨ãªãããã©ãã
ãã®åºæºã«æ²¿ã£ã¦3è¦ç´ (Parts, Compounds, Pages)ã«åå²ãè¡ãã¾ããã
ãã¡ã¤ã³ä¾åæç¡ | Routeã®Destinationã¨ãªãããã©ãã | æ§è¦ç´ | |
---|---|---|---|
Parts | x | x | Atoms, Molecules |
Compounds | o | x | Organisms, Parts |
Pages | o | o | Page, Templates |
ä½è«ã§ãããå¼ç¤¾ãã³ã³ãã¦ã³ãã¹ã¿ã¼ãã¢ãããç®æãã¦ããã®ã§Compoundsã¨ãªãã¾ããï¼
ããã§ã¯ãåè¦ç´ ã®èª¬æããã¦ããã¾ãã
Parts
- ã©ãã®ã¢ããªã§ã使ãããããªUIã³ã³ãã¼ãã³ã(ãã¼ã)
- Atomic Designã«ãããAtoms, Molecules
- ãã¡ã¤ã³ã«ã¯ä¾åããªã
- ç¶æ ã¯æããªã
- Partså士ãçµã¿åããã¦ãè¯ã
- Button + Labelãæã¤Partsãä½ãã
- Widgetbookãæ´»ç¨ãPartsãææ¡ã»ç¢ºèªã§ãã
Compounds
- ãã¡ã¤ã³ã«ä¾åããUIã³ã³ãã¼ãã³ã
- AtomicDesignã«ãããOrganisms
- ãã¡ã¤ã³ã«ä¾åãã
- ç¶æ ãæã£ã¦ãã
- å ±éãã¼ãã¨ãã¦ä½¿ãå´é¢ãããããããã¼ã¿åå¾ã¯ç©æ¥µçã«è¡ããFragment Colocationãå©ç¨ãã
Pages
- UIã®æçµå½¢æ
- routeå®ç¾©ã¨ãã¦ã§ã¦ãã
- DialogãBottomSheetã¯routeã®å®ç¾©ã¨ãã¦åºã¦ããªãã®ã§Compoundsã¨ãã¦å®ç¾©ãã
è¦ç´ æ°ãååã«ãªããåºæºãæ確ã«ãªã£ããã¨æãã¾ãã
Atomic Designã¨åãç¨ã«ã¾ã¨ããã¨ãã¡ãã«ãªãã¾ãã
è¦ç´ | ä¾åå¯è½UIã³ã³ãã¼ãã³ã | ãã¡ã¤ã³ä¾å | Dataåå¾(APIå®è¡ãªã©) | Fragment Colocationè¨±å¯ |
---|---|---|---|---|
Parts | Parts | x | x | x |
Compounds | Parts, Compounds | o | o | o |
Pages | Parts, Compounds | o | o | x |
ãããã«
æ°ããªè¨è¨ã«å¤æ´ãã¦ããæ¥ã¯æµ ãã§ããUIã³ã³ãã¼ãã³ããä½æããããã®åºæºãæ確ã«ãªã£ãããä¸è¦ãªè¦ç´ ããªããªã£ããã¨ã«ããæ©ããã¨ãå°ãªããªãéçºé度æ¹åã«ç¹ãã£ã¦ããã¨å®æãã¦ããã¾ãï¼
ã¢ãã¤ã«éçºã«ã¤ãã¦æ°ã«ãªããã¨ãããã°ã話ãã¾ãããï¼
ãã¿ã©ã¯ããã¯ã©ã¯ã«ãããããã¯ããä¸ç·ã«éçºãã¦ãããã人ã大åéä¸ã§ãï¼ãããèå³ããã¾ãããããã²ã«ã¸ã¥ã¢ã«é¢è«ããã話ããã¦ãã ããï¼LayerXãªãã£ã¹ã§ã«ã¸ã¥ã¢ã«ã«ããªã³ã¯ã飲ãä¼ãä¼ç»ãã¾ããããã¡ããæ¯éã覧ãã ããï¼
æ¡ç¨æ å ±ã¯ãã¡ãâ jobs.layerx.co.jp