ãã®ãã¡ã¤ã³ã¯ããåå.comã§åå¾ããã¦ãã¾ãã ãåå.comã®ããããã¼ã¸ã¸ Copyright © 2020 GMO Internet, Inc. All Rights Reserved.
å æ¥ãSpringã¦ã¼ã¶ã°ã«ã¼ãã®åå¼·ä¼ã«åå ãã¦ãããããã§ã¯ãSpringã使ã£ãéçºã®ãã¿ã¼ã³ãã¿ããªã§èããã¨ãããã¯ã¼ã¯ã·ã§ããå½¢å¼ã®é¢ç½ã試ã¿ããã¦ããã ä»åè°è«ã«æãã£ãã®ã¯ãã¤ã³ã¿ãã§ã¼ã¹ãã©ããã£ãæ¹éã§ç¨æãããã«é¢ãããã¿ã¼ã³ã¨ãBeanå®ç¾©ãã¡ã¤ã«ãã©ã®ããã«ç¨æãã¹ããã«é¢ãããã¿ã¼ã³ã®2ã¤ã ã£ããï¼ãã®çµæã¯ãããã«æ«å®çã«ã¾ã¨ãããã¦ããï¼ Springéçºãã¿ã¼ã³åã®è©¦ã¿ãæ¯ãè¿ã£ã¦æãã¤ããã®ã¯ããããããã¿ã¼ã³ã®å¤ãã¯Springã ãã§ãªããSeasarããã®ä»ã®DIã³ã³ããï¼PicoãHiveMindãGuiceã»ã»ã»ï¼ã使ã£ãéçºã«ãå ±æã§ããã ããã¨ãããã¨ã ã J2EEãã¿ã¼ã³ã.NETã¨ã³ã¿ã¼ãã©ã¤ãºã½ãªã¥ã¼ã·ã§ã³ãã¿ã¼ã³ã«å¯¾ãã¦Fowlerã®P of EAAãããããã«ãSpringãã¿ã¼ã³ãSeasarãã¿ã¼ã³ã«å¯¾ãã¦ãããæ±ç¨çãªDIã³
以ä¸ã®æç« ã¯ãMartin Fowler ã®ãInversion of Control Containers and the Dependency Injection patternããããããã«ã翻訳ãããã®ã§ããåèè ã®è¨±å¯ãå¾ã¦ç¿»è¨³ã»å ¬éãã¦ãã¾ãã 翻訳ã«ããã£ã¦ã¯ãkdmsnr ããã«ãååãããã ãã¾ããããããã¨ããããã¾ããå ¬éå¾ã®æ¹è¨å±¥æ´ãè¨äºã®æå¾ã«è¨è¿°ãã¦ãã¾ãã Java ã³ãã¥ããã£ã§ã¯è»½éã³ã³ãããè±çãã§ããã 軽éã³ã³ããã¯ãç°ãªãããã¸ã§ã¯ãã®ã³ã³ãã¼ãã³ããã²ã¨ã¾ã¨ã¾ãã®ã¢ããªã±ã¼ã·ã§ã³ã¨ãã¦çµã¿ç«ã¦ããã¨ãæ¯æ´ããã ãã®ãããªã³ã³ããã®æ ¹åºã«ã¯ãã³ã³ãã¼ãã³ãã®çµã³ä»ãæ¹ã«ã¤ãã¦ã®å ±éãããã¿ã¼ã³ãããã ãã®ãã¿ã¼ã³ã®ã³ã³ã»ããã¯ãInversion of Control(å¶å¾¡ã®å転)ãã¨ãã¾ãã¨ã«å æ¬çãªååã§å¼ã°ãã¦ããã æ¬è¨äºã§ã¯ããã®ãã¿
ããã°ãã¯ããsato-shiã§ãã æè¿ãä¼ç¤¾ã§ãããªã®å§ãã¾ããã æè¡ãã¿ãæ²è¼ããäºå®ã§ãã ãããããã°ãè¶ããã ãããã ã¯ã©ã¹ã¡ã½ããããã°ãå ¬é http://classmethod.jp/news/etc/start-classmethod-blog/ ä»é±ã®4/20æ°´ææ¥ã«å¸ã¶è°·ã§ã»ããã¼ãã¾ãã ãã¿ã¯ããªã¢ã¼ãã¢ã¯ã»ã¹ç°å¢æ§ç¯äºä¾ã»ããã¼ãã¨é¡ãã¾ãã¦ã å½ç¤¾ã§ä½å¹´ãã«æ¸¡ã£ã¦æ¤è¨ã»å®æ½ããã¦ããã æ å ±ã»ãã¥ãªãã£åä¸ã¨æ¥åå¹çã¢ãã㨠ã³ã¹ãã®ãã©ã³ã¹ãèããäºä¾ã»ããã¼ã§ãã âã¾ã ç³è¾¼å¯è½ã§ãã⪠ãªã¢ã¼ãã¢ã¯ã»ã¹ç°å¢æ§ç¯äºä¾ã»ããã¼ http://classmethod.jp/seminar/remote-access/ ã¤ã³ã¿ã¼ãããã»ãã¥ãªãã£ããã¡ã¤ã¢ã¦ã©ã¼ã«çã§æå㪠ã½ããã¯ã¦ã©ã¼ã«ç¤¾ããã¨ã®å ±å¬ã¨ãªã£ã¦ãã¾ãã ã½ããã¯ã¦ã©ã¼ã«ããããã¯ãSon
ãDIãããï¼ãã¤ã³ã¸ã§ã¯ã·ã§ã³ï¼æ³¨å ¥ï¼ãããââæ°ããæè¡ã«ææãªã½ããã¦ã¨ã¢éçºè ãã¡ã®éã§ä½¿ããã¦ããè¨èã§ãããDIã¨ã¯ï¼ã軽éã³ã³ããããå®ç¾ããæ°ããè¨è¨ææ³Dependency Injectionï¼ä¾åæ§æ³¨å ¥ï¼ã®ç¥ç§°ã§ãããåãæ¦å¿µãIoCï¼Inversion of Controlï¼å¶å¾¡ã®å転ï¼ã¨å¼ã¶å ´åãããï¼è©³ç´°ã¯å¾è¿°ï¼ããDIãããã¨è¨ãã°éçºè ã®éã§ã¯éç¨ãããããã«ï¼ãã®è¨è¨ææ³ã¯æ³¨ç®ããã¦ããã®ã ã DIã注ç®ãããçç±ã¯ç°¡åã ãã½ããã¦ã¨ã¢éçºè ã®éçºãµã¤ã¯ã«ãå¤§å¹ ã«æ¹åããããã ãçè ãå¸ä¼ãæ å½ããã軽éã³ã³ãããã«é¢ããããã«ã»ãã£ã¹ã«ãã·ã§ã³ï¼æ³¨1ï¼ã§ã¯ï¼DIãé©ç¨ãã軽éã³ã³ãããSpring Frameworkãã®ãããã§ãç¡ç æéã確ä¿ã§ããããã«ãªãã¾ãããã¨è¤æ°ã®ãããªã¹ããçé¡ã§ã³ã¡ã³ãããã»ã©ã§ãããDIã¯ï¼ããã ãæå¹ãªæè¡ãªã®ã ã 注1
DIï¼ä¾åæ§ã®æ³¨å ¥ï¼ã«ã¤ãã¦ã®è§£èª¬ãè¡ã£ã¦ãã¾ããããã§ã¯DIxAOPã³ã³ãããæä¾ããä¾åæ§ã®æ³¨å ¥ã¯ã©ã®ãããªã·ã¹ãã ãæ§ç¯ããæã«å©ç¨ããã°ããã§ããããã DIxAOPã³ã³ããã解決ããä¾åæ§ã®æ³¨å ¥ã¯ãã¹ãã¼ãã¬ã¹ã¤ã¾ãå¤ãæããªããªãã¸ã§ã¯ããã¤ãªãã®ã«åãã¦ãã¾ãããã®ãããªã¹ãã¼ãã¬ã¹ãªãªãã¸ã§ã¯ããå©ç¨ããè¨è¨ãã¿ã¼ã³ããã©ã³ã¶ã¯ã·ã§ã³ã¹ã¯ãªããï¼å³4ï¼ã¨ããDIxAOPã³ã³ããã¯ãã©ã³ã¶ã¯ã·ã§ã³ã¹ã¯ãªãããå®ç¾ããã®ã«åãã¦ãã¾ãã ãã©ã³ã¶ã¯ã·ã§ã³ã¹ã¯ãªããã§æ±ããã¡ã¤ã³ãªãã¸ã§ã¯ãã¯ãæ¯ãèããæããªãã·ã³ãã¡ã¤ã³ï¼ããããã¡ã¤ã³ï¼ã§ããã·ã³ãã¡ã¤ã³ã«å¤ãè¨å®ããã®ã¯ãDIxAOPã³ã³ããã§ã¯ãªããã¼ã¿ãã¼ã¹ã«ã¢ã¯ã»ã¹ãã¦å¤ãåå¾ããDAOï¼Data Access Objectï¼ã§ããã¾ãDAOãå¤ãã»ããããã·ã³ãã¡ã¤ã³ã®ãã¨ãTOï¼Transfar Objectï¼ã
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}