ãããã¯ãæè¡æ¬é¨ã®å·å£ã§ãã
3å¹´éãããã°ãã¼ãå ã¨ãã£ãåºå®åç·ã®ã¤ã³ãã©é¨éã«æå±ãã¦ãã¾ããããä»å¹´ã®4æã« BIGLOBE ã®åºå¹¹ã·ã¹ãã ã®ãªãã¥ã¼ã¢ã«ãæ¨é²ãã¦ããé¨ç½²ã«ç°åãããã¨ã«ãªãã¾ããã
æå±ãããã¼ã ã§ã¯ããã¡ã¤ã³é§åè¨è¨ï¼DDDï¼ã§éçºãã¦ãã¾ãã
ãã¼ã ã«ã¸ã§ã¤ã³ããã¨éçºãã¥ã¼ããªã¢ã«ããããã¨ã«ãªã£ã¦ããããã㧠IntelliJ ã Spring Boot ã§ã®éçºã®ä»æ¹ãå¦ãã ãããã¥ã¼ããªã¢ã«ãéã㦠DDD ãå¦ãã ããã¾ãã
ä»åã¯ãDDD ã®ãã¥ã¼ããªã¢ã«ã§å®éã«ä½æãããã¡ã¤ã³ã¢ãã«ãã©ããã風ã«æé·ãã¦ãã£ããã«ã¤ãã¦ç´¹ä»ãã¾ãã
- å¤æ 管çã¢ã㪠ãã¥ã¼ããªã¢ã«
- åæãã¡ã¤ã³ã¢ãã«
- ä¸æãã¡ã¤ã³ã¢ãã«
- å¾æãã¡ã¤ã³ã¢ãã«
- å¦ãã ãã¨ãææ³
å¤æ 管çã¢ã㪠ãã¥ã¼ããªã¢ã«
ãé¡ã¯ GitHub ã®ãããªãã¯ãªãã¸ããªã«å ¬éããã¦ãã¾ãã https://github.com/biglobe-isp/kintai
ãã¥ã¼ããªã¢ã«ã®å 容ãç°¡åã«èª¬æããã¨æ¢åã®ã³ã¼ãã¨ä»æ§ã«æ²¿ã£ã¦ãªãã¡ã¯ã¿ãªã³ã°ãã¦ããã¨ãã£ããã®ã§ãã
ãã®ãã¥ã¼ããªã¢ã«ã§ã¯ä»¥ä¸ã®ãããªæµã㧠DDD ãå¦ãã§ããã¾ãã
- ãã¥ã¼ããªã¢ã«ã®èª²é¡ãããèªã
- ãã¡ã¤ã³ã¢ãã«ãä½æãã
- ãã¡ã¤ã³ã¢ãã«ã®ã¬ãã¥ã¼ãåãã
- 2 㨠3 ãç¹°ãè¿ãããç¨åº¦ãã©ãã¤ãããã³ã¼ããæ¸ã
- ã³ã¼ãã®ã¬ãã¥ã¼ãåãã
- 2, 3, 4, 5 ãç¹°ãè¿ã
ä»å㯠2, 3, 4 ã®å·¥ç¨ ãã¡ã¤ã³ã«ç´¹ä»ãã¾ãã ãã¡ã¤ã³ã¢ãã«ã¯ PlantUML ã使ã£ã¦ä½æãã¾ãã
â»ä»åã¯è§¦ãã¦ã¾ãããJavaã§ã³ã¼ãã£ã³ã°ãã¦ãã¾ãã
åæãã¡ã¤ã³ã¢ãã«
ã¾ãæåã«ãã¡ã¤ã³ã¢ãã«ãä½ã£ã¦ã¿ããã¨ãããã¦ã¿ããã®ã®ãã¯ã©ã¹å³ã®ä½ãæ¹ã¨ãããããã£ã¦ãããã¤ã³ã¿ã¼ãããã§èª¿ã¹ãªããä½æããæåã«ã¬ãã¥ã¼ãåããã¢ãã«ã¯ãããªãã¾ããã
å³1
((ã½(´Ð`ï¼)ï¾)) ï¾ï½¶ï¾ï¾ â¦
ãã¼ã¿ã¢ãã«ã«ããªã£ã¦ãªããããªæãã§ãã
ãã¼ã ã¡ã³ãã¼ã¨ã¢ããããããªããã¯ã©ã¹å³ã®æ¸ãæ¹ã®ã¢ããã¤ã¹ããããã¤ã¤ããã®ã¨ãåããã¬ãã¥ã¼ã§ã¯
- ãã¡ã¤ã³ãç¨ãã¦ã¦ã¼ã¶ãå¿ è¦ã¨ããå½¢ã«å å·¥ãããµã¼ãã¹ã¯ã©ã¹ãå¿ è¦
- ã©ã®ã¯ã©ã¹ã§ä¼æ©æéãæããå®éã®å´åæéã¨æ®æ¥æéãç®åºãããã¢ãã«ã«è¨è¿°ãã
- å¤åæ å ±ã®ç»é²ã§ä½¿ãã¯ã©ã¹ãæéç´¯è¨æéã®åç §ã§ä½¿ãã¯ã©ã¹ã§ããã±ã¼ã¸ãåã
ã¨ãã£ãã³ã¡ã³ããããã ãã¾ããã
ãã¥ã¼ããªã¢ã«ã§ã¯ãã¡ã¤ã³ã¨ãã¹ãã¼ãã«ããããããªäººç©ã¯åå¨ããªããããã¦ããã¿ã¹è¨èªã®ããã«éçºè
ã¨ãã¡ã¤ã³ã¨ãã¹ãã¼ãã使ãå
±éã®ãã¡ã¤ã³ç¨èªãæ確ã«ãªã£ã¦ãã¾ããã
åé¡æãå度èªã¿ãªããèå¯ããã¨ãæéã«ã¯xæéã¨ãã£ãå¹
ã¨xæxåã¨ãã£ãæç¹ã表ã表ç¾ãä¼æ©æéãå«ãã / å«ããªãå´åæéããããã¨ã«æ°ã¥ãã¾ããã
å¼ç¤¾ã§ä½¿ã£ã¦ããå¤æ 管çã·ã¹ãã ãè¦ãã°ãããé©åãªãã¡ã¤ã³ç¨èªãè¦ã¤ããããã¨æãåèã«ãã¦ã¿ã¾ããã
å¤æ 管çã·ã¹ãã ã¨èå¯ããçµæã¯ãããªãã¾ãã
- æéã¯å¹ ãæå»ã¯æç¹ã¨å®ç¾©ãã
- ä¼æ©æéãå«ããªãå®éã®å´åæé =ãå®åæéãã¨å½åãã
- å®åæéã¨æ®æ¥æéãç®åºããã«ã¯å¤åéå§ã»çµäºæéã¨ä¼æ©æéãå¿ è¦ãã
- å§æ¥æéã¨çµæ¥æéãä¼æ©æéã¯ãå°±æ¥è¦åãã¨è¨ã£ã¦ããããããªã®ã§ä¸ã¤ã«ã¾ã¨ããã¯ã©ã¹ãä½æãã
ãã®ãããå¼ç¤¾ã§ä½¿ã£ã¦ããå¤æ 管çã·ã¹ãã ã®ç¨èªãåèã«ã¯ã©ã¹åãã¤ãã¾ããã
ä¸è¨ã®ã³ã¡ã³ãã¨èå¯ãè¸ã¾ããä¿®æ£ããã¢ãã«å³ã¯ä»¥ä¸ã¨ãªãã¾ããã
å³2
å³1ã¨æ¯ã¹ãã¨ãã¡ã¤ã³ã®ç解ãé²ãã§ãæãããã¦ãã¾ãã
å³1ã®ã¢ãã«ã«ã¯ç»å ´ããªãã£ããå®åæéãããæ®æ¥æéãããå°±æ¥è¦åãã¨ãã£ãã¯ã©ã¹ãç»å ´ãã¦ãã¾ã
å³1ã®ã¢ãã«ã§ã¯ããããããç¢å°ãã¤ãã¦ãã¾ããããåç §ããã¯ã©ã¹ã«ç¢å°ãã¤ãã¾ããã
ãã®ã¢ãã«å³ã§ã¬ãã¥ã¼ãåããã¨ãã®ã³ã¡ã³ãã¯
- CSVã«ä¿åããã6é ç®ãä¿æããã¯ã©ã¹ãã¤ãã
- 6é ç®ãä¿æããã¯ã©ã¹ãæ°¸ç¶åããããã®ãªãã¸ããªãå®ç¾©ãã¦ããµã¼ãã¹å±¤ããå¼ã³åºãç·ãå¼ãã¦ã¿ã
ã§ãã
ãã®ãã¥ã¼ããªã¢ã«ã§ã¯æ¥ä»ãå¤åéå§æéãå¤åçµäºæéãå®åæéãæ®æ¥æéãå¤æ ç»é²ãããæå»ãCSVã«ä¿åããå¿
è¦ãããã¾ãã
ãµã¼ãã¹ã¯ã©ã¹ããå¼ã³åºãã¦ãã¼ã¿ãæ°¸ç¶åããããã®ãªãã¸ããªãå¿
è¦ã§ãã
以ä¸ã®è¦³ç¹ã«å ããå度ã¢ãã«å³ãè¦ç´ããéã«ä»¥ä¸ã®ããã«èå¯ãã¾ããã
- å¤åæéã®ç»é²ã¨æéã§éè¨ããå¤åæéã®åç §ããã®2ã¤ã®ã¦ã¼ã¹ã±ã¼ã¹ãå®ç¾ãããµã¼ãã¹ã¯ã©ã¹ãå¿ è¦ãã
- å¤åç»é²ããéã«å¿ è¦ãªæ¥ä»ã¨å§æ¥æéã»çµäºæéãä¿æããã¯ã©ã¹ãå¿ è¦ãã
- å¤åæ å ±ã¯ã©ã¹ãæ°¸ç¶åãããã¯ã©ã¹ã®ããã«è¦ããããæ°¸ç¶åãããæ å ±ã足ãã¦ãããããµã¼ãã¹å±¤ã§ãã¡ã¤ã³ãæ±ãã«ã¯ä¸ä¾¿ãªç¶æ ã«ãªã£ã¦ãã
- æ®æ¥æéãç®åºããããã«ãå®åæéã¨å°±æ¥è¦åã®å§æ¥ã»çµæ¥æéããç®åºãããè¦å®å¤åæéãå¿ è¦ãã
ä¸è¨ã®ã³ã¡ã³ãã¨èå¯ãè¸ã¾ãã¦ãå度ã¢ãã«ãä¿®æ£ãã¾ããã
ä¸æãã¡ã¤ã³ã¢ãã«
å³3
å¤æ´ç¹ã¨ãã¦ã¯ãæ°ãã«å¤åæ
å ±ç»é²ãµã¼ãã¹ã¨å¤åæ
å ±ãªãã¸ããªã追å ãã¾ããã
å®åæéã®ç®åºã®ããã«å°±æ¥è¦åããã±ã¼ã¸ãä½æããè¦å®å¤åæéã¯ã©ã¹ãä½æãã¾ããã
ãã®å³ãè¦ã¦ãããã£ãã¨æã£ã人ãããããããã¾ããã
ãªãã¸ããªã®ã¤ã³ã¿ã¼ãã§ã¼ã¹ã¯ãã¡ã¤ã³å±¤ã«ç½®ã人ãå¤ãããããã¾ãããããã¼ã ã§ã¯ãµã¼ãã¹å±¤ã«ç½®ãããã«ãã¦ãã¾ãã
çç±ã¨ãã¦ã¯ããªãã¸ããªã¯ãã¼ã¿ã®æ°¸ç¶åã責åã§ããã¢ããªã±ã¼ã·ã§ã³ã®æ©è½ã¨èªèãã¾ããããã®ãããã¸ãã¹ã«ã¼ã«ã表ç¾ãããã¡ã¤ã³å±¤ã§ã¯ãªããã¢ããªã±ã¼ã·ã§ã³ã®è¦æ±ã表ç¾ãããµã¼ãã¹å±¤ã®æ¹ãé©ãã¦ããã¨èããããã§ãã
ãã®ã¢ãã«å³ã®ã¬ãã¥ã¼ã§ã¯ä»¥ä¸ã®å 容ã®ã³ã¡ã³ããããã ãã¾ããã
- å°±æ¥è¦åãå¤æ´ããããã«å°±æ¥è¦åããã±ã¼ã¸ã¨å¤æ´ç¨ã®ãªãã¸ããªãç¨æãã¦ããããå¤åæ å ±ç»é²ãµã¼ãã¹ããªãã¸ããªããå°±æ¥è¦åãåãåããããã«ãã
- æéã¨æå»ã®è¡¨ç¾ã®çµ±ä¸
- å°±æ¥è¦å -> ä¼æ©æå»ã®ç·ã¯ 1 対 1..n
ããã¾ã§ããã¨ã¯ã©ã¹åãå¤é度ã«ãçç®ãããããé¡ã«ã¯æ¸ããã¦ããªãã§ããä»å¾ã®ä»æ§å¤æ´ããã¸ãã¹ã®è¦æ±ã®ããã«æ¡å¼µæ§ãæããã¦å¤æ´ã容æã«è¡ããããã«ã¢ãã«ãèããå¿ è¦ãåºã¦ãã¾ããã
ãã®ã¢ãã«ãä½ãçµããæç¹ã§ã³ã¼ããæ¸ãå§ãã¾ããã
ã³ã¼ããæ¸ãã¦ããã¨ãã¢ãã«ã§ã¯ç¾ç¶ãããã¦ããã©å®è£
ãã¦ã¿ãã¨ãã£ã¡ã®ã»ãããããªã¨ããå ´åãããã¾ããã
æéç´¯è¨æéãç®åºããéã«ä¸æã®ã¢ãã«å³ã®å
容ã§æ¸ãã¦ããã¨ãããææ¯ã®å¤åå®ç¸¾ã®éåã§ããæéå¤åå®ç¸¾ããã£ãã»ããå®è£
ãããããã¨æãããã¨ã¨ãç´¯è¨å®åæéã¨ç´¯è¨æ®æ¥æéãå¥ã
ã®ã¯ã©ã¹ã«ããã¡ãªãããä½ãæããªãã£ããããå¤æ´ãã¾ããã
å¾æãã¡ã¤ã³ã¢ãã«
æçµçã«ä»¥ä¸ã®ãããªã¢ãã«ã«ãªãã¾ããã
å³4
主ãªå¤æ´ã¨ãã¦ã¯ãå°±æ¥è¦åãå¾ã§å¤æ´ã«ãªãå ´åãèæ
®ãã¦å°±æ¥è¦åããã±ã¼ã¸ã¨å°±æ¥è¦åãªãã¸ããªã追å ãããã¨ã
æéå¤åå®ç¸¾ã¯ã©ã¹ã¨ãããåç
§ã§ããæéå¤åå®ç¸¾ãªãã¸ããªãç´¯è¨å®åæéãç´¯è¨æ®æ¥æéãæã¤æéç´¯è¨å¤åæéã¯ã©ã¹ã追å ãã¾ããã
ä»æ§ãå¤ããå¯è½æ§ãè¸ã¾ãã¦ãæçµçã«4ã¤ã®ããã±ã¼ã¸ã«åé¡ãã¾ãã
- å¤åæ å ±
- å°±æ¥è¦å
- æéç´¯è¨å¤åæé
- å¤åæå»å ¥å
å°±æ¥è¦åã¯ä¼ç¤¾ã®å¤åã«ã¼ã«ãå¤ããå ´åãæéç´¯è¨å¤åæéã¯åç
§ãããæ
å ±ãå¤ããå ´åãå¤åæ
å ±ã¯ä»æ§ãå¤ããå¯è½æ§ã¯ä½ãã¨æãã¾ããããã¢ãã«ã®ä¸å¿ã¨ãªããã¡ã¤ã³ã¨ãã¦åé¡ãã¾ããã
ä¸æã¢ãã«ã§ã¯å¤åæå»å
¥åã¯å¤æ æ
å ±ããã±ã¼ã¸ã«å
¥ã£ã¦ã¾ããããå¤åæå»å
¥åã®å
容ã¯å å·¥ããã¦å¤æ æ
å ±ã¨ãã¦ç»é²ããããã¨ãä»åã®è¦ä»¶ã«ã¯ããã¾ãããæ給ä¼æã®æ
å ±ãå
¥åã§ããããã«å¤æ´ããå ´åï¼ãããªãã¨ããã±ã¼ã¸åã®å¤æ´ã®æ¤è¨ãå¿
è¦ããã§ããï¼ãèãã¦ãããã±ã¼ã¸ãåãã¾ããã
æå¾ã« å°é家ã®æ¹ã«èª¬æããªããè¦ã¦ãããã¾ããã
- å¤æ ã®æ ã¨ããæå³åãã«ããããããªæ¦å¿µã¯ä»åã®ã¢ãã«ã ã¨åºã¦ããªã
- æ¬ å¤ã¨ãé å»ã¨ãã®æ¦å¿µãåºã¦ããã®ã§ããã°ãéåæã¯ãªã
- Input / å
¥åã¨ããè¨èã¯ãã¡ã¤ã³ã®è¨èã¨ãã¦ã¯ããã¾ããæªã
- ã·ã¹ãã ã¨ãã¦ã¯å ¥åãã¦ããããªåä½ãããããªããããã¡ã¤ã³ã¯ãã¸ãã¹ã®ã«ã¼ã«ã表ç¾ããã®ã§å ¥åã¨ããè¨èã¯æã¡è¾¼ã¿ãããªã
ã¨ãã£ãã³ã¡ã³ããããã ãã¾ããã
é©å½ãªã¯ã©ã¹åã1ã¤èããã ãã§ãé£ãããªã¨æãã¾ããã
å¦ãã ãã¨ãææ³
- ã¢ããªã³ã°ãç¹ã«ã¯ã©ã¹åã«é©å½ãªååãä»ãããã¨ãé£ããã£ã
- ã©ã®ããã±ã¼ã¸ãã¯ã©ã¹ã§ãã¸ãã¹ãã¸ãã¯ã表ç¾ããã®ããé£ããã£ã
- ãã¡ã¤ã³ã¢ãã«ã®æãæ¹ãã©ããããã®åä½ã§ã¯ã©ã¹ã»ããã±ã¼ã¸ãåå²ããã°ãããããã¨ãã£ãã¤ã¡ã¼ã¸ãã§ããããã«ãªã£ã
- ãã¡ã¤ã³ã¢ãã«ãã¤ãã¬ã¼ãã£ãã«æ¹è¯ãããã¨ãéè¦ã¨å®æã§ãã
æ¸ç±ã ã㧠DDD ãå¦ã¼ãã¨ããã¨ãæ½è±¡çãªå
容ãå¤ãã£ãããå®æã湧ããªãã£ãããã¦ç解ããã®ãé£ããã§ããããé¡ãéã㦠DDD ãå®è·µãããã¨ã§ç解ãé²ã¿ãã¢ããªã³ã°ãã³ã¼ãã£ã³ã°ã®ã¹ãã«ã磨ããã¨ãã§ãã¾ããã
ããã¾ã§ä»åã¯ãã¥ã¼ããªã¢ã«ã§ãå®éã®æ¥åã§ã¯ããã«è¤éãªãã¸ãã¹ãã¸ãã¯ãåå¨ãã¾ããè¤éãªãã¸ãã¹ã«å¯¾ãã¦ãã¡ã¤ã³ã¨ãã¹ãã¼ãã¨ã¡ã³ãã¼ã§è°è«ããªãããã¦ããã¿ã¹è¨èªãããå¢çä»ããããã³ã³ããã¹ãããè¦ã¤ãåºãã¦ãããã¨ã DDD ã®ééå³ã§ã¯ãªããã¨æãã¾ãã
ãããã£ãçµé¨ãä»å¾å¢ããã¦ããã¸ãã¹ã®å¤åã«å¼·ãã¦æè»æ§ãããè¨è¨ãã§ããããã«ãªãããã§ãã
â» IntelliJ ã¯ãJetBrains s.r.o.ã®åæ¨ã¾ãã¯ç»é²åæ¨ã§ãã
â» GitHub ã¯ãGitHub Inc.ã®åæ¨ã¾ãã¯ç»é²åæ¨ã§ãã
â» Javaã¯ãOracleããã®åä¼ç¤¾åã³é¢é£ä¼ç¤¾ã®ç±³å½åã³ãã®ä»ã®å½ã«ãããç»é²åæ¨ã§ãã