ãã³ãã¬ã¼ãã¨ã³ã¸ã³ã®ããã«æè¿ã®PHPã¯ãªãã¸ã§ã¯ãå¿åããDIããã¤ããå§ãã件
â»2017/05/29ç¾å¨Repositoryã®ç« ã¾ã§ããèãã¦ãã¾ãããèãã¦ããéã«æµ®ããã ã¤ã³ã¹ãã¬ã¼ã·ã§ã³ãæ®çºããªãããæ°¸ç¶åããçºã«æ¸ããè¨äºã§ãã
ã¾ããæ¥æ¬èªã§ãã®å
容ãèããã³ã³ãã³ããããã¨ã¯æããªãã£ãã§ãã
ããã¯è±èªããã¹ã¿ã¼ããã°
ãªã©ã®Podcastããããå¤ãã®è奮ãå¾ãããäºãæå³ãã¾ãã
ããã°ã©ãã³ã°çµé¨3å¹´ãç´°ããä¿®æ£ã°ããã§è¨è¨ã¬ãã«ã®çµé¨å¤ãå ¨ããªãèªåã§ãããåç« ã«ã¤ãã¦ä»¥åããå人çã«æã£ã¦ããäºããä¸æ¹ã®ç¥è¦ããã¤ã³ã¹ãã¬ã¼ã·ã§ã³ãå¾ãå 容ãæ¸ãæ®ãã¾ãã
1. DI
ãä¾åæ§ã®æ³¨å ¥(Dependency Injection)ãã¨ãDIã³ã³ããããæ··åãã¦ãDIãã¨å¼ã°ãã¦ããç¹ãã¾ãã¯ããã«åå²ããã®ã¯ç´ æ´ãããã£ãã¨æãã¾ãã
ã¾ããDIã³ã³ããPIMPLEããããã¼ã¸ã®è¦åºãã
- A simple PHP Dependency Injection Container
ã§ãããæ··åããªãã»ããããããã¨ããããªãã¨ããã^^;
ã¾ãã¯ãä¾åæ§ã®æ³¨å ¥(Dependency Injection)ãããã
ä¾åæ§ã®æ³¨å ¥(Dependency Injection)
èªåã¯Silexãåãã¦ä½¿ã£ãæã«Fabien Potencieræ°ã®ä»¥ä¸ã¹ã©ã¤ãããDIã«å ¥ãã¾ããã
www.slideshare.net
ãã以å¤ã«ãAngularJSãSymofnyã®æ¸ç±ã»ããã¥ã¡ã³ãã§DIã«ã¤ãã¦ã®ç« ãèªãæ©ä¼ã¯ããã¾ãããã
æ·±ãã¯è¿½ã£ã¦ãã¾ãããæåã®ã¹ã©ã¤ããè¦ãæããä»ã«è³ãã¾ã§ã
ãå¿ è¦ãªç©ãä½å¦ã§å ¥ãããã
ã®åç´ãªæ¦å¿µä»¥ä¸ã§ã以ä¸ã§ããªãã¨ãã解éã§èªåã¯ç´å¾åºæ¥ã¦ããããã§ãã
ã³ã³ã¹ãã©ã¯ã¿ã¤ã³ã¸ã§ã¯ã·ã§ã³ãã»ãã¿ã¼ã¤ã³ã¸ã§ã¯ã·ã§ã³çã§é½åããå¿
è¦ãªç©ãå
¥ããã¿ã¤ãã³ã°ã調æ´ãããã¯ããã¯ãã¾ã便å©ã§ããã
ç§ãDIã使ãçç±ã¯ãã£ãä¸ã¤ã§ãã
ãªãã®æ¨¡é å(ã¾ãã¯æ¬ç©)ãå ¥ããã°ãã¹ãå¯è½ãªã®ããã¾ããã®ã¯ã©ã¹ãåãã«ã¯ä½ãå¿ è¦(ä¾åãã¦ãã)ãªã®ãæ示ããã¦ããããããã®æ¨¡é å(ã¾ãã¯æ¬ç©)ãæ³¨å ¥ããã°ç¢ºå®ã«ãã¹ãåºæ¥ãããã
è¦ã¯ãã¸ãã¹ãã¸ãã¯ãæ å½ããã¯ã©ã¹ãå¿ è¦ã¨ããç©(ä¾åãããã®)ãDIã§èª¿éãããäºã«ãã£ã¦ç¢ºå®ã«ãã¹ãåºæ¥ãããã§ãã
ãã¯ã©ã¹ãã¡ã½ããã¯å¿
è¦ãªãã®ã ããå¼æ°ã§åãåãã®ãè¨è¨ã¨ãã¦æ£ããããDIã使ããã¨ãã£ãææ
ã¯ãã¾ãæã£ã¦ãã¾ããã
ãªããªãã
- ãã¬ã¼ã ã¯ã¼ã¯ã®ã³ã³ããã¼ã©ã®ã¢ã¯ã·ã§ã³å ããã¢ã¯ã»ã¹åºæ¥ãDIã³ã³ããã£ã¦ä½å ¥ã£ã¦ããåãããªãç¶æ ã ããï¼
- å¿ è¦ãªãã®ã ãæ示çã«å¼æ°ã§æ¸¡ãã®ãæ£ãããã ã£ãããDIã³ã³ãããªãã使ããã«ãã®ãªã¯ã¨ã¹ãæ¯ã«ãã®ã¢ã¯ã·ã§ã³ã§å¿ è¦ãªãªãã¸ã§ã¯ãã ãnewãã¦å¼æ°ã«æ¸¡ãã°è¯ããããç¡ãã®ï¼
- ãããããã®DIã³ã³ããããåæããã«ãã®ã¢ã¯ã·ã§ã³ã§ã¯ä½¿ãããªããªãã¸ã§ã¯ãæã£ã¦ãã ããææåæ¤æ»ãããã¾(ï½ÎµÂ´)ï¾âï½°â ï¾ï½²ï¾ï¾ï½²ï¾ï½°ï¼ã
- ã ãã©ç¾å®ã¯å©ä¾¿æ§ã®è¦³ç¹ãããã³ã³ããã¼ã©ã®ã¢ã¯ã·ã§ã³ã¬ãã«ã§ã¯ãµã¼ãã¹ãã±ã¼ã¿ãã¿ã¼ã³ã§å ¨é¨å ¥ãã³ã³ãããåãåã£ã¦ãã
- æããã«ã¦ããããã¹ãç¡ãã¦ãå°ããªããDIã®å¼æ°ãªã¹ããå¤ããªãããã¦æéã«ãªãå ´åã¯åç主義ãã¤ã¼ãDIã³ã³ããã注å°ãã¦æ¥½ã«ãªã£ã¡ã¾ããã
çã¹ã¿ã³ã¹ã®å®å©ä¸»ç¾©è ãªã®ã§ãDIã使ãçç±ã¯ãã¹ããåºæ¥ãã¨ããå®çæ§ã§ãã
ãDIã³ã³ããã
ããã¯ãã¾ãæ·±ãæ°ã«ããäºãç¡ãã®ã§æãã¨ããããªãã§ã^^;
PHPåå¿è
ã®é DIã³ã³ãããè¦ã¦
- ãããªãã¸ã§ã¯ãã ããªï¼ä½ã§é åã¿ããã«ã¢ã¯ã»ã¹åºæ¥ã¦ãã®(ã¤Ð´â)コï¾ï½¼ï½ºï¾ï½¼
ã¨ç¦ç¥ãæãã¦ArrayAccessã®åå¨ãç¥ã£ãæãåºããããããã§ããããã
ãã¬ã¼ã ã¯ã¼ã¯ã®ã³ã³ãã¤ã«ã¿ã¤ã ãçµãã£ããã¶ã£ã¡ããDIã³ã³ããã¯å®è³ªã°ãã¼ãã«ç©ºéã¿ãããªã¨ãããããã®ã§ã
WordPressã®$wp_****
ã°ãã¼ãã«å¤æ°ç¾¤ã¿ããã«ã¨ããããå¿
è¦ãªç©ã調éããåå¨ã¨ããèªèã§ããã
DIã®å¼æ°ã«DIã³ã³ããã渡ãè¡çºããããã°ãã¼ãã«å¤æ°ã®ãã±ããªã¬ã¼ãããã¨ãããããªè¶£æ¨ã§ã¢ã³ããã¿ã¼ã³ã¨ãã¦æãããã¦ããæç®ãããã¤ãè¦ãäºããã£ãã®ã§ãããã¯æ°ãã¤ããªãããªã¼ã¨é ã®çé
ã«ã¯ç½®ãã¦ãã¾ããã
ã°ãã¼ãã«ç©ºéããåªãã¦ããã¨ãããèãã¦ã¿ãã®ã§ããã
- ãã¼ã éçºã«ããã¦ãç©ã®åºãå
¥ãæ¹æ³ããå
±éåããã
- å¿ è¦ãªã¯ã©ã¹ãnewãããã¨ããããDIã³ã³ããã«çªã£è¾¼ãã§ããããåãåºãã¦ãã£ããã¼ã( ´ â½ ` )ï¾
- ä½ãã©ããªååã§å ¥ã£ã¦ããã®ã確å®ã«è¿½è·¡åºæ¥ã
ããä»æãã¤ãã¾ãããJetBrains製IDEã®ãã³ã³ããããåãåºãããªãã¸ã§ã¯ãã¸ã®ã¡ã½ããè£å®ããç¡ãã¨æ£ç´ãã£ã¦ãããªãã§ã^^;
2. ãã³ãã¬ã¼ãã¨ã³ã¸ã³ã®ããã«æè¿ã®PHPã¯ãªãã¸ã§ã¯ãå¿åããDIããã¤ããå§ãã件
ããã°ã¿ã¤ãã«ã®ç« ã§ããã
ã
PHPã¯æåãHTMLã«åçãªå¦çãåãè¾¼ããã¼ã«ã¨ãã¦èªçãã¾ããã
<h1>ç¾å¨ã®ã¿ã¤ã ã¹ã¿ã³ã㯠<?php echo time(); ?> ã§ãï¼</h1>
ãã®ãããªãã¼ã«ã欲ããã¨ããã¢ããã¼ã·ã§ã³ã§ãPHPãéçºããã¨ä½è ã®Rasmus Lerdorfæ°ãè¿°ã¹ã¦ãã¾ãã
ã§ã¯ãªããã¬ã¼ã ã¯ã¼ã¯ã ã®composerã ã®ãªãã¸ã§ã¯ãå¿åã ã®DIã ã®ãããããæ¦å¿µãPHPã«æã¡è¾¼ã¾ããã®ã§ããããã
ã
ç§ãç¥ãéãã§ã¯ãSymfonyã®ä½è
ã§ããFabien Potencieræ°ããMy Take on PHPãã®è¬æ¼ã§ããã«ã¤ãã¦èªã£ã¦ãã¾ãã
dotScale 2014 - Fabien Potencier - My Take on PHP
ãã®ãã¼ãã«é¢ããå
容ã¯åç»ã®ååããä¸ç¤ã«ããã¦ã§ãã
Fabienæ°ã¯ãã©ã³ã¹äººã§è±èªãã¤ãã£ãã§ã¯ãªããã大åã¯ä¸è¬çãªèªå½ã§è©±ãã¦ããã
youtubeã®èªååå¹æ©è½ã§è±èªåå¹ã表示ã§ãã¾ãã®ã§ããã²ä¸åº¦ã覧ã«ãªã£ã¦ã¿ã¦ãã ããâ©( ã»Ïã»)â©
ã¹ãã¼ãã®å 容ã§æ¬ä»¶ã®ãã¼ã¨ãªãã»ã³ãã³ã¹ãæãåºãã¦ã¿ã¾ããã
I have hate love relationship with php.
ã
think people hate PHP as a Laguage.
ã
Peaple like PHP as a Platform.
ã
I don’t like PHP the language I like it mostly as platform.
ã
peaple love WordPress not because it’s written in PHP but because the way PHP works the way it’s so easy to contribute something os there are hundred thousands of module for Wordpress.
ã
every time there is a request we initialize the request be runs on PHP script and then we shut down everything and our should down the request shutdown is really about you know trusted everything about the current request everything you’ve done during the the request is just discard it so you need to do the same things over and over again.
è±èªã¯åå¼·ä¸ã§ãµãã£ã¨ããç解ã§ç³ã訳ãªãã§ããã
ä¸è¨ã»ã³ãã³ã¹ã®è¶£æ¨ãæ訳ãã¦ã¿ã¾ããã(翻訳ã§ã¯ãªãã§ã)
- ã¿ããªPHPãè¨èªã¨ãã¦ã¯ã¼ã«ã ã¨æã£ã¦ããããã§ã¯ãªãã
- ã§ãä½ããããçº(Wordpressã®ãããªCMSããWebãã¬ã¼ã ã¯ã¼ã¯)ã®ãã©ãããã©ã¼ã ã¨ãã¦é½åãè¯ãã¨ã¿ããªæã£ã¦ããã
- ãªã¯ã¨ã¹ããæ¥ããåæåãããPHPã¹ã¯ãªãããèµ°ã£ã¦ããã®å¾ã·ã£ãããã¦ã³ãããç¾å¨ã®ãªã¯ã¨ã¹ãã§èµ·ãã£ã¦ããå ¨ã¦ã¯ã·ã£ãããã¦ã³å¾å ¨ã¦ç ´æ£ããããã(ã¡ã¢ãªãªã¼ã¯ã¨ãä½ãæªããã®ããã£ã¦ã)ä¿¡é ¼ããããã¡ã«ããºã ã§ããã
å
ã¯ãã³ãã¬ã¼ãã¨ã³ã¸ã³ã ã£ãPHPã«å¤§å¢ã®éçºè
ãä¸è¨ã®ãããªé
åãæãå§ããWordPressãã¯ããã¨ããCMSãå°è¦æ¨¡åãã»å¤§è¦æ¨¡åãæ§ã
ãªã¹ã¿ã¤ã«ã®Webãã¬ã¼ã ã¯ã¼ã¯(å¤ãã¯Ruby on Railsã®å½±é¿ãåã)ãéçºãããçµæã
PHPãåãå·»ãç¶æ³ãç¾å¨ã®ããã«æé·ãã¦ãã£ãã®ã ã¨æããã¾ãã
ã©ã®ã³ã³ããã¹ããå·®ãã¦ãPHPãã¨è¨ã£ã¦ããã®ãåãããªãåé¡ãããã³ãã³åç»ãã§ä¾ããã¨
ãã®åç»å
±æãµã¤ãã®é»ææããã¡ããåç»æ°ã¯å°ãªãã£ãã§ãã
人æ°åç»ã®æ°ã¯äººãååææ¡åºæ¥ãæ°ã«åã¾ãåã«ããã³ãã³åç»ãã¨è¨ã£ãå ´å大ã¾ãã«ã
- ãã¬ããã´ã¼ï¼é°é½å¸«ãããã£ãããã¾ãããéçæ²ã¯å¤§å¤ãªãã®ãçãã§ããã¾ããããªã©ã«ã³ã¡ã³ããã¦çãä¸ãããµã¤ã
ã¨ãã£ãã³ã³ããã¹ãã§æ¬ãäºãåºæ¥ã¾ããã
β時代の英雄とは (ベータジダイノエイユウとは) [単語記事] - ニコニコ大百科
ãããä»æ¥ã§ã¯ããã³ãã³åç»ãã«æ稿ããã¦ããåç»ã®æ¬æ°ã»ã¸ã£ã³ã«ãããã«è¨ªãã¦ãã人ã
ã®è¶£åãè¨å¤§ã§ããã³ãã³åç»ãã¯ãã¯ãã
ãã³ã¡ã³ãå¯è½ãªåç»ãµã¤ããã¨ãããã©ãããã©ã¼ã ã«æé·ãã¾ããã
ãã®çµæããã³ãã³åç»ããåä¸ã®ã³ã³ããã¹ãã§æ¬ãäºã¯åºæ¥ãªããªãã¾ããã
æè¿ä¸ç«ãªã¸ã£ã³ã«Aã好ããªäººãæè¿ãã³ãã³ã¤ã¾ããªãããã¼ã
æè¿ããããªã¸ã£ã³ã«Bã好ããªäººããããããæè¿ãããï¼é¢ç½ããªã£ã¦ããã®ã
ã
ãã®ããã«ç¹å®ã®ãã©ãããã©ã¼ã ãã«ãã¼ããé åãå¤ããªããããã¨ãã©ãããã©ã¼ã å
ã®ã©ã®é¨åãæãã¦ãã®ãè¨ã£ã¦ããã®ãï¼
åããã«ãããªã£ã¦ãã¾ãã¾ãã
ã
ç¾å¨ä¸å£ã«ãPHPã¯ããã¨ãã£ã¦ãã©ã®æèãæãã¦ããã®ãã確èªããªãã¨åãããªãã®ã¯ããã¨åãåçã ã¨æãã¾ãã
ãã®ç« ã®ã¾ã¨ãã¨ãã¦ã
2017å¹´ç¾å¨ãPHPã¨ã¯ãªããªã®ããã«å¯¾ããå人çãªè¦è§£ã¨ãã¦ã¯ä»¥ä¸ã®ããã«ãªãã¾ãã(æãã¤ããäºå
¨é¨è©°ãã¾ãã)
ãæ¸ãæ¨ã¦ã®ãã³ãã¬ã¼ãã¨ã³ã¸ã³ã
ã
ã¨ãã¦ãã
ãã³ã³ãã¤ã«ä¸è¦ã§æ¸ããã³ã¼ãããã¼ã«ã«ã§åããã¾ã§ã®ãã£ã¬ã¤ãç¡ã
ã¤ã³ã¿ããªã¿è¨èªã¨ãã¦ã¯ç³ãåãªãé度ã§åä½ããã
Webãµã¼ããæ¨æºã§mod_phpã¨ãåãã¦ã¦ã¨ã«ããåããã®ãç°¡åãæè¡è
ã®èª¿éãããããã¨ã«ããèéãå¹ãã
ä¸åã®ãªã¯ã¨ã¹ãæ¯ã«æ°ããããã»ã¹ãç«ã¡ä¸ãããå¦çãçµãã£ãããã®ããã»ã¹ã¯çµäºããããå¤å°ã©ããªããã°ã©ãã³ã°ããã¦ããç¨åº¦ã¡ã¢ãªãªã¼ã¯ãªã©ããã£ã¦ã大äºã«ã¯è³ããªãä»çµã¿ã®ä¿¡é ¼ã®ç½®ããã©ã³ã¿ã¤ã ã®ä¸ã«ã
Fabien Potencieræ°ãTaylor Otwellæ°ãã¯ããã¨ããåã人ãéçºããFrameWorkä¸ã§
Javaã«å¹æµããã¯ã©ã¹ãªã¼ããã¼ãã¼ã»ããã±ã¼ã¸ããã¼ã¸ã£ã¼ã»éçæ¹ä»ãã»ãªãã¸ã§ã¯ãæåããªã©ãé§ä½¿ãã¤ã¤ãJetBrains製IDEã§çç£æ§ãç ç²ã«ããäºç¡ã大è¦æ¨¡éçºç¨éã«å©ç¨ããã
ã
è¨èªã¨ãã¦ã使ããããã¤ããªããè¨èªã
3. Interfaceã¨Abstract
æ£ãã使ãåãã«ã¤ãã¦åå¼·ããäºããªãã®ã§å¼ç¨åºæ¥ãè³æã¯ããã¾ããã
ç§ã®å人çãªããæ¹ã¨ãã¦ã¯ã
- æ½è±¡ã¯ã©ã¹ãä½æããå ´åã¯ååInterface
- ã©ãèãã¦ãæ½è±¡ã¯ã©ã¹ã®å ·è±¡ã¯ã©ã¹ããããã«åã·ã°ããã£ãåä¸å¦çãè¨è¿°ããäºã«ãªãå ´åã¯Abstract
Interfaceã使ãå ´å
è»ã®ã¢ã¯ã»ã«ããã«ã¨ãã¬ã¼ãããã«ãããã¾ãã
ã©ã¡ãããè¸ãã°æ©è½ãããã¨ããç¹ãããªãã¡ã¦ã¼ã¶ã¼ã¤ã³ã¿ã¼ãã§ã¼ã¹ã¯åãã§ãã
ã§ããå éããæ¸éãã¨æ©è½ãæ¯ãèãã¯ç°ãªãã¾ãã
ã
PHPã®ãµã³ãã«ã³ã¼ãã§è¡¨ãã¦ã¿ã¾ããã
<?php interface Pedal { public function useThePedal(); } class AcceleratorPedal implements Pedal { public function useThePedal() { $this->Acceleration(); } private function Acceleration() { // å éãã¾ã } } class BrealePedal implements Pedal { public function useThePedal() { $this->Slowdown(); } private function Slowdown() { // æ¸éãã¾ã } }
ãã®å ´åuseThePedal()
å
ã®å®è£
ããå éããæ¸éãã¨ç°ãªãã®ã§Interfaceã使ãã¾ãã
Abstract
ãç±ãã湯ããããã¨ããã³ãã³ã«å·ãããæ°´ãããããããã¾ãã 両è ã®æ©è½ã¯
- 決ãããã温度ã«ä¿æ¸©ãã
- 注ããã¿ã³
ã¨ãã¾ãã
ä¿æ¸©æ©è½ã¯ãããããä¿æ¸©ãã¨ããè¡çºã¯å
±éãã¦ãã¾ãããç±ãç¶æ
ã«ããå·ããç¶æ
ã«ãã¨å®è£
ã¯ç°ãªãã¾ãã
ã
注ããã¿ã³ã«ã¤ãã¦ã¯ä¸¡è
å
¨ãåãã§ãã
ããã¿ã³ãæ¼ããã¨ããã¤ã³ã¿ã¼ãã§ã¼ã¹ããä¸èº«ã注ããã¨ããå®è£
ãåãã§ãã
ç¾å®ã«ãããªååããã£ããããã®é¨åã¯ããããåãé¨åãæµç¨åºæ¥ãã§ãããã
ã
ãã¡ããPHPã®ãµã³ãã«ã³ã¼ãã«è¡¨ãã¦ã¿ã¾ããã
<?php abstract class Pot { // ä¸èº«ã®æ¶²ä½ã§ãã protected $water = 'water'; // ãã湯ããããããæ°´ããããã§ããäºãéãã®ã§ããã§ã¯å®è£ ãã¾ããã abstract protected function KeepTemperature(); // ã注ãããã¿ã³ã§ãã public function pour() { $water = $this->water; // ä¸èº«ãåå¾ããã®æ½è±¡ã¯ã©ã¹ãPotãã¯$waterãã湯ãæ°´ãåããã¾ããã // ä¸èº«"$water"ãåºãå¦ç... } } class HotWaterPot extends Pot { protected function KeepTemperature() { // ä¸èº«ãç±ã ã«ä¿ã¡ã¾ãã } // ã注ãããã¿ã³ã¯æ½è±¡ã¯ã©ã¹ã§æ¢ã«å®è£ ããã¦ãã¾ãã } class CoolWaterPot extends Pot { protected function KeepTemperature() { // ä¸èº«ãå·ããä¿ã¡ã¾ãã } // ã注ãããã¿ã³ã¯æ½è±¡ã¯ã©ã¹ã§æ¢ã«å®è£ ããã¦ãã¾ãã }
Interfaceã ã¨ååã®éããããã¾ã§ããå¤é¨ããã®æä½çªå£ãããå®ç¾©åºæ¥ãªãã®ã§ã
æ½è±¡ã¯ã©ã¹ã«ããããã£ãå®ç¾©ããæ¹ãé½åãå ´åãªã©ãAbstractã®åºçªãããããããã¾ãããã
4. Repository
Podcastå ã®ä»¥ä¸ã®ãããªçºè¨ãé¿ãã¾ããã
çµå±ã®ã¨ãããããã°ã©ã ãã¯ããã¼ã¿ãæä½ãããã¼ã«ãã«å¸°çµããã§ãã
é£ããã¦ç²¾å¯ãªç解ã¯åºæ¥ã¦ãã¾ãããã
Martin Fowleræ°ã®ä»¥ä¸åèã§ãåæ§è¶£æ¨ã®æããã£ãæ°ããã¾ãã
ããè¦ããªããç§ã®è§£éãè¦ç´ããã¨ã
- çµå±ã®ã¨ãããããã°ã©ã ãã¯ããã¼ã¿ãæä½ãããã¼ã«ãã§ãã
- ããã¼ã¿ã®æä½ããããã¸ãã¹ãã¸ãã¯ãã§ãã
- ããã¸ãã¹ãã¸ãã¯ãããèåã¨ååãSELECTãé£çµãã¦è¿ãããªã©è»½å¾®ãªãã®ã«åã¾ãã®ã§ããã°ãã¼ã¿ãã¼ã¹æ§é ã«ãã®ã¾ã¾å¯¾å¿ããActive Recordãã¿ã¼ã³ã¯è¯ãé¸æ
- ããã¸ãã¹ãã¸ãã¯ãããã¼ã¿ãã¼ã¹æ§é ã¨1対1ã§çµã³ã¤ããªããªãã¸ã§ã¯ãæ§é ãå¿ è¦ã¨ããããã§ããã°ãå¤å°ã®æ軽ãã¯ç ç²ã¨ãªããData Mapperãã¿ã¼ã³ãªã©ã使ç¨ãã
ãã¿ã¾ãããè¨æ¶ããããµããªã®ã§ãã®è§£éã¯ããªãæªããã§ãã
ãã ãã®æ¬ã®ä¸ã§ãã¦ã¼ã¶ã¼ã¯ãã¼ã¿ãå¼ãããã¦UIãæä½ããã®ã ãããæä½ãã¸ãã¯ã¨ãã¼ã¿æ§é ãç´æ¥å¯¾å¿ãããããªå®è£
ã«ãªãã®ã¯èªç¶ãªäºã§ãæã®ã·ã¹ãã ã«ã¯å¤ãè¦ãããè¨è¨ã ãã¨ãã趣æ¨ã®æãä½åº¦ãåºã¦ãã¦ããã®ã¯è¦ãã¦ãã¾ãã
ãã®çºè¨ã®ãããã§æ¬æ¸ãèªã¿ç´ãã¦ã¿ããã¨ããæ°æã¡ã湧ãã¾ããããããã¨ããããã¾ãã
ã¨ããããæ¥ãã§æ¸ãçããã®ã§ãå
容ããã®å
æ´æ°ããããã§ãã
1ã¤ã§ãçããã®åèã«ãªãé¨åãããã¾ããã幸ãã§ãã