More Related Content
Similar to symfonyイントロダクション (20)
More from Tomohiro MITSUMUNE (7)
symfonyイントロダクション
- 2. About
• Web
•
• Mojavi + Ruby on Rails
• PHP5
• DRY KISS XP
2010 5 13
- 3. Features
• MVC
• URL Routing
• configuration
• ORM
• i18n
• scaffolding
• CLI
•
2010 5 13
- 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
- 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. Project Initialize
•
• symfony init-project [project_name]
•
• symfony init-app [app_name]
•
• symfony init-module [app_name]
[module_name]
2010 5 13
- 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. module directory
modules/ sample/ actions/
config/
lib/
templates/
validate/
hogehoge/ ...
2010 5 13
- 13. Actions
• executeXXX
• XXX action
• Routing
• View
•
•
2010 5 13
- 14. Routing
• module action
• routing.yml
http://www.yourdomain.com/[module_name]/[action_name]
2010 5 13
- 16. User Session
• PHP
• get/set
$this->getUser()->setAttribute(‘notice’, ‘Hello,Wolrd!’)
$this->setFlash(‘salt’, ‘password’)
2010 5 13
- 19. View
• XXXSuccess.php
• XXX
•
• XXXError.php
• action
2010 5 13
- 20. Helpers
• function HTML
• Helper
• link_to, image_tag, form_tag
• Helper
2010 5 13
- 21. Forms
• 1.0 1.1
• 1.0
• Form Helper
• 1.1
• sfForm Class
2010 5 13
- 22. Validators
• validation 2
• controller validateXXX
• yaml
• Validation class
• Validation class
2010 5 13
- 24. Page Layout
• decorator
• global layout
• action content
2010 5 13
- 25. Page Fragment
•
•
•2
• controller view components
• view partial
• _hogehoge.php
Fragment
2010 5 13
- 26. Page Fragment
•
• include_partial
• include_component
2010 5 13
- 28. ORM
• Object-Relational Mapping
•
• SQL
• OK
• Propel
• 1.2 Doctrine
2010 5 13
- 29. schema
•
• YAML (schema.yml)
2010 5 13
- 31. CLI
• Model
• symfony propel-build-model
• schema SQL
• symfony propel-build-sql
2010 5 13
- 32. DB Access
•
• = Class
• = Object
• = Property
2010 5 13
- 35. Caching
•
• controller
• view
• fragment
• configuration
2010 5 13
- 36. Caching
•
• file
• database
• APC
• memcached
2010 5 13
- 38. Plugins
•
•
•
• http://www.symfony-project.org/plugins/
•
2010 5 13
- 39. Plugins
• install
• symfony plugin-install plugin_name
• list
• symfony plugin-list
• uninstall
• symfony plugin-uninstall symfony/
plugin_name
2010 5 13