Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

symfonyイントロダクション

2,265 views

Published on

symfony触ったことない人向けの資料です。

Published in: Technology
  • Be the first to comment

symfonyイントロダクション

  1. 1. symfony introduction MITSUMUNE Tomohiro 2010/05/13 2010 5 13
  2. 2. About • Web • • Mojavi + Ruby on Rails • PHP5 • DRY KISS XP 2010 5 13
  3. 3. Features • MVC • URL Routing • configuration • ORM • i18n • scaffolding • CLI • 2010 5 13
  4. 4. Version 1.0 2007 1.0.22 1.1 1.2 1.2 1.0 1.3 1.2 1.4 2.0 1.X http://www.symfony-project.org/installation 2010 5 13
  5. 5. Basics 2010 5 13
  6. 6. MVC Archtecture 2010 5 13
  7. 7. project_root/ apps/ application_root/ config/ i18n/ lib/ modules/ templates/ cache/ config/ data/ lib/ model/ log/ plugins/ symfony test/ web/ 2010 5 13
  8. 8. Project Initialize • • symfony init-project [project_name] • • symfony init-app [app_name] • • symfony init-module [app_name] [module_name] 2010 5 13
  9. 9. Project Initialize • • 1.0 1.4 • 1.0 • symfony init-module app_name module • 1.4 • symfony generate:module app_name module 2010 5 13
  10. 10. module directory modules/ sample/ actions/ config/ lib/ templates/ validate/ hogehoge/ ... 2010 5 13
  11. 11. Controller 2010 5 13
  12. 12. Actions 2010 5 13
  13. 13. Actions • executeXXX • XXX action • Routing • View • • 2010 5 13
  14. 14. Routing • module action • routing.yml http://www.yourdomain.com/[module_name]/[action_name] 2010 5 13
  15. 15. Routing 2010 5 13
  16. 16. User Session • PHP • get/set $this->getUser()->setAttribute(‘notice’, ‘Hello,Wolrd!’) $this->setFlash(‘salt’, ‘password’) 2010 5 13
  17. 17. Filter • • 2010 5 13
  18. 18. View 2010 5 13
  19. 19. View • XXXSuccess.php • XXX • • XXXError.php • action 2010 5 13
  20. 20. Helpers • function HTML • Helper • link_to, image_tag, form_tag • Helper 2010 5 13
  21. 21. Forms • 1.0 1.1 • 1.0 • Form Helper • 1.1 • sfForm Class 2010 5 13
  22. 22. Validators • validation 2 • controller validateXXX • yaml • Validation class • Validation class 2010 5 13
  23. 23. Validators 2010 5 13
  24. 24. Page Layout • decorator • global layout • action content 2010 5 13
  25. 25. Page Fragment • • •2 • controller view components • view partial • _hogehoge.php Fragment 2010 5 13
  26. 26. Page Fragment • • include_partial • include_component 2010 5 13
  27. 27. Model 2010 5 13
  28. 28. ORM • Object-Relational Mapping • • SQL • OK • Propel • 1.2 Doctrine 2010 5 13
  29. 29. schema • • YAML (schema.yml) 2010 5 13
  30. 30. schema 2010 5 13
  31. 31. CLI • Model • symfony propel-build-model • schema SQL • symfony propel-build-sql 2010 5 13
  32. 32. DB Access • • = Class • = Object • = Property 2010 5 13
  33. 33. DB Access 2010 5 13
  34. 34. Cache 2010 5 13
  35. 35. Caching • • controller • view • fragment • configuration 2010 5 13
  36. 36. Caching • • file • database • APC • memcached 2010 5 13
  37. 37. Plugins 2010 5 13
  38. 38. Plugins • • • • http://www.symfony-project.org/plugins/ • 2010 5 13
  39. 39. Plugins • install • symfony plugin-install plugin_name • list • symfony plugin-list • uninstall • symfony plugin-uninstall symfony/ plugin_name 2010 5 13

×