DDD
Value Objectãçãä¸ãã£ã¦ãããããã Value Objectã«ã¤ãã¦æ´çããã - Software Transactional Memo Value Objectã®èª¬æã«ç°è«ããªããã®ã®ã主é¡ã¯Value Object Obsessionã®ã»ãã§ãããã ãã¡ããèãã¦ã¿ãã fukabori.fm ããæ©ä¼ãªã®ã§ããããâ¦
ã©ããããã¨ãã ãã§ãã æ¾å²¡ãã(id:little_hands)ã以ä¸ã®è¨äºãæ´æ°ãããããã§ããæ¾å²¡ããèªèº«ãæ©ã¾ããä¸ã§æ¤è¨ãããªãã·ã§ã³ã§ãã£ã¦ãå¯ä¸ã®æ£è§£ã§ã¯ãªãã¨è¸ã¾ããããã§ãçç´ãªææ³ãè¿°ã¹ããã¨æãã¾ããçµè«ããããã¨ãè«æ¨ã¯ååã®è¨äºâ¦
ä¹ ãã¶ãã«ããã°è¨äºãæ¸ãã¾ããã ã¨ãããã¨ã§ãæ¾å²¡ãã(id:little_hands)ã®ããã°è¨äºã«å¯¾ããèå¯è¨äºã§ãã ãã®è¨äºã¯å¤ããªã£ãã®ã§ããã²ä»¥ä¸ãåç §ãã¦ãã ããã blog.j5ik2o.me little-hands.hatenablog.com é¡æãæ¾å²¡ããã®ããã°è¨äºã¨åãâ¦
ãã®ããã°ã話é¡ã«ãªã£ã¦ã¾ãããå¶ç´ãä»ãããã¨èªä½ã¯ãããã¨ã ãã©ãç¡ç®çã«é©ç¨ããã¨å®³ãçããã¨æãã¾ãã ç¡ç®çã¨ããè¨ãæ¹ã¯ãããããªâ¦ãå¤é¨ãã¼å¶ç´ãã©ã®ããã«ä½¿ãã°ããã®ããéã«ã©ããªã¨ãã«ä½¿ãã¨ã¾ããã®ããèãã¦ã¿ããã¨æãã¾â¦
CQRS+ESãã¿ã¼ã³ã®èª¬æ ã³ãã³ã ã¯ã¨ãªè²¬ååé¢ (CQRS) ãã¿ã¼ã³ ã¹ãã¼ãã½ã¼ã·ã³ã°(CRUD)ã®çæã¨ãã¦ããã¦ãããã® èªã¿åãã¨æ¸ãè¾¼ã¿ã®ãã¼ã¿è¡¨ç¾ä¸ä¸è´åé¡ ã¹ãã¼ãã®åææ´æ°ã«ãã競ååé¡ èªã¿åãã¨æ¸ãè¾¼ã¿ãåãã¢ãã«ã«ããããã¼ã¿ã®èª¤ç¨åâ¦
DDDã®ãªãã¸ããªãå®è£ ããã®ããã«ãã®ã§ãã©ã¤ãã©ãªåããã¨ãããåããæ¸ãã¦ãããã©ãRedis, Memcachedãªã©ã®å®è£ ã追å ããã®ã§ãç°¡åã«èª¬æãæ¸ãã¦ã¿ãã ããã¸ã§ã¯ããªã©ã§èªåã§å®è£ ããéããåç §å®è£ ã¨ãã¦åèã«ãªãã¨æãã¾ããScalaã®ä¾ã â¦
社å ã§ãµã¼ãã¹ãããããããªãã¨ãã話ã«ãªã£ãã®ã§ãèå¯ãå°ãã¾ã¨ãã¦ããã¾ãã éå»ã®ã¨ã³ããªã§ã以ä¸ã®ããã«è§¦ãã¾ããããããå°ããã¿ç ãã¦ã¿ããã ãµã¼ãã¹ã¨ããè¨èã¯ããã¾ã ã¾ããç°¡åã«åæã®æ´çãããåã«"ãµã¼ãã¹"ã£ã¦è¨èãä½ãæâ¦
è¶ ä¹ ãã¶ãã®ããã°â¦ã Octopressã«ç²ããã®ã§ã¯ã¦ãªããã°ã«æ»ã£ã¦ãã¾ãã(Octopressã®éå»ã®è¨äºã¯ã¯ã¦ãªããã°ã«ã¤ã³ãã¼ãæ¸ã§ã)ãã¤ãã§ããã«ç§»è¡ã ãã¦ãæµ·å¤ã®DDDã³ãã¥ããã£ã§ã¯CQRS+Event Sourcing(以ä¸, ES)ã人æ°ãªã®ã§ãããããããæ¥æ¬ã§â¦
scala-dddbase scala-dddbaseã§ã¯ã©ã®ãããªã¤ã³ã¿ã¼ãã§ã¤ã¹ã¨ãã¦ãããï¼ ä»¥ä¸ã®ããã«ãªã£ã¦ãã¾ãã æ»ãå¤ã¯ã¢ããã«ã©ãããã¦è¿ããã¨ãæ³å®ãã¦ããã®ã§ãé«éåã¨ãã¦Måãæå®ã§ããããã«ãã¾ãããä¸è¬çã«Mã«ã¯ãåæåãªãã¸ããªã¨ãã¦ã¯Tryâ¦
é¢ç½ãããªãã¿ããã£ãã®ã§ãèªåãªãã®èããã¾ã¨ãã¦ã¿ãã Ruby/Rails ç¨ DI ã³ã³ãã Dee ãã¤ãã£ããããã㯠Ruby ã®ã«ã«ãã£ã¼ã«ã¤ã㦠ãã®è¨äºã¯Rubyç¨ã®DIã³ã³ããã®è©±é¡ãªãã§ãããDCIã«ã¤ãã¦ãè¨åããã¦ããããã§ããæ¯è¼è»¸ã¯DIãã®ãã®ã¨â¦
ã¿ãªãããããã°ããã ä¼ç¤¾ã®ã¢ããã³ãã«ã¬ã³ãã¼ã§ãScalaã³ã¼ãã§ããã£ãæ°ã«ãªãDDDã¨ããããã°ãæ¸ããã®ã§ãããæè¿ãè害ãé²ãããã«DCIã«ã¤ãã¦ãåå¼·ä¸ã§ãã DCIã¢ã¼ããã¯ã㣠- Trygve Reenskaug and James O. Coplien ã¨ããããããããâ¦
(Scalaåæã®è¨äºãªã®ã§æ³¨æãã¦ãã ãã) ãã¨ãã°ãããªã¢ãã«ããã£ã¦ãç¸äºã«ä¾åãã¦ããã±ã¼ã¹ãèãããã 注æ:説æãç°¡åã«ããããã«ãvarãå©ç¨ãã¦ãã¾ãã å¾æ¥å¡ class Employee( val id: Long, val name: String, var department: Option[Depâ¦
ãã¨ãªãã¯ã»ã¨ã´ã¡ã³ã¹ã®ãã¡ã¤ã³é§åè¨è¨ã ãç®æ¬ãã¦ããã ãã¾ãã
å¬ãããã¨ã«ãã¨ãªãã¯ã»ã¨ã´ã¡ã³ã¹ã®ãã¡ã¤ã³é§åè¨è¨ã ãç®æ¬ãã¦ããã ãã¾ããï¼ è¨³è ã®åæºãããé¢ä¿è ã®æ¹ã ãç¿æ³³ç¤¾ãã ãããã¨ããããã¾ããããã§ã¨ããããã¾ãï¼Tã·ã£ãã¾ã§ããã£ãï¼ï¼ å®ã¯ãç§ã¨id:daisuke-mã¯ããã®ç¿»è¨³çã®å®è£ ç·¨ã®ã¬â¦
ã¾ãã 3æ11æ¥ã®ãæ±åå°æ¹å¤ªå¹³æ´æ²å°éãã§ã被害ã«ããããçæ§ã«å¿ãããè¦èãç³ãä¸ããã¨ã¨ãã«ãç ç²ã«ãªãããæ¹ã ã¨ãéºæã®çæ§ã«å¯¾ããå¿ãããæãã¿ãç³ãä¸ãã¾ãã ç§ãé¢è¥¿åºèº«ã§éªç¥å¤§éç½ã®é ·ããä½é¨ãã¦ãã人éã§ãããã¾ãããæ°ãè² â¦
DDDã§è¨è¨ãå§ããã¨ä¸å¤æ¡ä»¶ãç¶æããããã«ãã¨ã³ãã£ãã£ãªã©ã®å¯å¤ãªãã¸ã§ã¯ãã®è¤è£½ãè¡ããã¨ãããããã¾ãã Javaã®å ´åã¯ãCloneableã¤ã³ã¿ã¼ãã§ã¤ã¹ãå®è£ ãã¦ãå®è£ åã«å¿ããè¤è£½ã¤ã³ã¹ã¿ã³ã¹ãè¿ãcloneã¡ã½ãããä½ãã以ä¸ã®ãããªæãã â¦
æè¿ãDDDã®"æå³ã®æç½ãªã¤ã³ã¿ãã§ã¼ã¹"ã¨ãããã¿ã¼ã³ã®ç« ãèªã¿ãªããã¦ãã¾ãããã®ãã¿ã¼ã³ãä¸ç°ãã¦ä¸»å¼µãã¦ãããã¨ã¯"ååãéè¦"ã¨ãããã¨ã§ãããã®ååã®éè¦æ§ã«ã¤ãã¦ããããããªæç®ããã®å¼ç¨ãç¨ãã¦èãã¦ã¿ããã¨æãã¾ãã ååéè¦ â¦
è¥å¹²ãé£ãã話ã§ãããè¨è¨åãä¸ãããããã°ã©ãåããªã¨ã³ããªãç§ãéåã°ã§ããä¸ç·ã«èãã¦ããã ããã°å¹¸ãã§ãã å ç¢ãªã¢ããªã±ã¼ã·ã§ã³ãå®ç¾ããä¸ã§ãå¯ä½ç¨ãæå°éã«æãããã¨ããè¨è¨ææ³ã¯ãé常ã«éè¦ãªç¤ºåãå«ãã§ãã¾ãã ãã®ãå¯ä½â¦
id:ryoasaiããããç´¹ä»ãã¦ããã£ãã¨ã³ããªã§ãããªã¥ã¼ãªãã¸ã§ã¯ãã¯ä¸å¤æ§ãæ¬è³ªã§ã¯ãªããã¨ãããã¨ãç¥ã£ã¦ããããï¼ãã£ã¨æã£ãã®ã§ãããä¸åº¦DDDæ¬ãèªãã§ç°¡åã«ã¾ã¨ãã¦ã¿ã¾ããã ä¸å¤æ§ã¯æ¬è³ªã§ã¯ãªã DDD P97-98ããå¼ç¨ The system has toâ¦
ã¡ã¨ãå°é£ãã話ã«ãªãã¾ããDDDã®è©±ãªãã§ãã³ã¼ãã§å¦ã¶ãã¡ã¤ã³é§åè¨è¨å ¥é ãã¢ã°ãªã²ã¼ãç·¨ã - ãã ããã¡âãã¨ãã®æè¡æ¥èªã§ãåãä¸ããã¢ã°ãªã²ã¼ãã«é¢ããèå¯ã§ããã©ãããã¹ããã¯ã¡ãã£ã¨åãã£ã¦ãã¾ããããããèªãã§ãããããããã®â¦
2010å¹´ãä»æ¥ã§çµããã§ãããçæ§ã«ãããã¾ãã¦ã¯ã©ã®ãããªå¹´ã§ãããã ç§ã¯ããã®ä¸å¹´ã§ãæ°ããæè¡ã®ä¾¡å¤è¦³ãã¨ã人ã¨ã®åºä¼ããã®äºã¤ã®æ©ä¼ãæµã¾ããå¹´ã§ãããä»äºã«ãã³ãã¥ããã£æ´»åã«ããä¸è©±ã«ãªã£ãçæ§ãæ¬å½ã«ãããã¨ããããã¾ããã20â¦
ã³ã¼ãã§å¦ã¶ãã¡ã¤ã³é§åè¨è¨å ¥é ãã¨ã³ãã£ãã£ã¨ããªã¥ã¼ãªãã¸ã§ã¯ãç·¨ã - ãã ããã¡âãã¨ãã®æè¡æ¥èª ã³ã¼ãã§å¦ã¶ãã¡ã¤ã³é§åè¨è¨å ¥é ãæ¯ãèãã¨ãµã¼ãã¹ç·¨ã - ãã ããã¡âãã¨ãã®æè¡æ¥èª ã¨ç¶ãã¦ããã®ã¨ã³ããªã¯ãã¡ã¯ããªç·¨ã解説ãã¾â¦
ã³ã¼ãã§å¦ã¶ãã¡ã¤ã³é§åè¨è¨å ¥é ãã¨ã³ãã£ãã£ã¨ããªã¥ã¼ãªãã¸ã§ã¯ãç·¨ã - ãã ããã¡âãã¨ãã®æè¡æ¥èª ããã®é£æã¨ã³ããªãæ¯ãèãã¨ãµã¼ãã¹ç·¨ã§ããä»åãã³ã¼ãã使ã£ã¦è§£èª¬ãããã¨æãã¾ãã ãµã¼ãã¹ã¨ã¯ãã¢ãã¨ãã¦æ±ãã¨ä¸èªç¶ãªãã®ããµâ¦
ã³ã¼ãã§å¦ã¶ãã¡ã¤ã³é§åè¨è¨å ¥é ãã¨ã³ãã£ãã£ã¨ããªã¥ã¼ãªãã¸ã§ã¯ãç·¨ã - ãã ããã¡âãã¨ãã®æè¡æ¥èª ã³ã¼ãã§å¦ã¶ãã¡ã¤ã³é§åè¨è¨å ¥é ãæ¯ãèãã¨ãµã¼ãã¹ç·¨ã - ãã ããã¡âãã¨ãã®æè¡æ¥èª ã³ã¼ãã§å¦ã¶ãã¡ã¤ã³é§åè¨è¨å ¥é ããã¡ã¯ããªç·¨â¦
ã³ã¼ãã§å¦ã¶ãã¡ã¤ã³é§åè¨è¨å ¥é ãã¨ã³ãã£ãã£ã¨ããªã¥ã¼ãªãã¸ã§ã¯ãç·¨ã - ãã ããã¡âãã¨ãã®æè¡æ¥èª ã³ã¼ãã§å¦ã¶ãã¡ã¤ã³é§åè¨è¨å ¥é ãæ¯ãèãã¨ãµã¼ãã¹ç·¨ã - ãã ããã¡âãã¨ãã®æè¡æ¥èª ã³ã¼ãã§å¦ã¶ãã¡ã¤ã³é§åè¨è¨å ¥é ããã¡ã¯ããªç·¨â¦
å æ¥ãDevLOVEã§çºè¡¨ãããã³ã¼ãã§å¦ã¶ãã¡ã¤ã³é§åè¨è¨å ¥éãã§ãããå ¥éã¨ããªãããé£ããã£ãããããã¾ãããã¢ããªã³ã°ã®è©±ã¯é£ããæ¹ã®è©±é¡ãªã®ã§ä»æ¹ãªãã®ã§ãããã§ããã ãããããããè£è¶³ããããã°ãæ¸ãã¦ã¿ããã¨æãã¾ããã¾ããã¬ã¤ã¤ã¼â¦
12æ18æ¥ DEVLOVE HangarFlight - Winter Sortie -(æ±äº¬é½) ã§ããã³ã¼ãã§å¦ã¶ãã¡ã¤ã³é§åè¨è¨å ¥éãã¨é¡ãã¦ããã¹ã£ã¦ãã¾ãããã¹ã©ã¤ãã¯ãã¡ããhttp://slidesha.re/h0ffOI ã½ã¼ã¹ã³ã¼ãã¯ãã¡ããhttps://github.com/tricreo/schema-generatorä¼æ¥ã«â¦
ãã¤ãããã¾ã§ãããããããããã°ã©ãã³ã°ã«é¢ããã¨ã³ããªãæ¸ããªããã°wDDDã®åå¼·ãéå§ããã«ããã£ã¦ãä¸çªæåã«Entitiesã¨Value Objectsã«åºä¼ãã ä»åã¯ãã¾ãå ã«Value Objectsã¨é¢é£ãæ·±ãImmutableã«ã¤ãã¦ãèãã¦ã¿ããããªããValue Objecâ¦
ãã¡ã¤ã³ã¢ãã«ã«å¯¾ããæ¥ç±³ã®æ¸©åº¦å·®ï½Ouobpoç§ãæãã«ãã¡ã¤ã³ã¢ããªã³ã°ãæ·å± ãé«ãã¨ãããã¨ã§ã¯ãªãã¦ããªãã¸ã§ã¯ãæåèªä½ãããããæ·å± ãé«ãããã ã¨æãã å¤æ æ§ããã¶ã¤ã³ãã¿ã¼ã³ã¨ãåºã¦ããã¨ç®ãããããåãã¨ãããï½ ããã¾ã§å³æ ¼ã«â¦
Domain-Driven Design: Tackling Complexity in the Heart of Softwareä½è : Eric Evansåºç社/ã¡ã¼ã«ã¼: Addison-Wesley Professionalçºå£²æ¥: 2003/08/22ã¡ãã£ã¢: ãã¼ãã«ãã¼è³¼å ¥: 4人 ã¯ãªãã¯: 109åãã®ååãå«ãããã° (89件) ãè¦ã ä¹ ã ã«æ´æ¸ãâ¦