â
ãSymfonyããPHPãSymfonyé¢é£è³æã¨ãä½æ¥å·¥ç¨ã¨ãã®ã¡ã¢ãªã©
Railsç¨ä½¿ããããããªããã§ããã©ãã¾ã«ä»äºã¨ããããã§ãªãã¨ãªãã¡ã¢ã¡ã¢ãSymfonyã¯Deliciousã¨ãã§ä½¿ããã¦ããããã§ãããä»ã®ä¾ã¯ãã¾ãç¥ããªãã§ããã
Symfonyé¢é£ã®è³æã¯æ®éã«åè¡ããã¦ããæ¬ãããªã¼ã§æ²¢å±±èªããã®ãè¯ãã§ãã.ä¸åå3000åããã?ããã®ã§
ãã¨ããã«ãã¼é¢æ°ã¨ãã¯ããã¥ã¡ã³ãã¨ãè¦ãããã¯ãSymfonyæ¬ä½ã®ã½ã¼ã¹ãè¦ãã»ããç解ãéãã¨æãã¾ããã
å ¬å¼ãµã¤ã
- doctrine
- O/Rãããã¼ã¯Propelãããããã©ããæè¿ã¯doctrineã®ããã使ããã¦ã
- http://www.doctrine-project.org/
æ°ããã®è³æ
- A Gentle Introduction to symfony
- Symfonyå ¨è¬ã®å ¥éæ¸? ããã»ã©ããã§ãªã
- http://www.symfony-project.org/gentle-introduction/1_4/en/
- Practical symfony
- jobeetã¨ããjobåéãµã¤ãããã¥ã¼ããªã¢ã«å½¢å¼ã§ä½ããã¾ããã¥ã¼ããªã¢ã«çã«ãã£ã¦ãããããå®ä¾éçãªä½¿ãæ¹ãã§ãããã¨
- http://www.symfony-project.org/jobeet/1_4/Doctrine/en/
- The symfony Reference Book
- confãã¡ã¤ã«ã®è¨å®ã®èª¬æãã¡ã¤ã³. ã¾ãå½¹ã«ç«ã¤ãã¨
- http://www.symfony-project.org/reference/1_4/en/
- The More with symfony book
- æè¿ã®è³æ.ã¾ãã¡ãã£ã¨ããå¿ç¨tipsãªã©
- http://www.symfony-project.org/more-with-symfony/1_4/en/
å°ãå¤ãã®è³æ
- The Definitive Guide to Symfony(ver 1.2)
- The symfony and Doctrine book(ver 1.2)
ãã¼ãã·ã¼ã(çµæ§æ°ãã)
- symfony cheatsheet
- ã¾ã便å©ãã¨
- http://devcheatsheet.com/tag/symfony/
ã¾ããããã¸ãã®è³æèªãã§ããã°å¤§æµãªãã¨ããªããã¨ã
åè: ãã£ã¨ããä½æ¥å·¥ç¨ã¾ã¨ã
ã¾ãå人çãªå·¥ç¨ããªãã¨ãªãã¡ã¢ç¨ã«.
1. ãã¼ãã«ç¨schemaã®æ´æ° + ã¢ãã«ä½æ
- vi config/doctrine/schema.yml å¤æ´
- vi data/fixtures/~ ã§ãµã³ãã«ãã¼ã¿è¿½å ããã
- php symfony doctrine:build --all --and-loadã¨ãå®è¡
- 1ãã¼ãã«è¿½å ããã¨model * 3, filter * 2, form * 2ãã¡ã¤ã«æ°è¦ä½æãããã®ã§ã¨ããããgit addãªã©ãã
- vi lib/model/doctrine/~ ã§ã¢ãã«é¢æ°ã¨ãä½ã£ãããã
2. routing追å
3. module追å
- php symfony generate:module frontend nanka
- å®è¡ããã¨, action, template, functional testãã¡ã¤ã«ãªã©ä½æããããããã®ã§git addãªã©ãã
4. controller追å
- é©å½ã«ã³ã³ããã¼ã©è¿½å ããã
- vi apps/frontend/modules/receive/nanka/actions/actions.class.phpã«ã³ã³ããã¼ã©è¿½å
public function executeNanka(sfWebRequest $request) { }
5. viewã®è¿½å
- viewã¯ã³ã³ããã¼ã©åã«å¯¾å¿ããã®ã§å¯¾å¿ãããã¡ã¤ã«åã§ä½æãã
- ä¾ãã°executeNankaã³ã³ããã¼ã©ã«ã¯nankaSuccess.phpã¨ãã対å¿(åºæ¬çã«ã¯)
- vi apps/frontend/modules/receive/nanka/template/nankaSuccess.php
å¾ã¯1~5ããããç¹°ãè¿ããããããã¥ã¡ã³ãã¨ãæ¬ä½ã½ã¼ã¹ã¨ãè¦ããããã¨ãã£ãæããã¨