ãã¡ã€ã³é§åèšèš(DDD)
Domain-Driven Design. Eric Evans æ°ã®å±ããèšèšææ³.
ref. ãã¡ã€ã³é§åèšèš - Wikipedia
ç¹åŸŽ
- è€éãªãã¡ã€ã³ã®èšèšã¯ã¢ãã«ããŒã¹ã§è¡ãã¹ã
- ã·ã¹ãã ãå®è£ ããããã®ç¹å®ã®æè¡ã§ã¯ãªããã¡ã€ã³ãã®ãã®ãšãã¡ã€ã³ã®ããžãã¯ã«çŠç¹ã眮ãã¹ã
åºæ¬åå (åæžããã)
- ã³ã¢ãã¡ã€ã³ã«éäžããããš
- ãã¡ã€ã³ã®å®è·µè ãšãœãããŠã§ã¢ã®å®è·µè ã«ããåµé çãªå ±åäœæ¥ãéããŠã¢ãã«ãæ¢æ±ããããš
- æ瀺çã«å¢çã¥ããããã³ã³ããã¹ãã®å éšã§, ãŠããã¿ã¹èšèªãèªãããš.
åºæ¬çšèª
ãã¡ã€ã³
- ç¥è, 圱é¿, 掻åã®é å.
- ã¢ããªã±ãŒã·ã§ã³ã察象ãšããæ¥åé å.
ãŠããã¿ã¹èšèª (p24)
ãã¡ã€ã³ãšãã¹ããŒããšéçºè ã®éã§äœ¿ãå ±éèšèª.
- ã¢ãã«ãèšèªã®éªšæ ŒãšããŠäœ¿çšãã.
- ããŒã å ã®ãã¹ãŠã®ã³ãã¥ãã±ãŒã·ã§ã³ãšã³ãŒãã«ãããŠ, å³æ Œã«ãã®èšèªãçšããããš.
- å³, ããã¥ã¡ã³ã, ã³ãŒã, äŒè©±ã«ãããŠ, åäžã®èšèªãçšããããš.
UML
- UML ã«ãã£ãŠè°è«ã«ç¢ºåºãšããåºç€ãäžãããã.
- ã¯ã©ã¹å³ãšçžäºäœçšå³ãã€ããããã.
- ãªããžã§ã¯ãã®ååãé¢ä¿æ§ãå ±æã§ãã.
- ãªããžã§ã¯ãã®æŠå¿µ, ãªã«ããããªããã¯ã¯ã£ããäŒããããšãã§ããªã.
- ã¯ã©ã¹å³ã®æäœåãã³ãã¥ãã±ãŒã·ã§ã³ã§ãããšãªãã¯äŒãããã. ã¯ã£ããäŒããããã«ã¯, è£è¶³çãªããã¹ããäŒè©±ãå¿ èŠ.
- 説æã®ããã®ã¢ãã«ã¯ãªããžã§ã¯ãã¢ãã«ã§ããå¿ èŠã¯å šããªã, éåžžã¯ããã§ãªãã»ãããã.
ããã¥ã¡ã³ã
- ã¢ãã«ã¯å³ã§ã¯ãªã.å³ã¯ã³ãã¥ãã±ãŒã·ã§ã³ã®æ段ã«éããªã.
- èšèšã«é¢ããæ¬è³ªçãªè©³çŽ°ã¯, ã³ãŒãã«ãããŠãšããããã.
- ãã§ã«ã³ãŒãã§ããŸããã£ãŠããããšã, ããã¥ã¡ã³ãã§ãããããšãã¹ãã§ãªã.
- ããã¥ã¡ã³ãã¯æŽ»åã®åœ¹ã«ãããªããã°ãªãã, ææ°ã®ç¶æ ãä¿ããªããã°ãªããªã.
- ããã¥ã¡ã³ããæå°éã«ãšã©ã, ãã®éç¹ãã³ãŒããšäŒè©±ã®è£è¶³ã«çµãããšã§, ããã¥ã¡ã³ããåžžã«ãããžã§ã¯ãã«çµã³ã€ããç¶æ ã«ããã€.
ã¢ãã«é§åèšèš (P45)
- åæã¢ãã«ãšèšèšãšãšãäºåæ³ãæšãŠå»ã, äž¡æ¹ã®ç®çã«äœ¿ããåäžã®ã¢ãã«ãæ¢ãåºã.
- ã¢ããªã³ã°ãšèšèšã®ããã»ã¹ã¯, å埩ããããã 1 ã€ã®ã«ãŒã.
- èšèšã§å¿ èŠãšããçšèªæ³ãšè²¬åã®åºæ¬çãªå²ãåœãŠãã¢ãã«ããåŒãåºãããš.
- éçºã¯, ã¢ãã«ãšèšèš, ã³ãŒããåäžã®æŽ»åãšããŠæ¹è¯ãã€ã¥ãã, ã€ãã¬ãŒãã£ããªããã»ã¹ãšãªã.
ã¢ãã«é§åèšèšã®æ§æèŠçŽ (p65)
ã¬ã€ã¢åã¢ãŒããã¯ã㣠(p66)
以äžã® 4 ã€ã«å解ããã.
UI å±€
ãŠãŒã¶ãšã®çžäºäœçšã®å¢çãšãªãå±€ (Web å±€, ãã¬ãŒã³ããŒã·ã§ã³å±€)
ã¢ããªã±ãŒã·ã§ã³å±€ (ãµãŒãã¹å±€)
ãã¡ã€ã³ãªããžã§ã¯ããæäœããããšã§, ãœãããŠã§ã¢ãæããã¹ãä»äºãå®çŸããå±€.
èãã·ã³ãã«ã«ããã¡, ä»äºã¯ãã¡ã€ã³å±€ã®ãªããžã§ã¯ãã«ãããã.
ãã¡ã€ã³å±€
ããžãã¹äžã®æŠå¿µãè¡šçŸããå±€.ã¢ãã«å±€
ã€ã³ãã©ã¹ãã©ã¯ãã£å±€
äžã® 3 å±€ãæ¯ããæè¡çãªåºç€ãšãªãå±€. ããŒã¿ããŒã¹, éä¿¡ãªã©.
ãšã³ãã£ã㣠(åç §ãªããžã§ã¯ã) (p87)
å±æ§ã§ã¯ãªã,é£ç¶æ§ãšèå¥æ§ã«ãã£ãŠå®çŸ©ãããã¢ã
- é£ç¶æ§
- ç¶æ ããã€.
- ã©ã€ããµã€ã¯ã«ããã€.
- èå¥æ§
- äžæã§ããããšãä¿èšŒãããèšå·ããããããšã«ãã£ãŠå®çŸã§ãã.
- ID, 座åžçªå·, åºåžçªå·âŠ ã·ã¹ãã ãçæãã.
æ¯ãèããšå±æ§ã, ä»ã®ãªããžã§ã¯ãã«ç§»åã§ããªããæ€èšãã. (å¥ã®ãšã³ãã£ãã£, å€ãªããžã§ã¯ã, ãµãŒãã¹..)
å€ãªããžã§ã¯ã (p95)
äºç©ã®ç¹æ§ãèšè¿°ãããªããžã§ã¯ã. æŠå¿µçãªåäžæ§ã¯ãªã.
- èå¥åãæããªã (äžããŠã¯ãããªã) å±æ§ã«ã®ã¿èå³ããã.
- ãªããžã§ã¯ãã¯äžå€ã§ãªããã°ãªããªã (fatal)
- éäŸèªã¿åºãå°çšã®ãªããžã§ã¯ã.
- Flyweight ãã¿ãŒã³ãçšããŠå ±æã§ãã.
- ãã°ãã°, ãªããžã§ã¯ãéã®ã¡ãã»ãŒãžã§ãã©ã¡ãŒã¿ãšããŠæž¡ããã.
ãµãŒãã¹ (p103)
- æäœããããªã責åããã€.
- ãœãããŠã§ã¢ãå®è¡ãã¹ãããšã«å¯Ÿå¿ã, ç¶æ ã«ã¯å¯Ÿå¿ããªã.
- ãªããžã§ã¯ãèªèº«ã«æäœããããã«, ããããããšã«ãªããžã§ã¯ãã®æäœããããã®ã¯, ãã°ãã°ãããŒãžã£ãŒãšåŒã°ãã.ããã¯æç¶çã .
- ç¶æ ãããããªãããš.
- èŠæ±ã«å¿ããŠã¯ã©ã€ã¢ã³ãã®ããã«è¡ããããªã«ã. ãªã®ã§, åè©ãããåè©ãšããŠå®çŸ©ããã.
- æäœåããŠããã¿ã¹èšèªã®äžéšã«ãªãããš.
ã¢ãžã¥ãŒã« / ããã±ãŒãž (p108)
- ã¢ãã«ã®æå³ããäžéš.
- ã¢ãžã¥ãŒã«å ã¯é«åçž®, ã¢ãžã¥ãŒã«éã¯äœçµå.
- ã¢ãžã¥ãŒã«ã¯æ¬ã§èšãã°ç« .
- ã¢ãžã¥ãŒã«åã¯, ãŠããã¿ã¹èšèªãã€ããããš. ãã¡ã€ã³ã«é¢ããæ·±ãæŽå¯ãåæ ããŠããªããã°ãªããªã.
ãã¡ã€ã³ãªããžã§ã¯ãã®ã©ã€ããµã€ã¯ã« (p122)
éçŽ (Aggregates) (p123)
- é¢é£ãæå°éã«ããŠèšèšãã.
- ã¢ãã«å ã«ããåç §ãã«ãã»ã«åããããã®æœè±¡åãéçŽ.
- é¢é£ãããªããžã§ã¯ãã®éãŸãã§ãã, ããŒã¿ãå€æŽããããã®åäœ. -> éçŽã®ãšãã«å®£èšããåã¯æœè±¡ã¯ã©ã¹ãã€ã³ã¿ãã§ãŒã¹ã«ãªãã®ããª?
- éçŽã«ã¯ã«ãŒããšå¢çããã.
- ã«ãŒã
- éçŽã«å«ãŸããŠããç¹å®ã® 1 ãšã³ãã£ãã£.
- å€éšãªããžã§ã¯ããžã®åç §ããã€.(è»ãã«ãŒã, ã¿ã€ã€ã¯éã)
- ã°ããŒãã«ãªäžè²«æ§ããã¡, äžå®æ¡ä»¶ããã§ãã¯ããæçµè²¬åããã€.(ãªãœãŒã¹ã®éæŸåŠçãšã?)
- å¢ç
- ãšã³ãã£ãã£ãšå€ãªããžã§ã¯ããéçŽã®ãªãã«ãŸãšã, åéçŽã®åšå²ã«å¢çãå®çŸ©ããããš.
- å¢çã®å éšã«ååšãããªããžã§ã¯ããžã®ã¢ã¯ã»ã¹ã¯, ã«ãŒããªããžã§ã¯ããçµç±ããŠå¶åŸ¡ããããš.
- ã«ãŒã
ãã¡ã¯ããªãŒ (p134)
- ãªããžã§ã¯ããéçŽå šäœãçæããã®ãè€éã ã£ãã, å éšæ§é ããããåºãéããŠããå Žåã¯, å¥ã®ãªããžã§ã¯ãã«ç§»è²ããããš.
- ãã¡ã¯ããªãŒã§ã«ãã»ã«åãã.
- å®è£ ãç°¡åã«åãæ¿ããããããã«ã§ãã.
- èŠæ±ãããåã«ãã£ãŠæœè±¡åãã.
- ãã¶ã€ã³ãã¿ãŒã³ã§ããã€ããŸãšãŸã£ãŠãã
- ãã¡ã¯ããªãŒã¡ãœãã
- ãã«ããŒ
- ã¢ãã¹ãã©ã¯ãã»ãã¡ã¯ããªãŒ
- ãã¡ã¯ããªã®çœ®ãå Žæã¯,
- éçŽã®ã«ãŒããªããžã§ã¯ãã«ã¡ãœãããçšæãã.
- ä»ã®ãªããžã§ã¯ãã®çæã«å¯æ¥ã«é¢ãããªããžã§ã¯ã.
ãªããžã㪠(p146)
-
ãªããžã§ã¯ãã䜿çšããããã®æ¹æ³ã¯
- çæãã
- é¢é£ãå·¡ã
- ã¯ãšãªãå®è¡ããŠ,
- å±æ§ã«åºã¥ããŠããŒã¿ããŒã¹å ã§ãªããžã§ã¯ããèŠã€ãã
- ãªããžã§ã¯ãã®æ§æèŠçŽ ãèŠã€ããŠ, ãããåæ§ç¯ãã
-
ãã®ç¬¬ 3 ã®æ¹æ³ããããªããžããª.
-
ããŒã¿ããŒã¹æ€çŽ¢ã¯, ã°ããŒãã«ã«ã¢ã¯ã»ã¹ããããšãã§ããŠ, ã©ããªãªããžã§ã¯ãã«ãçŽæ¥å°éã§ãã. ãªããžã§ã¯ãã®ãããã¯ãŒã¯ã¯ç®¡çãããããªã.
-
éçºè ã¯éåžž, ããããèšèšã®æ©åŸ®ã«ã€ããŠããŸãèããªã.
-
æ ŒçŽãããããŒã¿ããã€ã³ã¹ã¿ã³ã¹ãçæããããšã¯, ãšã³ãã£ãã£ã®ã©ã€ããµã€ã¯ã«ã®äžéš. ãªã®ã§ãããåæ§ç¯ãšåŒãã§, çæãšåºå¥ãã.
é¢é£ã§ã»ãšãã©ã®å Žåã¯åå!
- äžæçãªãªããžã§ã¯ã (å€ãªããžã§ã¯ã) ã¯å¿ èŠãªã. ã©ã€ããµã€ã¯ã«ãçã, ãããå©çšããã¯ã©ã€ã¢ã³ãã§çæãšç Žæ£ãããã.
- æ°žç¶åããããªããžã§ã¯ãã®ãã¡ã§, é¢é£ãå·¡ã£ãŠã¿ã€ããã»ãã䟿å©ãªãã®ã«å¯ŸããŠã, ã¯ãªãšã«ããã¢ã¯ã»ã¹ã¯å¿ èŠãªã. ãªã«ããã, éçŽå éšã«ããã©ã®ãªããžã§ã¯ãã, ã«ãŒããã蟿ã以å€ã®æ¹æ³ã§ã¢ã¯ã»ã¹ããããšã¯çŠæ¢ã .
- æ°žç¶åãããå€ãªããžã§ã¯ããèŠã€ããã«ã¯, ãããã«ãã»ã«åããéçŽã®ã«ãŒããšããŠæ©èœãããšã³ãã£ãã£ããé¢é£ãå·¡ãã®ãæ®éã®ã¢ãããŒã.
ã©ã®ãããªãšãã«æ€çŽ¢ãå¿ èŠ?
- ãªããžã§ã¯ãã®å±æ§ã«åºã¥ããæ€çŽ¢ãéããŠ, ã°ããŒãã«ã«ã¢ã¯ã»ã¹ã§ããªããã°ãªããªããã®ããã. ããããã¢ã¯ã»ã¹ãå¿ èŠãšããã®ã¯, éçŽã®ã«ãŒãã®ãã¡é¢é£ãå·¡ã£ãŠå°éããããšããéœåã®æªããã®.
- ããŒã¿ããŒã¹ãžã®ã¢ã¯ã»ã¹æ¹æ³ã¯ããã€ããã
- SQL ãã¯ãšãªãªããžã§ã¯ãã«ã«ãã»ã«åãã
- ã¡ã¿ããŒã¿ãããã³ã°å±€ã§ãªããžã§ã¯ããšããŒãã«éã®å€æããããªãããš.ã¡ã¿ããŒã¿ãããã³ã° - Strategic Choice
ãªããžããªã®äœãæ¹
- ãªããžããªã¯, ç¹å®ã®åã®ãªããžã§ã¯ãããã¹ãŠæŠå¿µäžã®éåãšããŠè¡šçŸãã. ãã®å®çŸ©ã®éåãéããŠ, éçŽã®ã«ãŒãã«å¯Ÿããã¢ã¯ã»ã¹ãæäŸããã.
- ã¯ã©ã¢ã€ã³ãããªããžããªã«å¯ŸããŠãªããžã§ã¯ããèŠæ±ããéã¯, ã¯ãªãšã¡ãœããã䜿çšãã.
- ã°ããŒãã«ã¢ã¯ã»ã¹ãå¿ èŠãšãããªããžã§ã¯ãã®ååã«å¯ŸããŠ, ãããªããžã§ã¯ããçæã, ãã®åã®ãã¹ãŠã®ãªããžã§ã¯ãã§æ§æãããã³ã¬ã¯ã·ã§ã³ã, ã¡ã¢ãªäžã«ãããšé¯èŠãããããã«ã§ããããã«ããããš.
- å®éã«çŽæ¥çãªã¢ã¯ã»ã¹ãå¿ èŠãšããéçŽã«ãŒãã«å¯ŸããŠã®ã¿, ãªããžããªãæäŸããããš.
Bookmarks
Amazon
ãšãã»ã€:
ããããããŒããã¯, äœã®ããã®ãœãããŠã§ã¢äœãã®? ã決ããŠ, ã³ã³ãã€ã«ãéãããšãç®çã§ã¯ãªããŠ, ãããã¡ã€ã³ã IT ã«ãã£ãŠå®çŸããããã§ããã.
ãªãŒãžã¹ç·ç ãã¿ãŒã³ã®åé¡:
-
Domain-Driven Design ã®ãšãã»ã³ã¹ 第 1 å|ãªããžã§ã¯ãã®åºå Ž
-
Domain-Driven Design ã®ãšãã»ã³ã¹ 第 2 å|ãªããžã§ã¯ãã®åºå Ž
-
Domain-Driven Design ã®ãšãã»ã³ã¹ 第 3 å|ãªããžã§ã¯ãã®åºå Ž
ã³ãŒã (Java) ããã®ã¢ãããŒã.
解説 PDF