fuelphpã®ãã¼ãã·ã¼ããä½ã£ãæã®è©±
ä½æ¥ãã°ããã®ã¯ãã¡ãã§ãã
http://mkkn.info/cheat/fuelphp/db
http://mkkn.info/cheat/fuelphp/base
å®è£ æ¦è¦
ãã¾ããããããã®ãæ®éã«ä½ãã®ããªãã ã,ã©ããããã®ããªãã¨ãããã³ãã®ã®ããã¯ã¨ãåã£ã¦ã¿ãã®ãèå³ã¯ãã£ããã ãã©ã¾ãããã©ãããããã£ã¦äºã§ããã¼ã¿ã®æ§é åå¨ããã
ãã¾ãæåã«èããã®ã¯ãã³ãã¬ã¼ã+ãã¼ã¿ã®æ§é ã¯å¿ é ã¨ãããã¨ããã¼ãã·ã¼ãããã¿æ¸ãã§æ¸ããããªãããã¨ãã¼ã¿ã¯DBã«å ¥ããªãããã¼ãã·ã¼ããã¨ãã§DBãªãã使ããããªããä¸ç¬sqliteãèãããã©,ã½ã¬ãããã£ã±ãåé·ããããããã¹ããã¼ã¹ã§ååã ã
ããã¨fuelã§ãã£ããã¬ã¤ã¢ã¦ããã¥ã¼ã®å½¢ã確ç«ããããªãã¨ããã®è¾ºã®ä½æ¥ããã¨ãã¾ããã
ãã¼ã¿ä½æ
ãã¨ãããã,ãã¼ã¿ããä½ã£ã¦ãããæ£è¦è¡¨ç¾ã¨ãã¬ãªã¬ãªä½¿ã£ã¦æ¥µå楽ããªãããããããæ2ç»é¢æãã¨ä¾¿å©ããªãã¨ãæãã
ãã¾ããã¼ã¿ãä½æãã段éã§ã¯Viewã®äºã¯èããªããããããæ§æã«ãªãã¹ãã ããªãã¨ãæããªããæ±ç¨çã«è¨è¨/ä½æ¥ããããã¨ããViewå´ã§å¿ è¦ãªãã¼ã¿ã追å ããæã«ã¹ãã¼ãã¬ãã«ã®åé¡ãçºçããã¨åå¼·ã«ãªããã ããããã¦Viewã®äºã¯èããªãã
ãçµå±ãã£ã±ãURLããããããã?ã¨ãtitle使ããªãã?ã¨ãåºã¦ãããã©ã¹ãã¼ãã¬ãã«ã®åé¡ã¯åºãªãã£ããè¯ãã£ãè¯ãã£ãã
ãYFMå½¢å¼ã«ãã¦YFMãã¼ãµã¾ã§ç¨æããã®ã«çµå±ããã¥ã¡ã³ããããã¯ã¯ä½¿ããªãã£ããå¾ã ã§ãã¶ã¤ã³ä¿®æ£ããæã«ã¯ã¾ã使ãããã
ãã¶ã¤ã³ã¨ãããhtmlã³ã¼ãã£ã³ã°
ããã¶ã¤ã³ããç¨å¤§å±¤ãªããã§ããªããã¾ã äºã¤ãããªããã¨ããããä»ã¯åå¥ãã³ãã¬ã¼ãã§ãã¡ãã£ã¨åã¾ã§ã¯DRY!!DRY!!ã§ã³ããã³ã¼ããå¿é¿ããå¾åããã£ããã©ãçµå±ã½ã¬ãããç¡é§ã«ããã°ã©ã ãè¤éåãããã ãã ã£ã¦æ°ä»ãã¦ããã¯ç©æ¥µçã«ã³ãããã¦ã³ã¼ãã®éè¤ãããç¨åº¦ã¯è¨±ãããã«ãã¦ããã
ããªã¹ãé¨åã®æ´å½¢ã¯ãã¼ã¸ã£ã¨ããå ±éåãããæã§ã¯ãããã§,ãã¼ã¿ã5ã¤ãããæºã¾ã£ããã¾ã¨ãã«ViewModelã¨ãã§åè¨è¨ããããããã¨è¨ãæãç®è«è¦ã§ãã
ããããã¨htmlã®ä¸ã«scriptã¨ãstyleã¨ãæ¸ãã®å¥½ããViewãã³ãã¬ã¼ãã®æåã®PHPãããã¯ã«ç´°ããå¦çãæ¸ãã®ã好ããtitleã¨ãå¤é¨script/cssã®æå®ã¿ãããªãã³ãã¬ã¼ãä¾åæ å ±ã¯ãããã§æ¸ãã¹ãã ã£ã¦æã£ã¦ãã
ææ³/課é¡
ããã¹ãããªãããããã¼ã«ã«ãã¹ãã¯ãã¦ããã©ããtwitterbootstrapã®ã¬ã¹ãã³ã·ã使ã£ã¦ãã®ã«ã¹ããã§æé©åããã¦ãªããâ¦ãããã趣å³éçºãã¹ãã¼ã¸ã³ã°ãã¹ããããã¯ããã¹ãã ãªãã£ã¦æãã¾ããããã¨ã¯ã¾ãç´°ããæã§æéãããéããã¨ãããå¤ãªé¨åã§åãã®ã¯ããå æ¸ã«è¾ããã(ã§ããæåã£ããViewModelã使ãå§ããªãã£ãã®ã¯è©ä¾¡ããã)ã
ãã¾ããã¼ã¿ã®ä½æãããã¯ãããã®ã¯å人çã«è¯ãã£ããªãã¨ããã£ã¤ãæ çµã¿ã ãä½ã£ã¦çµå±ãã¼ã¿ã®ä½æãé¢åã¨ãã§æãããã¨å¤ãããã¨å©ç¨å´(View)ãæèããã«ãã¼ã¿ãè¨è¿°ããäºã§ç ´ç¶»ãå°ãªã,æ±ç¨çãªãã¼ã¿ã«ãªããä»æ§å¤æ´ã«ãèããã,å¤ç¨éå±éããããã
ä»å¾
ãã¨ããããã¾ããã¼ã¿ããã£ã±ãä½ã£ã¦è¨ã£ã¦ã¼ã¿ãããªæãããªãã¨ã ã
ã