ã¯ã¦ãªããã°ã¯ããã¾ãã
ãããã£ããæ®æ®µæ¸ãããã¹ãã Markdown ã°ããã«ãªã£ã¦ãã¾ã£ãã®ã§ããã®æ©ã«ã¯ã¦ãªããã°ã«ç§»è¡ãã¾ãã
ãã¡ãã«ãå ¥ç¤¾ã¨ã³ããªãæ¸ãã¾ããã
http://moro.hatenablog.com/entries/2015/08/03
ããã®æ©ã«ãã¨ãããªããå®ã¯3å¹´åã«ãã¡ã¤ã³ã¹ã¯ã¯ããã£ã³ã°ã ããã¦ããã®ããã£ãæãåºããã®ã§ãããç· ã¾ããªãããã
ã¨ã¯ãããä»å¾ã¨ããããããé¡ããã¾ã!!
æ ªå¼ä¼ç¤¾æ°¸åã·ã¹ãã ããã¸ã¡ã³ããéè·ãã¾ã
æ¬æ¥2015å¹´7æ31æ¥ããã£ã¦ã9 å¹´éå¤ãã¾ããæ ªå¼ä¼ç¤¾æ°¸åã·ã¹ãã ããã¸ã¡ã³ããéè·ãã¾ãã
å¨è·ä¸ã¯å¤ãã®æ¹ã ã«å©ããããRails ãä¸å¿ã¨ããããããã®ä»äºãããªããè²ã¦ã¦ããã ãã¾ãããåå¥ã®ãæ¨æ¶ãã§ããªãã¦å¤§å¤ç³ã訳ããã¾ããããæ¬å½ã«ãããã¨ããããã¾ããããããããã©ãããããããé¡ããã¾ãã
ä»å¾ã§ãããããä»ç¤¾ã§åããã¨ã決ã¾ã£ã¦ããã¾ãã¦ã8 æ 3 æ¥ããåºç¤¾äºå®ã§ãã
以ä¸ãæãåºè©±ãªã®ã§ããã®ã²ã¨èª°?ãã¨ãã人ã¯ã¹ã«ã¼ãã¦ãã ããã
æ°¸åã§ã¯ã»ã¼ãã£ã¨ Ruby ã Rails ã®ä»äºããã¦ãã¦ããã次ã®è·å ´ã§ããã¯ã Ruby / Rails ã«é¢ããä»äºãããäºå®ã§ãã
ãã®ç§ã®ãã£ãªã¢ã®ãã£ããã¨ãªã£ãã®ã¯ããã 10 å¹´ãåã«ãªã(!!) 2005 å¹´ã«ã¯ãã¾ã£ã Rails åå¼·ä¼@æ±äº¬ã§ãããå½æ㯠Rails ã"æ¥ãã" ã¨ããåã¯ããã¤ã¤ãæ å ±ãå ¨ããªããã¿ããªã§ AWDwR ã®åçãèªãã§ããã®ãæãããã§ãã
ãã®ç¸ã§ãä¼ããã @kakutani ãããé ¼ãã«æ°¸åã«å ¥ç¤¾ããã®ã 2006 å¹´ãããããã»ã¼ãã£ã¨ãRuby ã§ä»äºããããããã¨ã«ãªãã¾ãããã®9å¹´ã¨ããã10å¹´ã®éã«ãä»äºã§ Ruby ã使ãã¨ããã®ããã£ããããµã¤ããã®ãã¨ã«ãªãã2008 å¹´ã«çã¾ããå¨ã¯å®å ¨ã« Ruby ä»äºã§é¤è²ããã¦ãããã¨ã«é©ãã¾ã(å ±åããªã®ã§ååã¶ãã§ãã)ã
å
¥ç¤¾æã®ãªãã£ã¹ã¯è浦ã®ç«¯ã£ãã§ãã¾ãã«é¸ã®å¤å³¶ã§ããã
ã©ã³ãç°å¢ãéé
·ã§ãå¯ä¸ãå¾æ©5åç¨åº¦ã§é£ã¹ããããã§å¤ªéã¯ãã§ã«æ¶å¤±ãã¦ãã¾ããã
æ°¸åã¸å
¥ç¤¾ãããã¨ãRails åå¼·ä¼ã«ã¯ãä¸è©±ã«ãªãç¶ããæµæ¯å¯¿ã¯ããªã³ã ãã(å½æ)ã®ãªãã£ã¹ããåããã¦ãDB è¨è¨ãã TDD ããREST ãããããããªãã¨ããã®åå¼·ä¼ã§å¦ã³ã¾ãã¦ããéè«é¨å±ããæãããæãåºãã¾ããå®åçµé¨ãç©ã¿ã¤ã¤ãå°æ¬ããæè¡è
ã®çããã¨ããããç¥ãåãã¾ããã
9 å¹´åã«ãRuby ã§ä»äºãã¦ã¿ããã§ã!!ãã¨ã¯ããã¼å
¨éã§å
¥ç¤¾ããä»åãRails ã®å®åçµé¨ãè±å¯ã§ãããã¨ããä½ã§æ¬¡ã®ãã£ãªã¢ãèããããããã«ãªã£ããã®å·®åã¯ããã¹ã¦æ°¸åã«æå±ãã¦ããããã ã«ãæ°¸åã®ã¡ã³ãã¼ã¨åæ¥çã®äººã
ã社å¤ã®ã³ãã¥ããã£ã®çããã¨ã客æ§ã¨ä¸ç·ã«ãããããªçµé¨ãããã¦ããã ããªããå¾ããã®ã§ããã
ã»ãã¼ãã§è¬æ¼ããããè¨è¨ã«ã¤ã㦠tweet ããã¨ãã®ã»ã¨ãã©ã¯ãæ°¸åã§ã®çµé¨ãå
ãã¿ã«ãªã£ã¦ãã¾ãããã¡ã¿ããã°ã©ãã³ã°ãããããªãäºã
ã¯æ 2008 å¹´ããã«ãªã¬ãªã¬ORMãä½ã£ã¦ãã¾ã£ãçµé¨ããã ã£ãããã`Time.now`使ããªãã㯠2011 å¹´ãã延ã
ã¨ä¿å®ãã¦ããæããã¸ã§ã¯ãã§ã®æ¯å¹´ã®å¹´åº¦ãã¿ã®ã§ã®ãã¹ãè½ã¡ã¨ã®æ ¼éã®çµæã ã£ããã¨ããããã£ã¦æ°¸åã§å¾ãç¥è¦ã社å¤ã§è©±ããã¾ãã³ãã¥ããã£ã®çãããããããããªç¥è¦ãããã ãã¦ããããã£ã¦ãã£ã¦ãã 9 å¹´éã§ããã
ãããªä¸ãèªåã®ç«ã¡ä½ç½®ãç®å ãã¡ãã£ã¨å¤ãã¦åã試ãã¦ã¿ããã¨æããä»åéè·ãããã¨ã«ãããã¾ããã次ã®è·å ´ã§ããã¯ããRubyãRails é¢ä¿ã®ä»äºããã¦ããäºå®ã§ãã®ã§ããããèªãã§ãã£ãããæ¹ã ã«ã¯ãè¡ãå ã ã§ãä¼ãããã¨æãã¾ãããã®æã¯ã©ãããããããé¡ããã¾ãã
ã¾ããç§èªèº«ã¯éè·ãããã®ã®ãæ°¸åã®ã¡ã³ãã¼ã¾ã ã¾ã é¢ç½ã人ããããããã¾ããé¢ç½ã試ã¿ãããããããããã§ããããããã®æ°¸åãããã©ããªãããç«å ´ã¯ä»£ããã¾ããã楽ãã¿ã«ãã¦ããããã¨æãã¾ãã
ã¿ãªãã¾ä»å¾ã¨ãã©ãããããããé¡ããã¾ãã
(ããã¼ã2å¹´åã¶ãã®è¨äºãããã¨ããã®ããªããªããããªãã§ãããããæ©ä¼ãªã®ã§ãä»å¾ã¯Webæ¥è¨åãä¸ãã¦ããããã§ã...)
SQLã¢ã³ããã¿ã¼ã³ -- è¦ãçµé¨ãæãåºãããè¯æ¸
ç®æ¬ããã ãã¾ããããããã¨ããããã¾ãã
æ¬æ¸ã¯ããã¼ã¿ãã¼ã¹è¨è¨ãããã®DBãã¢ããªã±ã¼ã·ã§ã³ããå©ç¨ããéã«ããè¦ãããã¢ã³ããã¿ã¼ã³ããç°¡æ½ãã¤ããããã¨ã¾ã¨ããæ¸ç±ã§ãããã¡ãããåãªããã¹ãããéãã§ã¯ããã¾ããããã®ã¢ã³ããã¿ã¼ã³ã®èæ¯ã§ããç¾å®ã®åé¡ã®èª¬æã¨ãã¢ã³ããã¿ã¼ã³ãåé¿ãã解æ³ããã£ããç´¹ä»ããã¦ãã¾ããããã«ãããã§ãã¢ã³ããã¿ã¼ã³ãæ¡ç¨ããå ´åã®ã¡ãªãããã¡ãªããããã£ããæ示ããã¦ãã¾ãã
ç¹ã«æ°ã«å
¥ã£ãã¨ããã¨ãã¦ã2013å¹´ã®æ¸ç±(åèã¯2010å¹´)ã«ãµãããããORMã®åå¨ããã£ããæèããå
容ã«ãªã£ã¦ããç¹ãå°è±¡çã§ããããã¨ãã°ãå
¨ãã¼ãã«ã«ãµãã²ã¼ããã¼ãè²¼ã(IDãªã¯ã¯ã¤ã¢ã: ã¨ããããID)ã®ã¢ã³ããã¿ã¼ã³ããé¿ããã¹ãã§ã¯ããããORMã®è¦ç´ã§ããã°ãããã£ã¦ããã¨ç´¹ä»ãããªã©ã
å
¨ä½ã¨ãã¦ç¾å ´å¯ããå®è·µçãªãã¦ãã¦ã®ç´¹ä»ã«ãªã£ã¦ãã¾ãã
ãã£ã±ãã«ããã¼ã¿ãã¼ã¹ã®ã¹ãã¼ãããã¼ã¿ã¢ã¯ã»ã¹é¨åã¯ãã¢ããªã±ã¼ã·ã§ã³ã®ä¸ã§ããé·çããããç®æã§ããããã ãã«ãããç¨åº¦ä»¥ä¸ã®çµé¨ãããããã°ã©ãã§ããã°ãç´¹ä»ããã¦ããã¢ã³ããã¿ã¼ã³ã«æ©ãã çµé¨ãããã¯ãã§ããããã©ã³ã«ã¯ãããã£ãçµé¨ã®ã¾ã¨ãã¨ãã¦ãè¥ã人ãã¡ã¯äºé²ã®ç¥èã¨ãã¦ããã²ãããããããä¸åã§ãã
ãªãããã¿ã¼ã³åãè±èªãã®ã¾ã¾ã«ã¿ã«ã表è¨ã§ããã®ã¯ãç®æ¬¡ãè¦ãã ãã§ã¯ããã¯ãªãããã¤ã³ãã§ããããã ããã¼ã å ã§ç¸è«ããã¨ããªã©ã«ç®ç«ã¤ååãä»ãã¦ããã®ã¯ããããããããã§ãããä½ãããªããã«ãã³ããã¦ãããããã£ãã§ã!
- ä½è : Bill Karwin,åç°å人,åç°çäº,å 島修
- åºç社/ã¡ã¼ã«ã¼: ãªã©ã¤ãªã¼ã¸ã£ãã³
- çºå£²æ¥: 2013/01/26
- ã¡ãã£ã¢: 大åæ¬
- è³¼å ¥: 9人 ã¯ãªãã¯: 698å
- ãã®ååãå«ãããã° (46件) ãè¦ã
ãªãã©ãåç©«ç¥ã§çºè¡¨ãã¦ãã¾ãã
ãªãã©ãã®ã¤ãã³ãããªãã©ãåç©«ç¥ãã§æ°äººæè²ã®ãããã¯ã話ãæ©ä¼ããã£ãã®ã§ãããä¸å¹´ã»ã©ä¸ç·ã«ä»äºãã¦ãã(ãããããªã«ãªããã ãªã) id:akiinyoã®äºä¾ãä¸å¿ã«ãä»äºãããã«ããã£ã¦è¥æã«ä¼ããããã¨ãã話ãã¦ãã¾ããã
ããã¾ã§ããããªæ¹ã ã¨ä¸ç·ã«ãä»äºãããã¦ããã ããªãããä»äºããã¡ãã¨çµãããã大äºãã¨ããã®ãæ¥ã ãããã¦ããã®ã§ãããã話ãæ©ä¼ããã£ã¦ããã£ãã§ããã³ã¬ã¯å¥ã«çé¢ç®ããã£ã¦ããã¨ãããã¨ã§ã¯ãªããã¹ã©ã¤ãä¸ã«ãããããã«èªåã®ç¹é·ãçºæ®ãã¦ããæã®åºç¤ã¨ãã¦ãè¥ã人éã®å½¹ã«ç«ã¦ã°ãããªãã¨æã£ã¦ããã¾ãã
ä»æ¥ã¯ãç§ãã½ãªããã«å®æã§ãããã¨ã話ãããã«ãåè¨éçºãã¹ã³ã¼ãã§è©±ãããã§ãããã©ãèªç¤¾ãµã¼ãã¹ã«åãçµãã§ããã¿ãªããã"ã客æ§"ããããã¯ããªã¼ãã¼ãä¼ç»ã®äººããã®ä»ãã¸ãã¹ãè¦ã¦ãã人ã«èªã¿æ¿ãã¦ããªã«ãå½¹ç«ã¤ãã®ãæã¡å¸°ã£ã¦ããã ãããä½ããå¬ããæãã¾ãã
åå è ã®çãããä»ã®è¬æ¼è ã®çãããã¹ã¿ããããã£ã¦ãããæ°¸åã®ååãã¡ã«ã¨ã¦ãã¨ã¦ãæè¬ãããã¾ãã
attr_hash_accessorã¨ããã®ãä½ã£ã
Plain Old Ruby Objectãªãã ãã©ãã¾ãActiveModelã½ãæ¯èããããã¦ãããããã¨ããããHashã§newããããªããeachãã¦send("#{key}=", v)ããã¨ãããRailsã使ã£ã¦ãã人ãªãããããã±ã¼ã¹ã«ããä½åº¦ãééãã¾ãã£ãã®ã§gemã«ã¾ã¨ãã¾ããã
https://github.com/moro/attr_hash_accessor
æããã¸ã§ã¯ãã§ã®ã¢ãªã¢ãããå¥ã®æããã¸ã§ã¯ãã®äººã«æ¸¡ãããã«ä½ã£ãã®ã§ã¾ã èªåãæºè¶³ããç¨åº¦ã®æ©è½ããããã¾ãããããããããã°ã試ããã ããã
æå¹Rubyä¼è°2012ã«åå ãã¦ãåæ åºæ¼ã¨TDDãã¿ã§çºè¡¨ãã¦ãã¾ãã
æå¹Rubyä¼è°ã¯ãç´ä¸å¹´ã¶ãã«è¨äºãæ¸ãã®ã«ãµããããããã°ãããã¯ã§ãã :-)
9/14..9/16ã«è¡ãããæå¹Rubyä¼è°ã«åå ãã¾ãããããããã¾ã§çºè¡¨ã®æ©ä¼ãããã ããã®ã§ããã¤ãçºè¡¨ãã¦ãã¾ããã
ã¾ãã¯2æ¥ãã®åæ åºæ¼æ ã§ãRails3ã®éã¬ã·ããç´¹ä»ãã¦ãã¾ããã¡ãã£ã¨è©±é¡ãè¤éã ã£ãã®ã§åããè¾ãã£ãæ¹ãå ¥ããã¨æãã¾ãããããå°ããããgemã«ãã¾ãã®ã§ãããããã°ã©ããã
3æ¥ãã¯èªåã®çºè¡¨ã§TDDã«ã¤ãã¦çºè¡¨ãã¦ãã¾ããã
æ¸ç±ãã¤ã³ã¿ã¼ãããä¸ã«TDDã®ãããã¯ããããããã£ã¦ãããããªãã¯ããã¯ãç´¹ä»ããã¦ãã¾ãããç§ã®è¦ãç¯å²ã§ã¯ããªã«ãèããªããTDDããã¦ããããã«ã¤ãã¦ã¯ãã¾ã触ãããã¦ããªãããã«è¦ããã®ã§ããããã§ããã ãä¸å¯§ã«èª¬æã§ããªããã¨æã£ã¦ã®ã»ãã·ã§ã³ã§ããã
Railsãåºå§ãã®é ã®ãã¥ã¼ããªã¢ã«è¨äºã«å¯¾ãã¦ããã¾ããã®ãã¼ãã«ãããã¾ããããããã¼ããä½ã§ããããã¹ãã¼ãã«ãããã ããã¨id:habuakihiroããããã£ããã£ã¦ãã®ãè¦ãã¦ãã¾ããããã®ç§ã«ã¨ã£ã¦ã®TDDçã¨ãããã¨ã§ãããã観ç¹ããã£ããããã®ããªãã¨æã£ã次第ã§ã(ãã¾ããããããã¹ãããã£ã¦ãå¢çå¤ãªãããåæãã¾ãããããã°ãªã¼ã³ã«ãã¾ãã)ããããã話é¡ããµãããã¨ãã¯ã¤ãã§ãTDD by exampleãç´¹ä»ãã¦ããã®ã§ãããå°ãè¥ãRubyistã«è·é¢ã®è¿ã話ãããã°ãããªã¼ã¨æãã¾ããGOOSã¯ãã¾èªãã§ãã¾ãã
èªåã®çºè¡¨ããããã¨ãªãããä»ã®æ¹ã
ã®çºè¡¨ããéå¶ã¹ã¿ããã®çãããä¼å ´ã§åå¸ãããããéã£ããä¹¾æ¯ããåå è
ã®çããã¿ããªãã¨ã¦ãniceã§ã楽ããKaigiã§ãããã飯ãããããã£ãã! èçããä½æ¦ã©ããã«åããã!! å¤éä¼æ¥ã«ãã¾ãå¤åºã§ããªããªã£ã¦çé ã ã£ãç¥å·±ã«ããããä¼ãã¦ã話ã§ãã¦ãã»ãã¨æ¥½ããã£ãã
ã¿ãªãã¾ãããã¨ããããã¾ããã
ã¾ããããããç¾å®ã«æ»ã£ã¦ããã®ã§ã次ã®Kaigiã®çºè¡¨å¿åãã¿ãèããªããã³ã¼ããæ¸ãã¦ããããã¨æãã¾ããã¾ãä¼ãã¾ããã!
ã宣ä¼ãRails3ã¬ã·ãããã¯ã®PDFçã»ã¼ã«ãæ¬æ¥11/05ã¾ã§ã§ã
ãã§ã«ãåãã®æ¹ãå¤ãã¨æãã¾ãã(ãè²·ãä¸ãããã ããæ¹ãå¤ãã¨æãã¾ã!! ãããã¨ããããã¾ã!!)ãRails3ã¬ã·ãããã¯ã®PDFçãçºå£²ããã¦ãã¾ããçºå£²è¨å¿µã»ã¼ã«ã¨ãããã¨ã§ãæ¬æ¥11/05ã¾ã§1,800åã§ãè³¼å
¥ããã ãã¾ãããµã ãã¯2,800åãªã®ã§ãæ°ã«ãªã£ã¦ããæ¹ã¯ãã®æ©ä¼ã«ãã²ã©ããã
http://bookpub.jp/books/bp/198
Twitterãªã©ã§ãä½åº¦ã宣ä¼ãããã¾ããããå®éã«æå
ã«ã¡ããã¨æ¤ç´¢ã§ããPDFãããã®ã¯ã¨ã¦ã便å©ã§ããMacã使ã£ã¦ãããããã§PDFã®åãåãã楽ãªãã¨ãããããªã«ã調ã¹ãããã¨ãããã°ããæ¤ç´¢ã§ããã®ãããã§ããããããã«ã¡ã½ããåã¨ããªãã·ã§ã³åã®Symbol(:partialã¨ã)ã§æ¤ç´¢ãã¦ã¡ããã¨åºãã®ã¯ä¾¿å©ã§ããã
ååãå¾è¼©ãã質åãããæããã¨ããããPDFçãæ¤ç´¢ãã¦ãåºã¦ãããã¼ã¸ãç´ã®æ¬ã§ç¤ºããªãã説æã§ããããã¦ããå
·åã§ãã
ãã®ããã宣ä¼ã¨ã³ããªã§ã¯ããã¾ãããå®éã«èªåèªèº«ãå½¹ç«ã¦ã¦ãã¾ãã®ã§èªä¿¡ãæã£ã¦ãããããã¾ããåè183ã®æã®ã»ãã好è©ã§ãããããã¡ãã®190ã®æã®ã»ãã§ããç´ã»PDFã¨ãã«çæ§ã®éçºã®ãå½¹ã«ç«ã¦ãã°å¹¸ãã§ãã
ç¹°ãè¿ãã¾ããã11/05ãã£ã±ãã¯1,800åã§è³¼å
¥ã§ãã¾ãã®ã§ãæ¤è¨ä¸ã®æ¹ã¯ãã²ã©ãããããããããããã¾ãã