ãããã®ã€ãã³ãã¯ãBEMæ¹æ³è«ã«ãããã©ã€ãã©ãªéçºã®ååãã©ã®ããã«åœ¢æãããããããäžåºŠæãåºããŠäŒããããã®ã¢ã€ãã¢ãç§ãã¡ã«äžããŸããã ãããå€ãã®äººã«ãšã£ãŠèå³æ·±ãæçšã§ããããšãé¡ã£ãŠããŸãã è¡ããŸãããã
é·ãéãç§ãã¡ã¯äž»ã«çŽèŠ³ã䜿çšããŠãããã¯ã®ã©ã€ãã©ãªãäœæããŸããã ãã®ãšãã®ããéã«ã¯ãå€ãã®åé圢ãè©°ã蟌ãŸããå€ãã®æèšãåŸãããŸããã ãã®çµæãã©ã€ãã©ãªéçºã®ååãå«ãæ°ããããã¥ã¡ã³ããäœæããŸãããããã¯ãæ°ãããããã¯ãéçºããéã®ãã§ãã¯ãªã¹ããšããŠäœ¿çšããŠããŸãã ç§ãã¡ã®æèŠã§ã¯ããããã®ã·ã³ãã«ã§æçœãªååã¯ãææ ®æ·±ãã䟿å©ã§ãã¹ã±ãŒã©ãã«ã§ãä¿å®ããããã³ãŒããååŸããæ©äŒãäžããŠãããŸãã
éçºååã«ã©ã®ããã«å°éããããäŸã§åŠã³ããå Žåã¯ãcatãžããããã
å°ãã®æŽå²ããŸãã¯çæã§ã®æ©ãæ¹ã«ã€ããŠ
ç§ãã¡ãã©ã€ãã©ãªã«åãçµã¿å§ãããšããç§ãã¡ã¯ãã»ãšãã©ã®éçºè ãšåãããã«ããã¹ãŠã®äººã®ããã«ãçŽ æ©ããçŸããããããããšæã£ãŠããŸããã ã©ã€ãã©ãªã䜿çšãããå€ãã®ã¢ã€ãã¢ãšãããžã§ã¯ãããããŸããã
ãããå®éã«ã¯ãããã¯å¿ ãããããªããæãããã«ããŸããããšã¯éããŸãã...
ã¿ããªã楜ããŸãã
倧äŒæ¥ãè¥ãäŒæ¥ã§åããŠãã人ã¯ãããã§ãèªè»¢è»ãçºæãããã®ã奜ããªããšãç¥ã£ãŠããŸããããã¯ç§ãã¡ãšåãã§ããã éçºè ã®åã°ã«ãŒãã¯ãèªåã§ãããã¯ãäœæããŸããã å®éããã¹ãŠã®ããŒã ãåãããšãããŸããããæ¹æ³ã¯ç°ãªããŸãã æåã¯ååã«éãã£ãã ããããåããããã¯ã®å®è£ æ°ã¯æ¥éã«å¢å ããŸããã ãã¹ãŠã®ãããžã§ã¯ãã«å ±éã®ãããã¯ã»ãããå¿ èŠã§ããããšãæããã«ãªã£ãïŒããšãã°ãå šå¡ãåããã£ãããšå°äžå®€ãå¿ èŠãšããŠããïŒãããå ±éãããã¯ãå¥ã®ã©ã€ãã©ãªã«é 眮ããããšã«ããŸããã ç§ãã¡ã«ã¯ãå€ãã®åäžã®ãããã¯éã®ç§©åºãå埩ããããšã«ãªã£ãŠãããæèœã§ãã©ã³ã¹ã®ãšãã決å®ã®ããã«æãããŸããã
ãŠãããŒãµã«ã©ã€ãã©ãªã®éçºãéå§ããŸããã ãã¹ãŠã®ãããžã§ã¯ãã«å ±éã®ãããã¯ãäœæããŠãåã ã®ãããžã§ã¯ãã®èŠä»¶ãæºããããã«èããŸããã ãããã¯ã䜿çšãããã¹ãŠã®ã±ãŒã¹ãèæ ®ãïŒæããŸãã§ãã»ãšãã©äžå¯èœïŒãã§ããã ããŠãŒã¶ãŒãã¬ã³ããªãŒãªãããã¯ã«ããããšãè©Šã¿ãŸããã ãã®ãããåãããã¯ã®ã³ãŒãã¯äžé©åãªãµã€ãºã«èšãã¿ãæäŸããã±ãŒã¹ã®90ïŒ ã¯èª°ã䜿çšããŠããŸããã ããã«ããããããããã®ã³ãŒãããã¹ãŠãµããŒãããå¿ èŠããããŸããã ãšã©ãŒã®ä¿®æ£ãé ããŸããã
é床åªå
ãããã¯ã®ã³ãŒãã¯Yandexå ã§äœ¿çšããããããåã ã®ãããžã§ã¯ãã®éçºè ã¯ãªãªãŒã¹ã«äŸåããŠããŸããã ãããã£ãŠããããã¯ãéçºããé床ãéèŠã§ããã
ãããžã§ã¯ãã¯ããã»ã©å€ããªãããã«æããããã¹ãŠã®ãšã©ãŒããã£ããããããšãã§ããããããŠããããã¹ãã¯äœæããŸããã§ããã ãããããããã¯ã®æ°ããããžã§ã¯ãã®æ°ãå¢å ããŸããã ããããéçºè ã®æ°ã¯å¢ããŠãããã®ã®ãåãéãããã¯ã»ã©é ããã®ã§ããã Bugreportã§ãã£ã±ãã«ãªããŸããã
ãŠãŒã¶ãŒã®æš©å©ãå¢ããéçºè ã®æš©å©ãæžã
éåžžã«äŸ¿å©ãªã©ã€ãã©ãªãäœãããã£ãã®ã§ãã ãããè¡ãããã«ãåºç¯ãªãããªãã¯APIãå²ãåœãŠããŠãŒã¶ãŒã«æäœã®äœå°ãäžããŸããã ããããç§ãã¡ã¯èªåãã¡ã®æãçžãããšãèæ ®ããŸããã§ããã å€éšAPIã«åœ±é¿ãäžããããšãªããã»ãšãã©å€æŽãå ããããšã¯ã§ããŸããã§ããã ä¿®æ£ããããšã©ãŒã¯ä¿®æ£ãããæ°ããããŒãžã§ã³ããªãªãŒã¹ãããŸããã ãããããã®ãããªç§»è¡ã¯ãããžã§ã¯ãã®ãã¹ãŠã容赊ãªãå£ããå€ãã®æéãããã£ããããéçºè ã¯ã©ã€ãã©ãªã®å€ãããŒãžã§ã³ããã®åãæ¿ãããŸããŸãæåŠããŸããã
ã¹ã¿ã€ã«ã®ãã¥ã¢ã³ã¹
ã©ã€ãã©ãªã䜿çšãããã¹ãŠã®ãµã€ãã®ãã¶ã€ã³ãåãã§ãããããã©ã€ãã©ãªã®ã³ã¢ããã¹ã¿ã€ã«ãåé€ããŸããã§ããã ç§ãã¡ã®ããŒããå®çŸããããã«ãäžè¬çãªã¹ã¿ã€ã«ãæšãŠãŠãç¬èªã®ã¹ã¿ã€ã«ã課ããŸããã
ãã®ãããéçºè ã®1人ãã³ã³ãããŒã«ã®éåžžã®å€èŠ³ãå€æŽããå¿ èŠãããç¬éãŸã§æ£ç¢ºã«çããããšãã§ããŸããïŒããšãã°ãããã¢ãŒã·ã§ã³ããŒãžããæãããããããïŒã æ°ããã¹ã¿ã€ã«ãè¿œå ãããšãå€ãã®åé¡ãçºçããŸãããã¹ã¿ã€ã«ãçžäºã«ç«¶åãããã£ã³ã»ã«ããããšãã«ãã³ã³ãããŒã«ãæ£ããæ©èœããŸããã§ããã ãããã¯ããããã¯ã®äžè¬çãªã³ãŒãã«çŽæ¥å®è£ ããæ¹æ³ã¯ãããèªäœãæ£åœåããªãããšãèªããªããã°ãªããŸããã§ããã ç§ãã¡ã¯ãã¢ãŒããã¯ãã£ãèããŠããããžã§ã¯ãã«æ°ããããŒããè¿œå ããå¯èœæ§ãç¯ãå¿ èŠããããšããçµè«ã«éããŸããã
ããã©ã«ãã®äœ¿ããã
修食åã«ããã©ã«ãå€ã䜿çšããã®ã奜ãã§ããã äžæ¹ã§ã¯ãå€ãæå®ããŠæ©èœããã³ã³ãããŒã«ãååŸã§ããªããããããã¯äŸ¿å©ã§ãã äžæ¹ãéçºè ã¯ããã©ã«ãå€ã®ãŸãŸã§ä¿®é£Ÿåã«åœ±é¿ãäžããããšãã§ããŸããã ã€ãŸããå€ã®æ°ã«ã¯å¶éããããŸãã ããšãã°ããã¿ã³ãããããã®ãµã€ãºã¯ä¿®é£ŸåïŒsãmãlãxlïŒã«ãã£ãŠèšå®ãããŸãã 修食åãæå®ããã«ãããã©ã«ãå€-mãååŸããŸãã
ãã ããã«ã¹ã¿ã å€ã䜿çšããå¿ èŠããããšããåžžã«ãããŸãã ææ¡ãããã¢ãã£ãã¡ã€ã¢å€ã®ããããšãäžèŽããªããµã€ãºãèšå®ããå¿ èŠãããå Žåã寞æ³ã«é¢ããè¿œå ã®ã³ãŒãããŸã ã¢ã»ã³ããªã«å ¥ããŸããã ã©ã€ãã©ãªéçºè ã¯ããã¹ãŠã®ããã©ã«ãèšå®ããµããŒãããããšãäœåãªããããããããªãã¡ã¯ã¿ãªã³ã°ã«å€ãã®æéãè²»ããå¿ èŠããããŸããã
ã¹ã¿ã€ã«ã®äžè¬çãªãªã»ããã䜿çšãããããããŒãã®ãªãåºæ¬ãããã¯ã®å®è£ ã¯æ©èœããŸããã§ããã ãããã£ãŠãç§ãã¡ã¯èªåèªèº«ãå ããã¬ãŒã ã«è¿œã蟌ã¿ãŸããããããã¯å€æŽãéåžžã«å°é£ã§ããã
ãã¡ãããããªãã話ãããšãã§ããä»ã®ãšã©ãŒããããŸããã ãããŠããã¹ãŠã®å°é£ã«ééããããšãåŸæããŠããŸããã ããã«ãããã©ã€ãã©ãªéçºãžã®ã¢ãããŒããçå®ããåªå é äœãç¹å®ããBEMã©ã€ãã©ãªéçºã®ããã®ã·ã³ãã«ã§ç解ããããååãçå®ããããšãã§ããŸããã
ååãã©ã®ããã«åœ¢æãããã
éå»ã®çœå®³ã®èŠæš¡ãæšå®ããçµè«ãåºããŠããã¹ãŠã®çµéšã1ã€ã®ãŠãããŒãµã«ã©ã€ãã©ãª-bem-componentsã«åéããŸãããæ°ããã³ã³ããŒãã³ãã®ãªãªãŒã¹ã¯æè¿è¡ãããŸããã ããã§ãã¢ãããŒãã®äž»ãªå€æãšããããã¯ã©ã€ãã©ãªã®äœæã«ãããè¯å®çãªçµéšã«ã€ããŠèª¬æããŸãã
æ®éçãªãããã¯ãšãã¹ãŠã®äººã®ããã«ãã¹ãŠãè¡ããããã¯ã¯åããã®ã§ã¯ãããŸãã
ãŸã第äžã«ãç§ãã¡ã¯ãã¯ãã¿ããªãåã°ããããšã¯ããªããšæ±ºããŸããã ããã§ããããã¯ãŸãã¯è¿œå æ©èœã®éçºãéå§ããã®ã¯ããããæ¬åœã«å¿ èŠã§ãããšå€æããå Žåã®ã¿ã§ãã å¿ èŠæ§ã¯ããããã¯ã䜿çšããããããžã§ã¯ãã®æ°ãå®è£ ã«å¿ èŠãªã³ãŒãã®å€æŽéããããªãã¯APIã®å€æŽã®å¿ èŠæ§ãããã³æ°ããããŒãžã§ã³ãžã®åãæ¿ãã«å¿ èŠãªæéãã決å®ãããŸãã
ç§ãã¡ã¯ãããŒã¹ãåºç€ãšããŠæ©èœãããããããããžã§ã¯ãã§äœ¿çšã§ãããŠãããŒãµã«ãããã¯ãäœæããããšããŸãã ãŠãŒã¶ãŒã®åºæã®èŠä»¶ã¯ãã¹ãŠãããŒã¹ãŠãããã®è¿œå ãšåå®çŸ©ã®å©ããåããŠããŠãŒã¶ãŒãåå¥ã«å®è£ ã§ããŸãã ãã®ãããã§ãç§ãã¡ã«ã¯è£œé ããã補åã®è²¬ä»»ãè² ãæ©äŒããããŸãã ãããã¯ãã§ããéãã·ã³ãã«ã«ããããšããŠããŸãããã®çµæããŠãŒã¶ãŒã¯ãããããããç¹å®ã®ãããžã§ã¯ãã®ããŒãºã«åãããŠåå®çŸ©ããããæ確ãªã³ãŒããååŸã§ããŸãã
ãããã¯ã®æ©èœãåæžããããšã«å ããŠãã©ã€ãã©ãªã®ãã¹ãŠã®ã¬ãã«ã§åäžæ§ãç¶æããŸãã ããšãã°ã1ã€ã®ãããã¯ã§å¯žæ³ã修食åã䜿çšããŠæå®ããå Žåãä»ã®ãããã¯ã®å¯žæ³ã修食åã䜿çšããŠè¡šçŸããå¿ èŠããããŸãã ã€ãã³ããæäœããŠä¿®é£Ÿåãå€æŽã§ããå Žåãæ°ããã€ãã³ããäœæããããµãã¹ã¯ã©ã€ããããããå¿ èŠã¯ãããŸããã
å¯èœãªå Žæã§ã¯ããã©ã«ãå€ã®äœ¿çšãæåŠããŸããã ã©ã€ãã©ãªãŠãŒã¶ãŒã¯ãã³ãŒãã«åœ±é¿ãäžããŠåå®çŸ©ããæ©äŒãå¢ããŸããã
ãŸãããããªãã¯APIãå€§å¹ ã«çµã蟌ãã ããããããã¯ãå€æŽããèªç±ãå¢ãã宣èšãããAPIãå®å®ããŠãããé »ç¹ã«å€æŽãããªããšããèªä¿¡ããŠãŒã¶ãŒã«äžããããããšã«ã泚æããŠãã ããã
å®å šãã€ç¡æ¡ä»¶ã®ãªãŒãã³ãœãŒã¹
ãããã¯éçºãå ¬éããŸããã 圌ãã¯Githubã®ãã¹ãŠã®ã³ãŒããåãåºãã ã»ãã³ãã£ãã¯ããŒãžã§ãã³ã°ã®ã«ãŒã«ã«åŸã£ãŠã©ã€ãã©ãªã®ããŒãžã§ã³ããªãªãŒã¹ãå§ããŸããã åã¡ãžã£ãŒããŒãžã§ã³ã®ãªãªãŒã¹ã«ã¯ãå€æŽå±¥æŽã®è©³çŽ°ãªèª¬æãšæ°ããããŒãžã§ã³ãžã®ç§»è¡ã«é¢ããã¬ã€ãã³ã¹ ãä»å±ããŠããŸãã
ãã¹ãã§ã³ãŒããå®å šã«ã«ããŒããããšã«ããŸããã ããã«ããããããã¯ã®äœæãè€éã«ãªããé床ãäœäžããŸããããµããŒããå€§å¹ ã«ç°¡çŽ åãããŸãã æ°ããããŒãžã§ã³ã®ãªãªãŒã¹ã¯ããã¹ãŠã®ã³ãŒãããã¹ãã§ã«ããŒããããŸã§è¡ãããŸããã
äžèšã®ãã¹ãŠã«å ããŠãããã»ã¹ãèªååã§ããå Žåã¯ããããè¡ãå¿ èŠããããšèããŠããŸãã ããããã¯ãã¹ãŠã®å埩ã¢ã¯ã·ã§ã³ãå®è¡ããéçºè ã®æéã解æŸããå¿ èŠããããŸããããã¯ãå¶ç¶ã«ããã¹ãã®äœæã«è²»ããããšãã§ããŸãã
APIã®ããæ確ãª
ãŸãããã©ã€ããŒãAPIãšãããªãã¯APIã®åé¢ãããæ確ã«ãªã£ããããæ°ããããŒãžã§ã³ãžã®ç§»è¡ãã¯ããã«ç°¡åã«ãªããŸããã ããšãã°ãããããã©ã€ããŒãAPIïŒã¡ãœããã®ååã¯ã¢ã³ããŒã¹ã³ã¢ã§å§ãŸãïŒã§ããããšãæ確ã«ç€ºãæ£åŒãªæšèãéçºããŸãããããã¯ã誰ããã®äžå€æ§ãä¿èšŒããªãããšãæå³ããŸãã ãã ããå¥åº·ã®ããã«ãããªãã¯APIã䜿çšããŠãã ããããã®å€æŽã¯ãæ°ããã¡ãžã£ãŒããŒãžã§ã³ã®ãªãªãŒã¹ã§ã®ã¿å¯èœã§ãã
ãããã¯ã¢ãŒããã¯ãã£ãäºåã«æ€èšããå¿ èŠããããŸã
æçµçã«ãã®ã¢ãŒããã¯ãã£ã決å®ãããŸã§ããããã¯ã®éçºãéå§ããŸããã ãã¡ãããéçºäžã«æåã«èæ ®ãããªãã£ãè¿œå æ©èœãå®è£ ããå¿ èŠããªããšã¯äºæž¬ã§ããŸããã ããããé©åã«èšèšãããã¢ãŒããã¯ãã£ã¯ãéåžžããŠããããç°¡åã«æ¡åŒµã§ããããã«ããè¿œå ã®å€æŽãªãã§äžè¶³ããŠãããã®ãè¿œå ã§ããããã«ããŸãã
ããã¯ãŸãã«ãããã¯ã®ã¹ã¿ã€ãªã³ã°ã§ä»ãã£ãŠããããšã§ã-ããŒãã¯ä¿®é£Ÿåã䜿çšããŠå®è£ ãããŸãã æ°ãããããã¯ãè¿œå ããã«ã¯ã修食åã®æ°ããå€ãèšå®ããã ãã§ãã ã©ã€ãã©ãªã«ãããã¯ã1ã€ãããªãå Žåã§ããå¥ã®ä¿®é£Ÿåã§ãã®å®è£ ãåãåºããŸãã åæã«ãåžžã«ã·ã³ãã«ãªãµãŒãã¹ããŒããäœæããŸããããã«ãããæ°ããããŒããè¿œå ãããšãã«ã¹ã¿ã€ã«ã競åããªãããšã確èªã§ããŸãã ãŸãããã¹ãŠã®ãããã¯ã¯ãããŒã修食åãæå®ãããŠããªããŠãåºæ¬çãªæ©èœãæ©èœããããã«å®è£ ãããŸãã
ç§ãã¡ãã©ã®ããã«æ§ç¯ããæ§ç¯ããæçµçã«æ§ç¯ãããã«ã€ããŠé·ãé話ãããšãã§ããŸãã ãããã圌ããèšãããã«ãäžåºŠèŠãæ¹ãè¯ãã§ã-bem-componentsã©ã€ãã©ãªã¯ç§ãã¡ã®ä»äºã®çµæã§ãã ãã¡ããã補åãããè¯ããããç°¡åã«ãããç解ããããããã®ã«åœ¹ç«ã€ååèªäœããªã¹ãããããšã¯æ®ã£ãŠããŸãã
BEMã©ã€ãã©ãªã®éçºã®åå
é·å¹Žã«ãããç 究ã®çµæãã©ã€ãã©ãªéçºã®çãååãçå®ããŸããã äžèŠããã®ãªã¹ãã«ã¯å€ãã®æçœãªã«ãŒã«ããããŸãããæçœã§ããããšã§ãããã®éèŠæ§ãæžãããšã¯ãããŸããã
1.ãªãŒãã³ãœãŒã¹
ã©ã€ãã©ãªã¯ããã¹ãŠã®ã¿ã¹ã¯ãšèšç»ãå©çšå¯èœãªGitHubã§éçºãããŠããŸãã éçºè ã¯èª°ã§ãã©ã€ãã©ãªã®äœæ¥ã«åå ã§ããŸããããŒã ã®åžæã«åºã¥ããŠã¿ã¹ã¯ãäœæãããããã«ãªã¯ãšã¹ããéä¿¡ããŸãã
2.䜿ãããã
ã©ã€ãã©ãªã¯ã§ããã ãã·ã³ãã«ã«ããå¿ èŠããããŸãã ãããŸãã«èŠãªãããã䜿çšããããããå¯èœæ§ã®ãããã®ã¯ãã¹ãŠç Žæ£ããŸãã
3.ããããªãºã
å¿ èŠãªæ©èœãèšèšãããšãã¯ãããŒãºãçµ±äžããã®ã§ã¯ãªãã亀差ããããã«åªåããŠãã ããã éžæããç¶æ³ã§ã¯ãããå°ãªãã³ãŒããBEMãšã³ãã£ãã£ããŸãã¯ãµããŒãããããåé¡ã解決ããæ¹ãæãŸããã§ãã
4.ãã¹ãç¯å²
ã©ã€ãã©ãªã³ãŒãã¯ãã¹ãã§ã«ããŒããå¿ èŠããããŸãã ããã«ããããšã©ãŒãå°ãªããªããå°æ¥ã®ãµããŒãã®æéãç¯çŽã§ããŸãã ã³ãŒãã¯ããã¹ãã§ã«ããŒããããŸã§ãå®å šã§å®å®ããŠãããšã¯èŠãªãããŸããã æ°ããæ©èœãåãããã«ãªã¯ãšã¹ãããã ãããã¹ããè¿œå ãŸãã¯å€æŽããªãå Žåã¯åãå ¥ããããŸããã
5.åäžæ§
ãã¹ãŠã®ãã£ãŒã«ãåãšã¡ãœããåã¯ã1ã€ä»¥äžã®äºææ§ã®ããã©ã€ãã©ãªå ã§çµ±äžããå¿ èŠããããŸãã ãããã¯å ã§ã¡ãœããã修食åããŸãã¯ãã£ãŒã«ããç¹å®ã®æ¹æ³ã§åŒã³åºãããå Žåãåæ§ã®åé¡ã§ãåãåœåããžãã¯ã«åŸãå¿ èŠããããŸãã ãã¹ãŠã®ãšã³ãã£ãã£ã®äžè²«æ§ãšäžè²«æ§ã¯çµ¶å¯Ÿã«è¿ã¥ããå¿ èŠããããŸãã ã©ã€ãã©ãªã䜿çšãããã³ãŒããå€æŽããä»ã®éçºè ãåœåããžãã¯ãç解ããããšãéèŠã§ãã
6.ãã©ã€ããŒãAPIãšãããªãã¯APIãžã®åé¢
ãã©ã€ããŒããããã¯APIã¯ããã®ãããã¯å€ã§ã¯äœ¿çšããªãã§ãã ããã
ãããªãã¯APIã¯ãäœåãªãã®ãæäŸããã«æå°éã«æããå¿ èŠããããŸãã ããã¥ã¡ã³ãã§äœ¿çšå¯èœãªæ¹æ³ãå¿ ã瀺ããŠãã ããã ãããªãã¯APIã®å®å®æ§ã¯ã ã»ãã³ãã£ãã¯ããŒãžã§ãã³ã°ã®èŠåã®éµå®ã«ãã£ãŠä¿èšŒãããŸãã
7.ãŠãŒã¶ãŒã®åŸ®èª¿æŽ
éçºããã»ã¹ã§ã¯ããŠãŒã¶ãŒåŽã®æè»ãªè¿œå ããã³ãªãŒããŒã©ã€ããã³ãã¬ãŒããã¹ã¿ã€ã«ãããã³ã¹ã¯ãªããã®å¯èœæ§ã«ã€ããŠäºåã«èããŠãã ããã ããšãã° ããã³ãã¬ãŒãããªãŒããŒã©ã€ãããããšã«ãããå ¥åBEMJSONã§HTMLã¿ã°ãæå®ããæ©èœã
8.è€æ°ã®ããŒãã®ãµããŒã
ã©ã€ãã©ãªã¯ããã€ãã®ãããã¯ããµããŒãããå¿ èŠããããŸãã ããã«ãããåã¹ã¿ã€ã«ã®ã«ãŒã«ãæ£ããäœæããæ°ãããããã¯ãšã®ç«¶åãåé¿ã§ããŸãã çŸåšãBEMã©ã€ãã©ãªã®äž»ãªããŒãã¯å³¶ã§ãããæ°ããYandexãã¶ã€ã³ãæ¡çšãããŠããŸãã åãã©ã€ãã©ãªå ã§ã®ããã€ãã®ãããã¯ã®å®è£ ã¯ãbem-componentsã§æ瀺ããã島ãšãšãã«è¿œå ã®åçŽãªããŒãããããŸãã
9.æ瀺çã¯æé»çãããåªããŠããŸãïŒJavaScript APIã§ïŒ
ã¡ãœããã®ååã¯æ¬è³ªãæ£ç¢ºã«åæ ããå®è£ ãããã®ãããã«æ確ã«ããå¿ èŠããããŸãã ãã®ã¢ãããŒãã«ããããšã³ããªã®ãããå€ãäžããŠãAPIãããç解ããããããããšãã§ããŸãã
10.æ瀺çãªããã©ã«ã
ããã©ã«ãã¯æ瀺çã«å®£èšããå¿ èŠããããŸã-ããã¯å€éšAPIã§ãã ããããå€æŽãããšãåŸæ¹äºææ§ã劚ããããŸãã æé»çã§ã©ãã«ã説æãããŠããªãããã©ã«ãã¯ãã©ã€ãã©ãªãµããŒãã«åé¡ãåŒãèµ·ãããŸãã
11.ãšã©ãŒåŠç
å ¥åã¯äœ¿çšåã«ç¢ºèªããå¿ èŠããããŸãããšã©ãŒãçºçããå Žåã¯äŸå€ãã¹ããŒããåŒã³åºãå ã®ã³ãŒãã§åŠçã§ããŸãã ãšã©ãŒåŠçã¯ã©ã€ãã©ãªå šäœã§åäžã«çºçããå¿ èŠããããŸããåãã±ãŒã¹ã§çºçããªãå Žåã¯ããããã¯ã«è€éãªããŒã¿æ€èšŒãè¿œå ããªãã§ãã ããã
12. BEMã®ãµããžã§ã¯ããšãªã¢
BEMãšã³ãã£ãã£ãéããŠè¡šçŸã§ãããã®ã¯ãã¹ãŠãBEMãšã³ãã£ãã£ãéããŠè¡šçŸããå¿ èŠããããŸãã
13.修食åãš å°éåé
修食åã¯ãäœçœ®ãŸãã¯æ¡ä»¶ã®äºåå®çŸ©ãããã»ããã§ãã ç¹æ®ãªãã£ãŒã«ãã¯ã以åã¯æªç¥ã®å€æ°å€ã®ã»ããã§ãã
å€ã®æéã»ãããšããŠè¡šçŸã§ãããã®ã¯ãã¹ãŠã修食åã䜿çšããŠå®è£ ããå¿ èŠããããŸãã ãããäžå¯èœãªå Žåã¯ãå°çšã®ãã£ãŒã«ãã䜿çšããŠãã ããã
14.ãããã¯ã®éå±€
ãããã¯éã®çžäºäœçšã¯ãéå±€çãªé åºã§æ§ç¯ããå¿ èŠããããŸãã ãããã¯ã¯ãå€éšãŸãã¯é£æ¥ãããããã¯ãšå¯Ÿè©±ã§ããŸããã
15.ãããã¯ã¬ãã«ã®æé©å
æé©åãœãªã¥ãŒã·ã§ã³ã¯ãç¹å®ã®åãããã¯ã®éçºäžã«å®è£ ããå¿ èŠããããŸãã å°æ¥ããã§ã«èšè¿°ãããã³ãŒãã§ããããå®è£ ããããããããã«ãå¯èœãªæé©åãã¹ãäºåã«èããŠãã ããã
16.ã«ãŒãã³ããã»ã¹ã®èªåå
ç»åã®æ¿å ¥ãæ¥é èŸã®é 眮ãã¹ã¿ã€ã«ã®ã³ããŒãªã©ã®ãã¹ãŠã®å埩ã¢ã¯ã·ã§ã³ã¯èªååããå¿ èŠããããŸãã éçºè ã¯ã«ãŒãã³ãå®è¡ããå¿ èŠã¯ãããŸãããããã«ã¯ããããããããŸãã
17.ã¢ãããã£ãã¬ã€ã¢ãŠãã®ãªãã¢ãã€ã«ãã©ãããã©ãŒã
ã©ã€ãã©ãªã¯ã¢ãã€ã«ãã©ãããã©ãŒã ããµããŒãããå¿ èŠããããŸãã ã¢ãããã£ãã¬ã€ã¢ãŠãã®äœ¿çšã¯æšå¥šãããŸããã ã©ã€ãã©ãªã¯ããµããŒãã宣èšãããŠãããã¹ãŠã®ãã©ãŠã¶ã§æ©èœããå¿ èŠããããŸããã³ã³ããŒãã³ãã®æ©èœã®ã¿ã§ã¯ãªããã³ã³ããŒãã³ãã®ã¹ã¿ã€ãªã³ã°ã®ã¿ã®äœäžãèš±å¯ãããŸãã
18.å¯çšæ§
ã©ã€ãã©ãªã³ã³ããŒãã³ãã¯ãã¢ã¯ã»ã·ããªãã£ããã°ã©ã ã§èªã¿åãå¯èœã§ããå¿ èŠããããŸããããã®ããã«ãããªãã¯APIãæ¡åŒµããªãã§ãã ããã å¿ èŠãªãã¹ãŠã®ARIAå±æ§ã®å ¬éã¯ããã³ãã¬ãŒããšã¹ã¯ãªããã®ã¬ãã«ã§å®è£ ãããŸãã
19.ããªãŒãã£ã³ã°ãšããž
ã©ã€ãã©ãªã¯ãå°æ¥ã«çŠç¹ãåœãŠãŠéçºãããŠããŸãã åžžã«ææ°ããŒãžã§ã³ã®ãã©ãŠã¶ãŒãšããŒã«ã䜿çšããŠãéçºããã»ã¹ã§å¯èœãªéãé·ãé¢é£æ§ãä¿ã¡ãŸãã
ãããã®ååã¯ãBEMã©ã€ãã©ãªã®éçºã«åœ¹ç«ã¡ãŸãã誰ã§ãéçºã«åå ã§ããŸãã éçºã®åºæ¬ååãçå®ããåŸãå³æžé€šã«è²¢ç®ããããã®å éšã«ãŒã«ãéçºããããšãã§ããŸããã
ååã®äŸã«åŸã-bem-componentsã©ã€ãã©ãª
ãªã¹ããããååã«åŸã£ãŠãã©ã€ãã©ãªãäœæããŸããã bem-componentsã¯ãBEMããŒã ã®äž»èŠãªãªãŒãã³ãœãŒã¹è£œåã§ãã
bem-componentsã©ã€ãã©ãªã«ã¯ã22åã®æ¢è£œã®ã³ã³ãããŒã«ãå«ãŸããŠããŸãã ãã ããäžè¶³ããŠããæ©èœãè¿œå ããããšãå¶éãããã®ã§ã¯ãããŸããã
ã©ã€ãã©ãªããããžã§ã¯ãã«æ¥ç¶ããããŸããŸãªæ¹æ³ãæäŸããŠããŸãã Webãµã€ãã®ã©ã€ãã©ãªã®èª¬æã«ãããã¹ãŠã®æ¥ç¶æ¹æ³ããèªã¿ãã ããã
ããŒãžã§ã³2.3.0以éãbem-componentsã©ã€ãã©ãªã¯ã Distã®åœ¢åŒã§ã®Bootstrap-deliveryãšåæ§ã«äœ¿çšã§ããŸãã ããã§ãã©ã€ãã©ãªã³ãŒãããããžã§ã¯ãã«ã³ããŒããã ãã§ãå ·äœçãªäŸãšããŠãåãããã¯ã§ã®ååã®å®è£ æ¹æ³ã確èªã§ããŸãã
Dist圢åŒã®ã©ã€ãã©ãªé ä¿¡ã¯ãäºåã«çµã¿ç«ãŠãããCSSããã³JavaScriptã³ãŒããšãã³ãã¬ãŒããæäŸããŸãã ã©ã€ãã©ãªã¯ããŒãžãžã®ãªã³ã¯ã«ãã£ãŠæ¥ç¶ãããŠãããã¢ã»ã³ããªãå¿ èŠãšããŸããã
ã©ã€ãã©ãªã䜿ãå§ããæãç°¡åãªæ¹æ³ã¯ãCDNãããã¡ã€ã«ãæ·»ä»ããããšã§ãã ãããè¡ãã«ã¯ãã¢ã€ãã ãè¿œå ããŸã
HTML :
<link rel="stylesheet" href="https://yastatic.net/bem-components/latest/desktop/bem-components.css"> <script src="https://yastatic.net/bem-components/latest/desktop/bem-components.js+bh.js"></script>
CDN: //yastatic.net/-///-.
: https://yastatic.net/bem-components/latest/desktop/bem-components.dev.js+bh.js .
bem-components Dist, .
, â â .
!
PS , , .
HTML :
<link rel="stylesheet" href="https://yastatic.net/bem-components/latest/desktop/bem-components.css"> <script src="https://yastatic.net/bem-components/latest/desktop/bem-components.js+bh.js"></script>
CDN: //yastatic.net/-///-.
: https://yastatic.net/bem-components/latest/desktop/bem-components.dev.js+bh.js .
bem-components Dist, .
, â â .
!
PS , , .