æè¿ç«ã¦ç¶ãã«ãã®ãããã®è©±ãããæ©ä¼ããã£ãã®ã§ããããã®æè¦ã§ãã
vuexã¨ãããFluxã«æãåºãã¿ã¤ãã³ã°
- Vue.jsãå©ç¨ãã¦ãã¦ãç¸äºã«é¢é£ã®ããäºã¤ä»¥ä¸ã®ç¶æ
ãæ±ãå¿
è¦ãåºã¦ããããããã¯ãããã§ã«ãååã«è¤éãªç¶æ
管çãã§ãã
- ãã¨ãã°ãAPIã¨ã®éä¿¡ä¸ã¯ã¤ã³ã¸ã±ã¼ã¿ãåºãããã®ã§ãéä¿¡ä¸ãã©ãããã管çããéä¿¡ãçµãã£ãããã®çµæã表示ããããã«ãéä¿¡çµæãã管çãããããªã©ã
- ååã«è¤éãªç¶æ
管çã«ç«ã¡åããããã«ã¯ãèªåã§ãã¥ã¢ãªDomainå´ããã¡ãã¨ä½ã£ã¦ããã§ç¶æ
管çããããvuexå©ç¨ããã¹ãã ã¨æã
- èªåã§è¨è¨ããããã«ãã¦ããã¾ã£ã¨ãã«MVVMãããã°åæ¹åãã¼ã¿ããã¼ã¯å®ããã®ã§ãFluxã®èãæ¹ã¨MVVMã¯çç¾ããªã
- see http://techblog.reraku.co.jp/entry/2016/12/13/080000
- vuexã触ã£ã¦ã¿ãã¨ãããéåæå¦çå«ãã¦ããªãçãè¯ãã¦ããããããã¦è¦éããè¯ããããªããå§ãã§ãã
vuexã§ç¶æ 管çããããèªåã§PDSã®Domainå´ã®ã¢ã¼ããã¯ãã£è¨è¨ããããã
- vuexã«ä¹ã£ããã¨ãPDSã§è¨ãã¨ããã®Domainå´ãvuexã示ãã¬ã¼ã«ã«ä¹ããã¨ã«ãªã
- 楽ã ãã¬ã¼ã«ãæ確ã¨ããã¡ãªããããã
- vuexã«ç ´å£çãªå¤æ´ãèµ·ãã£ãæãPDSã®Domainå´ãç ´å£çãªå¤æ´ã«å·»ãè¾¼ã¾ããã¨ãããã¡ãªããããã
ãããã¯ãã¬ã¼ã ã¯ã¼ã¯ã®ã¢ãããã¼ãã§ã¢ããªå ¨é¨ã«æãå ¥ããã®å«ãªã®ã§ãããã¯ã·ã§ã³ã§ã¯vuex使ã£ã¦ãªãã
èªåã§Domainå´ã®è¨è¨ããããã¨ãä»ããããã©ããã£ã¦ãã
- ç¶æ ã¯å ¨é¨PDSã®Domainå´ã«æã¤
- VMããå©ããããçªå£ãã¯ä¸æ¬åãã¦ãããããã§éåæéä¿¡ã®å¾ ã¡åãããªã©ããããããããusecaseãã ã¨ããserviceãã¨å¼ã°ãããã¤ã
- usecaseãserviceããã¼ã¿ã¢ãã«ããã¡ã¤ã³ã¢ãã«ãã¤ã³ãã©ã¹ãã©ã¯ãã£ãæä½ãã
- ãã¼ã¿ã¢ãã«ããã¡ã¤ã³ã¢ãã«ã«èµ·ãã£ãå¤æ´ã¯Observableãªæ©æ§ãå©ç¨ãã¦Presentationå´ã«éç¥ãã
ãã®ã¸ãã®è©±ã¯YAPC::Kansaiã§è©±ãããã ãã©æªã ã«çºè¡¨åç¾ããã°æ¸ãã¦ãªããææ¥æ¸ãããæ¸ãã