ãã¾ãç¥ããã¦ããªãï¼Webã¢ããªéçºæã®ï¼ï¼ã®ç¥èª ï¼ä¾æã¤ãï¼
ããªãã¼ã·ã§ã³ç³»
- ãµã¼ããªãï¼ãµã¼ããµã¤ãã»ããªãã¼ã·ã§ã³ï¼
- ã¯ã©ããªãï¼ã¯ã©ã¤ã¢ã³ããµã¤ãã»ããªãã¼ã·ã§ã³ï¼
- ã¢ãããªãï¼ã¢ãã«ã¯ã©ã¹ã«ããããªãã¼ã·ã§ã³ï¼
- ã³ã³ããªãï¼ã³ã³ããã¼ã©ã¯ã©ã¹ã«ããããªãã¼ã·ã§ã³ï¼
- ãã¼ããªãï¼DBä¸ã®å¶ç´ã«ããããªãã¼ã·ã§ã³ï¼
ã¡ã½ããåé¡ç³»
- ã¢ãã¡ã½ãï¼ã¢ãã«ã¯ã©ã¹å ã®ã¡ã½ããï¼
- ã³ã³ã¡ã½ãï¼ã³ã³ããã¼ã©ã¯ã©ã¹å ã®ã¡ã½ããï¼
- ãã«ã¡ã½ãï¼ãã«ãã¼ã¢ã¸ã¥ã¼ã«å ã®ã¡ã½ããï¼
ãã®ä»ç³»
- ã¯ã³ãã©ãï¼ï¼åã®ãã©ã³ã¶ã¯ã·ã§ã³ï¼
- ã³ããããï¼ã³ãã³ãããã³ãããã¾ãã¯ã³ãã³ãããã³ããã®ãããã§ãã·ã§ãã«ï¼
以ä¸è§£èª¬ãWebã¢ããªã®ã¢ã¼ããã¯ãã£ã®è©±ãå«ãã
ããªãã¼ã·ã§ã³ç³»
- ã¯ã©ããªï¼ã¯ã©ã¤ã¢ã³ããµã¤ãã»ããªãã¼ã·ã§ã³ï¼ï¼
- ãã©ã¦ã¶ä¸ã§ï¼JavaScriptãªã©ã使ã£ã¦ï¼submitåã«å ¥åå¤ã®ç°å¸¸ãæ¤åºããããªãã¼ã·ã§ã³æ¹å¼ã
- ãµã¼ããªï¼ãµã¼ããµã¤ãã»ããªãã¼ã·ã§ã³ï¼ï¼
- Webãµã¼ãä¸ã§ï¼submitãããHTTPãªã¯ã¨ã¹ãã解æãï¼ãªã¯ã¨ã¹ãã®ç°å¸¸ãæ¤åºããããªãã¼ã·ã§ã³æ¹å¼ã
ä¾æï¼
ã¯ã©ããªã ãã§ã¯ï¼ã¤ã³ã¿ã¼ãããå ¬éæã®ã»ãã¥ãªãã£ã«ç©´ãããã
ãã¨ãã£ã¦ãµã¼ããªã ãã§ã¯ï¼ãã©ã¦ã¶ä¸ã§ã®ã¦ã¼ã¶ããªãã£ãæªãã
ã ããï¼ãµã¼ããªãã¯ã©ããªãå¿ è¦ã ã
ããªãã¼ã·ã§ã³ãã¸ãã¯ã®å®è£ ç®æãéè¤ãããªãããï¼å·¥å¤«ãã¦è¨è¨ãããã
ãã®ã¢ããªã¯ã¤ã³ãã©ãããéå®ã ãï¼æ©è½ãããéããã¦ããã®ã§ï¼ã¯ã©ããªã ãã§æ¸ã¾ãã¾ãããã
éè¤ãã§ãã¯ãå®è£ ãã件ã§ããï¼ç»é¢ä¸ã§ã®éè¤ãããªãã¦ï¼
DBå ã§ã®éè¤ããã§ãã¯ãããã§ãããã
ããããã¨ãã£ãããµã¼ãå´ã«submitãå¿ è¦ã«ãªããã§ï¼ã¯ã©ããªããç¡çãªãã§ãã
é°ã§ãµã¼ããªãããåã«ã¯æ§ããªããã§ï¼Ajaxã§åãåããããã¾ããï¼
åèï¼
ã¯ã©ã¤ã¢ã³ããµã¼ãã·ã¹ãã ãã¨ãwebç³»ã·ã¹ãã ãã®éã
http://oshiete.goo.ne.jp/qa/2569501.html
ã¯ã©ã¤ã¢ã³ããµã¼ãã·ã¹ãã ã¨Webç³»ã®ã·ã¹ãã ã®éã
http://www.atmarkit.co.jp/bbs/phpBB/v...
ãµã¼ããªã¯ï¼ä»¥ä¸ã®ï¼ã¤ã«åé¡ãããã
- ã³ã³ããªï¼ã³ã³ããã¼ã©ã¯ã©ã¹ã«ããããªãã¼ã·ã§ã³ï¼ï¼
- ã³ã³ããã¼ã©ã¯ã©ã¹ã«ããããªãã¼ã·ã§ã³ãç»é¢é·ç§»ãã»ãã·ã§ã³ãªã©ï¼éä¿¡ã«é¢ãã妥å½æ§ãæ ä¿ããã
- ã¢ãããªï¼ã¢ãã«ã¯ã©ã¹ã«ããããªãã¼ã·ã§ã³ï¼ï¼
- ã¢ãã«ã¯ã©ã¹ã«ããããªãã¼ã·ã§ã³å®è£ ãã¢ããªã±ã¼ã·ã§ã³ä¸ã§ã®ãã¼ã¿ã¢ãã«ã®å¦¥å½æ§ãæ ä¿ããã
- ãã¼ããªï¼DBä¸ã®å¶ç´ã«ããããªãã¼ã·ã§ã³ï¼ï¼
- DBä¸ã®å¶ç´ã«ããããªãã¼ã·ã§ã³ãNOT NULLå¶ç´ãªã©ãDBä¸ã«å®éã«æ ¼ç´ãããå¤ã®å¦¥å½æ§ãæ ä¿ããã
- â»ã¤ã³ãã«ããã¼ã´ã¡ãã¬ãªã¼æåãã¨ããååã®æåãåå¨ããããã®ç¥èªã¯ãã®ååã彷彿ãããã
ä¾æï¼
Ruby on Railsã®Active Recordã«ã¯ï¼ã¢ãããªç¨ã®ã¡ã½ãããããããç¨æããã¦ããã
ä¾ãã°ï¼validates_numericality_of( ã«ã©ã å ) ã¨ããã¡ã½ããã使ãã¨ï¼
該å½ã«ã©ã ã«ç»é²ãããäºå®ã®å¤ãæå¹ãªæ°å¤ãã©ããï¼ããªãã¼ã·ã§ã³ã§ããã
Strutsã®Validatorãã©ã°ã¤ã³å©ç¨æã«ã¯ï¼ã¾ãstruts-config.xmlå ã§Formã¯ã©ã¹ãæå®ãï¼
次ãã§validation.xmlå ã§ï¼ãã®Formã«å¯¾ãã¦æ¤è¨¼ã«ã¼ã«ãè¨è¿°ããã
ãã®ã¢ã¼ããã¯ãã£ã§ã¯ï¼æ°¸ç¶åã¬ã¤ã¤ï¼ã¨ã³ãã£ãã£ï¼ã§ã¯ãªããã©ã¼ã ãæ¤è¨¼å¯¾è±¡ãªã®ã§ï¼
ã¦ã¼ã¶å ¥åå¤ã¯ã³ã³ããªããã¦ããã¨è¨ããã
ããéåæãæããå ´åã¯ï¼Hibernate Validatorã使ã£ã¦ï¼æ¤è¨¼å¯¾è±¡ã®æ¦å¿µãå¤ãã¦ãã¾ããã
ããããã°ã¢ãããªã¨å¼ã¹ãã
Railsã§ã¯ï¼config/routes.rb å ã«ã«ã¼ãã£ã³ã°æ å ±ãæ¸ãã
ãã®ä¸ã«requirementså±æ§ãå«ãããã¨ã«ããï¼URLã«å¤ãªå¼æ°ãå ¥ã£ã¦ããªãããã«ã¯ããäºãã§ããã
ãã®ã¢ã¼ããã¯ãã£ã§ã¯ï¼ãµã¼ãå¢çã®å¤å´ã®æ å ±ãããªãã¼ã·ã§ã³ãã¦ããã®ã§ï¼
ããã¯ãµã¼ããªã®ä¸ã§ãã³ã³ããªã®ä¸ç¨®ã§ããã¨è¨ããã
ããã§ã¯ï¼éç¨æ å½è ãCUIã§DBæ´æ°ããããããã ã
ã ããï¼ã¹ãã¢ãããã·ã¼ã¸ã£ã§ãã¼ããªãä½ãè¾¼ãã©ããªãã¨ï¼éç¨ãã¹ã«å¯¾å¦ã§ããªããã
AãããDBã®ã«ã©ã ã®ãåãã£ã¦ï¼ããªãã¼ã·ã§ã³ã®ä¸ç¨®ãªã®ããªï¼
ãåãããã°ï¼å¤ãªå¤ãç»é²ãããªãããã«ã¯ãããããã
ãä¾ãã°INTEGERãªãï¼æ°å¤ä»¥å¤ã®å¤ãå ¥ããªãããã«ãããã¯ã§ãããã©ãã
Bããããã質åã ãã
ããã¼ã¿ã®ç¶æ ã«ã¯ï¼æ£å¸¸ã¨ç°å¸¸ã®ï¼ãã¿ã¼ã³ãããã
ãç¾å¨ã®ç¶æ ãæ£å¸¸ãªã®ãç°å¸¸ãªã®ããå¤å®ãããè¡çºããããªãã¼ã·ã§ã³ã ã
ãããã«å¯¾ãåã¨ããã®ã¯ï¼ããããç°å¸¸ãªç¶æ ã許ããªãããã
ãåã¯ï¼ãã®åã®éãï¼ç©ççã§éçãªãå ¥ãç©ãã®ãããªãã®ãªãã ã
ãã
ãä¸æ¹ããªãã¼ã·ã§ã³ã¯ããè«ççã§ï¼ç¥è½çã§ï¼åçãªãæ´»åãã¨å¼ã¹ããããããªããã
Aãããã¸ãã確ãã«ï¼å ±éç¹ã¨ç¸éç¹ããããã
ããããï¼DBã®ã«ã©ã ã« VARCHAR(255) ã¨ããåãå²ãå½ã¦ããï¼
ããããã255ãè¶ ããæåã¯å ¥ããªãããã ããï¼
ããã®åã¨ãããã®èªä½ã¯ï¼ãã¼ããªã§ã¯ãªãããã ããã
Bãããããè¨ããã¨æãããéã«ï¼ããTEXTåã®ã«ã©ã ãããã¨ãã¦ï¼
ãã¬ã³ã¼ãINSERTæã®ããªã¬ã§ã¹ãã¢ããå¼ã³åºãã¦ï¼
ããã®ã«ã©ã ã«ç»é²ãããã¨ãã¦ããå¤ã255æå以å ããã§ãã¯ããï¼
ãã¨ããæ¤è¨¼è¡çºãå®è£ ããå ´åï¼ããã¯ãã¼ããªã¨å¼ã¹ãã ããããã
Aãããåãèãæ¹ã§ï¼HTMLã®inputè¦ç´ ã«maxlengthå±æ§ãä»ä¸ãã¦ï¼
ãå ¥åå¤ãå¶éããå ´åãï¼ããã¯ã¯ã©ããªã§ã¯ãªãï¼
ãä¸ç¨®ã®ãåãã«è¿ãã¨ããäºã«ãªãã®ããªãã
Bããããã®å ´åï¼éçå¶ç´ã¨åçå¶ç´ã®ãã¡ã§ã¯åè ã«åé¡ããããããã
ã確ãã«å¶ç´ã§ã¯ãããã ãã©ï¼ã¯ã©ããªã§ã¯ãªãã¨æãããã
åèï¼
ã¤ã³ãã®æååå¸ï¼ãã¼ã´ã¡ãã¬ãªæå
http://www.aa.tufs.ac.jp/i-moji/tenji...
Strutsã§ä½ãã»ãã¥ã¢Webã¢ããªã±ã¼ã·ã§ã³ Validatorãå©ç¨ããå ¥åå¤ãã§ãã¯ã®æ³¨æç¹
http://www.atmarkit.co.jp/fsecurity/r...
Hibernate Validatorã使ã
http://www.grandnature.net/blog/archi...
- ã¨ã³ãã£ãã£ã¯ã©ã¹ã«ã¢ããã¼ã·ã§ã³ã§å¶ç´ãè¨è¿°ããã
- æ¤è¨¼ã«ã¼ã«ã«åããå¤ãã»ãããã¦save()ããã¨ä¾å¤ãæããã
ãªããã³ã³ããªãã¨ãã¢ãããªãã¯ï¼ä¸è¬çã«ãåºå¥ããã¦ããåå¨ã ã
æ¸ç±ãJ2EEãã¿ã¼ã³ãã§ï¼ãã¬ã¼ã³ãã¼ã·ã§ã³å±¤ã®è¨è¨é
ç®ã¨ãã¦ãããªãã¼ã·ã§ã³ããæ±ã£ãè¦åºããããã
ï¼ç¬¬ï¼çãªãã»ã¯ã·ã§ã³3.1.3ï¼
ãã®ä¸ã§ã¯ï¼Webã·ã¹ãã ã®ããªãã¼ã·ã§ã³ã¯ï¼ä¸è¨ã®ãããªåé¡ã«ãªã£ã¦ããï¼
- ã¯ã©ã¤ã¢ã³ãå´ã§ã®ããªãã¼ã·ã§ã³ï¼ï¼ã¯ã©ããªï¼
- ãµã¼ãå´ã§ã®ããªãã¼ã·ã§ã³ï¼ï¼ãµã¼ããªï¼
- ãã©ã¼ã ãã¼ã¹ã®ããªãã¼ã·ã§ã³ï¼ï¼ã³ã³ããªï¼ï¼éè¤ãå¢å ããããããã©ã¼ã ãå¢ããããã®åã ãï¼ã¢ãã«ã®æ§è³ªãè¨è¿°ããç®æãå¢ãã¦ãã¾ãããã
- æ½è±¡åãã¼ã¹ã®ããªãã¼ã·ã§ã³ï¼ï¼ã¢ãããªï¼ï¼çµå度ãä½ãæ±ç¨çã«ãªããã¢ãã«ã®ç¶æ ã¨APã®ãã¸ãã¯ãåé¢ã§ããããã
注ï¼
J2EEãã¿ã¼ã³ã®åçå ¬éã¯2001å¹´4æãç´åã®JDKãã¼ã¸ã§ã³ã¯1.3ï¼2000å¹´5æï¼
http://www.exa-corp.co.jp/techinfo/re...
http://ja.wikipedia.org/wiki/Java#.E3...
æ¸ç±ãJ2EEãã¿ã¼ã³âææãåããè¨è¨ã®æ¦ç¥ãã®åçã®çºå£²ã¯2002å¹´7æï¼ï¼çã¯2005å¹´5æ
http://www.amazon.co.jp/dp/4894714345/
http://www.amazon.co.jp/dp/4822282287/
ãªãã ãã©ãï¼ãããã¯é¦è¨³ã®åºçæ¥ã§ããï¼åèãCore J2EE Patternsãã®ç¬¬ï¼çã®åºçæ¥ã¯2003å¹´6æã
ãªã®ã§ï¼J2SE5.0ï¼2004å¹´9æï¼ã§Javaãå¥è¨èªã«ãªã£ã¦ãã¾ããããåã«æ¸ãããæ¬ã
http://www.amazon.co.jp/dp/0131422464/
第2çã§ã¯Active Recordãã¿ã¼ã³ã追å ããï¼Ruby on Railsã«å½±é¿ãä¸ãã
http://thinkit.co.jp/article/941/1?pa...
ã¡ã½ããåé¡ç³»
- ã¢ãã¡ã½ï¼ã¢ãã«ã¯ã©ã¹å
ã®ã¡ã½ããï¼ï¼
- ã¢ãã«ã¯ã©ã¹å ã®ã¡ã½ããããã¼ãã«åä½ã§ã®CRUDæä½ãï¼ãã¸ãã¹ãã¸ãã¯ãè¨è¿°ããã
- ã³ã³ã¡ã½ï¼ã³ã³ããã¼ã©ã¯ã©ã¹å
ã®ã¡ã½ããï¼ï¼
- ã³ã³ããã¼ã©ã¯ã©ã¹å ã®ã¡ã½ãããã¢ãã«ã¨ãã¥ã¼ã®ä»²ä»å½¹ãæããã
- ãã³ã³ã½ã¡ãã¨ããè¨èã«ä¼¼ã¦ããã
- ãã«ã¡ã½ï¼ãã«ãã¼ã¢ã¸ã¥ã¼ã«å
ã®ã¡ã½ããï¼ï¼
- ãã«ãã¼ã¢ã¸ã¥ã¼ã«å ã®ã¡ã½ããããã¥ã¼ãæç»ããããã®ãã¸ãã¯ãè¨è¿°ããã
- 平仮åã§ãã¸ããããã¨æ¸ãã¨ï¼ãªãã ãããããã
â»ãªãï¼Strutsã®taglibã¯ãã«ãã¼ã®ä¸ç¨®ã§ãããView-Helperãã¿ã¼ã³ãç¥ããªãã§taglibã使ã£ã¦ããå ´åã¯ï¼ä¸åº¦J2EEãã¿ã¼ã³ãå¦ãã§ãããã¨ã
ä¾æï¼
Cookieã®å¦çï¼å ±éã®ã³ã³ã¡ã½ã«åãåºãã¦ããã¾ããã
ãã«ã¡ã½ã¯ï¼ãã¥ã¼ãæ¸ãããã®DSLã ã
ããããã°ï¼ãã¥ã¼ã®ã½ã¼ã¹ã³ã¼ããã¡ã¤ã«ã¯ï¼ãã®ã¾ã¾ç»é¢è¨è¨æ¸ã¨ãã¦å©ç¨ã§ããã
ã¢ãã¡ã½ã¨ãã«ã¡ã½ã®å½¹å²åæ ãæ··åããªãããã«æ°ãã¤ãã¾ãããã
ãã¼ã¿æ§é ã«é¢ããå¦çã¯ï¼ã¢ãã¡ã½ã«è¨è¿°ãã¾ãã
è¦ãæ¹ã«é¢ããå¦çã¯ï¼ãã«ã¡ã½ã«è¨è¿°ãã¾ãã
ä¾ãã°ï¼DBã®ç¹å®ã®ã«ã©ã å ã«ï¼ã«ã³ãåºåãã§è¤æ°ã®æ°å¤ãæ ¼ç´ããã¦ããã¨ãã¾ãã
ããã¦ï¼ãããã®æ°å¤ããã©ã¦ã¶ä¸ã§ãªã¹ãå½¢å¼ã§è¡¨ç¤ºãããã¨ãã¾ãã
ãã®æã®ã¢ãã¡ã½ã®å½¹ç®ã¯ï¼ã«ã©ã ã®ä¸èº«ãã«ã³ãã§splitãï¼
é åã¨ãããæ±ãããããã¼ã¿æ§é ãã§è¿ããã¨ã ãã§ãã
ä¸æ¹ï¼ãã«ã¡ã½ã®å½¹ç®ã¯ï¼é åãåãåãï¼
é åã®åè¦ç´ ã«å¯¾ãã¦HTMLã®liè¦ç´ ãä»å ãï¼çµåãã¦æååã¨ãã¦è¿ããã¨ã§ãã
ã¢ãã¡ã½ã¨ãã«ã¡ã½ã®éã®é¨åã§æã¡ã¾ãã£ã¦ãããã¼ã¿ãï¼
æååã§ã¯ãªãé åã®ãããªãå å·¥ããããæ½è±¡çãªãã¼ã¿æ§é ã
ã§ããç¹ã«æ³¨æãã¦ãã ããã
ãªãï¼ã¢ãã¡ã½ã®åãããã¼ã¿ãï¼ãã«ã¡ã½ã®æ¸ãã¦ãããã¥ã¼ã«ã¾ã§å±ããã®ã¯
仲ä»å½¹ã§ããã³ã³ã¡ã½ã®å½¹å²ã§ãã
åèï¼
Ruby on Railsã®Modelå ã«è¨è¿°ããã¡ã½ããã®åé¡è¡¨
http://language-and-engineering.hatenablog.jp/entry/20100901/p1
ãã®ä»
- ã¯ã³ãã©ï¼ï¼åã®ãã©ã³ã¶ã¯ã·ã§ã³ï¼ï¼
- æ¥åä¸ã²ã¨ããã¾ãã¨ã¿ãªããã¼ã¿å¦çè¡çºãå¤é¨è¨è¨æã«ï¼ç»é¢ãæ©è½ãåå²ããéã®åºæºã«ãªãã
- ãã¯ã³ããããã©ããåç©ãé£æ³ãããã
- ã³ãããï¼ã³ãã³ãããã³ãããã¾ãã¯ã³ãã³ãããã³ããã®ããï¼ï¼
- Webã¢ããªã±ã¼ã·ã§ã³ã«éå®ããï¼éçºæã«ä½ãã¨ãä¸è©±ã«ãªãWindowsã®ã·ã§ã«ãã¾ãã¯ï¼ããã使ãããªãã人ã®ãã¨ã
- ããã¯ãããã®ãããªç¥ãæ¹ãèªå°¾ãããããã§çµããã®ã§ï¼ã³ãã³ãããã³ãããæãã®ãï¼ããã¨ãããã使ãããªã人ã®ãã¨ãæãã®ããä¸æã¨ããç½ ãããã
ä¾æï¼
æ©è½å®ç¾©æ¸ããå¦çã®åä½ããããã®ã§ï¼ããã§ããã£ãã¯ã³ãã©ãã¨ã«ï¼
ããããå ¥åç»é¢ã¨å®äºç»é¢ãè¨è¨ãã¦ããã¾ãããã
ã³ãããã使ãããªããããã«ãªã£ããï¼ããªããã³ãããã¨å¼ãã§ããããã
åèï¼
誰ãæãã¦ãããªãç¨èªéãã³ããã
http://wiki.livedoor.jp/nobo_i0902/d/...
ãããã®ç¥èªã使ã£ã¦ããç¶æ³
使ã£ã¦ããç¶æ³
- æ¥å¸¸ä¼è©±
- ãã¼ãã£ã³ã°
- SVNã³ãããæã®ãã°
- ã½ã¼ã¹ã³ã¼ãã®ã³ã¡ã³ãï¼ãã ãxDocã®å©ç¨ç¶æ³ã«ããï¼
- ä»æ§ã¡ã¢ããªã©
- ç¹ã«ï¼å¼µãè©°ãã空æ°ã®ç¶æ³ã§ï¼ããããç¥èªãæèçã«ä½¿ããã¨ã«ãã£ã¦é°å²æ°ãåããããã¨
使ã£ã¦ã¯ãããªãç¶æ³
- ç´åããããã¥ã¡ã³ã
- ãªãã£ã·ã£ã«ãªä¼è°ããªã©
ã