Railséæ
æè¿ãããããRailsã®å¤ãã®ãã¼ã¸ã§ã³ã§æ¸ãããããã¬ã¬ã·ã¼ãªæãã®ã¢ããªã±ã¼ã·ã§ã³ã触ã£ã¦ãã¦æã£ããã¨ã
ã¡ãªã¿ã«ããã®è©±é¡ã¯å¤ãã®äººã«ã¨ã£ã¦å¤§åä»æ´æã®ããå 容ãªã®ã§ãéã«ãããèªãã§ãä»æ´ã ãªãããããªã®ã¨ã£ãã«çµè«åºã¦ãã§ãããã¨æããªã人ã¯ã¤ããã
ããã©ãããã®ã§ãã¼ã¿æ°¸ç¶åãè¡ãããã®ããã«ã¦ã§ã¢ã¯MySQLã¨ããåæã§æ¸ãã
- åç´ã«è¨ãã¨ãããããRailsã¢ããªã®MVCã§ã¯MãActiveRecordããªãããç¶æ¿ãã¦ãã¦ããã®ã¾ã¾ä½ãã¨Modelã¨tableãä¸å¯¾ä¸å¯¾å¿ã«ãªã£ã¦ãã¾ã
- ããã ã¨ãã©ã®Modelã«ãå±ããªããããªãã¸ãã¹ãã¸ãã¯ãç½®ãã¹ãå ´æãã©ããªã®ãããããããªã
- ãã©ã®Modelã«ãå±ããªããããªãã¸ãã¹ãã¸ãã¯ãªãã¦ãªãã§ããï¼ããã©ã®Modelã«ãå±ããªããã¸ãã¹ãã¸ãã¯ãããæç¹ã§è¨è¨ããããã§ããï¼ãã¨æã£ã人ã¯å¹¸ç¦ã§ãããé ãã
- ã¡ãªã¿ã«ãã¸ãã¹ãã¸ãã¯ã©ãã«ç½®ãã¹ããè°è«ã¯ãPerlã³ãã¥ããã£çã«ã¯2008å¹´ã¨ãã®Catalystããããããããã®æç¹ã§å²ã¨çµè«ãåºã¦ãã
- è¦ã¯ãã¼ã¿ã½ã¼ã¹ã¨ãã¦ã®Modelã®åã«Logicï¼æ£ç´ããã«ä»ããååã¯ä½ã§ãããï¼ã¿ããã®ãç«ã¦ã¦ãããããè¤æ°ã®Modelãæä½ãã¦ãã¸ãã¹ãã¸ãã¯ãè¨è¿°ããã°ãããããã¨ãã話
- æå 輩ã®è¨ãæã§ã¯ããããããMySQLã®tableã¿ãããªãè£ã®ããã«ã¦ã§ã¢ã®ãã¼ã¿æ§é ã«ããã¿ãªå¯¾å¿ããã¢ããªã³ã°ãããã®ã¯çãæªããã¨ã¯å¤§ååããåãããã£ã¦ãããã確ãã«ã
- ã¾ãå¥ã®æå
輩ã®è¨ãæã§ã¯ãã90%ã®å ´åã¯ActiveRecordã®è«¸ã
ã®æ©è½ãé§ä½¿ããã°ä¸æãããã®ã§ãæ®ã10%ããã©ãã¼ããããã«ï¼ãã¬ã¼ã ã¯ã¼ã¯ã¨ãã¦ï¼ããã«ä¸ã¤ã¬ã¤ã¤ãåããå¿
è¦ã¯ãªãã¨æãã
- ãã¬ã¼ã ã¯ã¼ã¯ã¬ãã«ã§åããå¿ è¦ã¾ã§ã¯ç¢ºãã«ãªãæ°ããã
- ããå®ç¨çã«ã¯ããã£ã½ã©ã¹ã¢ã¼ã«ã§ããã¡ãã¿ãããªWebã¢ããªã±ã¼ã·ã§ã³ã§ããªãéããã¸ãã¹ãã¸ãã¯ãç½®ãã¬ã¤ã¤ãå¥éè¨ããæ¹ãã¹ãã¼ããªè¨è¨ã«ãªãã¨æããåãã¯åç´ãªCRUDã ãã«è¦ãã¦ãããã¸ãã¹ãã¸ãã¯ã¯æéãçµã¤ã«ã¤ãã¦è¥å¤§ãã
- ã¡ãªã¿ã«MVCãMVPãMVVMãPMãMVLCããã¿ãããªè©±ããããããã§ã¯ãªã
- ååã¨ãå®ç¾©ã¨ãå ã ã¯Smalltalkãã©ãã¨ãããããªè°è«ã¯ã©ãã§ããããã¾ã¨ãã§å¥ãããªéçºãè¡ãããã«ã¯ã©ãããè¨è¨ãããããããã ãã®è©±ã
ãã®è¾ºã®åé¡æèã£ã¦å®éã©ããªã£ã¦ãã®ããªããã¨æãã¤ã¤Rails AntiPatterns: Best Practice Ruby on Rails Refactoring (Addison-Wesley Professional Ruby Series)ã¨ãããæ¬ãèªãã§ããã¨ãéä¸ã¾ã§ã¯ãscopeã¨ãassociationã¨ãé§ä½¿ããã°ãããããã¨ããããªã ã£ãã®ã ãããªãã¨ãªãããã£ã½ãã©ã¤ãã©ãªã«è¡ãå½ãã£ãã
https://github.com/jamesgolick/active_presenter
ãã¾ã使ããã¦ãããããªé°å²æ°ãæããªãããã©ãããåé¡æèã®ãã人ã¯ããããããã¨ãããã¨ãããã£ãã
ç·åããã¨ããRailsã§ã¯ããæ¸ããã ããã¿ãããªãä½æ³ããããããªãããããå¿
è¦ã«å¿ãã¦ãã®è¾ºã¯ã¹ã«ã¼ãã¦èªåã®æãããã¹ãã¯ã©ã¹è¨è¨ãããã°ããããããªãããããã¨ããã®ãä»ã®çµè«ã
ï¼ãã¡ããããã¼ã ã¨ãã¦éçºãããã ã£ããã¡ããã¨ããåæããã£ãä¸ã§ãã®è©±ã§ããã©ãï¼
Webã¢ããªã±ã¼ã·ã§ã³ãã¬ã¼ã ã¯ã¼ã¯ãªãã¦æè©®ãã¬ã¼ã ã¯ã¼ã¯ã«éããªããã ãããããã«æ¯ãåãããã®ã¯ä¸æ¯ã§ããã