ð¥ Railsãã¥ãŒããªã¢ã«è§£èª¬åç»ã®èŠã©ãã(第ïŒç« )
Railsãã¥ãŒããªã¢ã«è§£èª¬åç»ãããããã®è§£èª¬ç®æããå³éžïŒ
ä»åã¯ã第ïŒç« ãã§ãðä»åŸã¯ããããŸã§åŠãã§ãã MVC ã®ä»çµã¿ã§ãRESTful (ã¬ã¹ããã«)ã«å®è£
ããæ¹æ³ã«è§ŠããŠãããŸãâšç¬¬ïŒç« ã§ã¯ãã®äžã® show ã¢ã¯ã·ã§ã³ãnew ã¢ã¯ã·ã§ã³ãcreate ã¢ã¯ã·ã§ã³ã«ã€ããŠåŠã³ãŸãïŒããã§ã¯ãèŠã©ãããããã¯ã¢ããããŠçŽ¹ä»ããŠãããŸãðž
ãªã¯ãšã¹ãã®çš®é¡
åç·šã®ãã£ãã¿ãŒ3ããªã¯ãšã¹ãã®çš®é¡ãã§ã¯ããªã¯ãšã¹ãã®çš®é¡ã«ãã£ãŠããããããã©ããªåŠçã«åãæ¿ããã®ããããåãããŸãã
RESTful ãšã¯äžäœã©ãããäºãªã®ãããããã©ãå¬ããã®ãã®è§£èª¬ããšãŠãå匷ã«ãªããŸãð
resources ã䜿ãã«ãŒãã£ã³ã°
ãããŸã§ã¯ïŒè¡ãã€äœã£ãŠããã«ãŒãã£ã³ã°ã§ããããããžæ¥ãŠ resources ãšãããã®ãåºãŠããŸããåç·šãã£ãã¿ãŒ8ãrails æšå¥šã«ãŒãã£ã³ã°ãã§ã¯ããã® resources ã«ã€ããŠè©³ãã解説ãããŠããŸãã
ãã£ãïŒè¡ã®è¿œå ã§ãã³ã£ããããã»ã©æ²¢å±±ã®ã«ãŒãã£ã³ã°ãåºæ¥äžããã®ã§ããã解説ãèããªããäžã€ãã€ç¢ºèªããŠãããã®ã§ãããããã®ç®æã§ãð
ãããã°ããŠã¿ãã
ãããã°ã¯ãå®éã®ãä»äºã§ããã䜿ãããŠãã倧äºãªæã§ããåç·šã®ãã£ãã¿ãŒ14ããããã¬ãŒã«ã€ããŠããã§ããããã°ã®æ¹æ³ã«ã€ããŠè©³ããç¥ãããšãã§ããŸãã
ãã°ãçºèŠããæ¹æ³ã¯ããã®å å¿ ã圹ã«ç«ã€ãšæãã®ã§ã解説ãèããªããäžç·ã«ã³ã³ãœãŒã«ã§ãã£ãŠã¿ããšç解ãæ·±ãŸãããã§ãðž
ããã®ãããã€
http ãš https ã®éããã©ã¡ããã©ãå®å šãªã®ãã«ã€ããŠè§£èª¬ããŠãããã®ããåŸç·šã®ãã£ãã¿ãŒ8ãããã®ãããã€ãã§ãð
ããŒã«ã«ç°å¢ã§åŠã°ããŠããæ¹ã¯ãããŒã«ã«ç°å¢ãš heroku ç°å¢ã®éããæ¹ããŠç¢ºèªããŠã¿ããšé¢çœããã§ããð
ãŸãšã
第ïŒç« ã®çŽ¹ä»ããããã§ãããïŒ
段ã
ãšã«ãŒãã£ã³ã°ãè€éã«ãªã£ãŠããŸããã第ïŒç« ã§åæ©çãªã«ãŒãã£ã³ã°ã®è§£èª¬ãããã®ã§ãé£ãããšæã£ããéœåºŠæ»ã£ãŠè§£èª¬ãèããŠã¿ãã®ãããããã§ãðã30åç¡æèŠèŽãããããŸãã®ã§ããã²æå¹æŽ»çšããŠã¿ãŠãã ããðžð
Railsãã¥ãŒããªã¢ã« ãã¬ãžã³ð ã®ä»ã®èšäºããèªã¿ã«ãªãããæ¹ã»ãã©ããŒã¯ãã¡ããããé¡ãããŸãðð