SlideShare a Scribd company logo
1 of 39
Download to read offline
symfony introduction
                     MITSUMUNE Tomohiro
                          2010/05/13




2010   5   13
About
                •          Web



                    •
                    • Mojavi + Ruby on Rails
                • PHP5
                •                 DRY KISS XP

2010   5   13
Features
                •   MVC

                •   URL Routing
                •   configuration
                •   ORM
                •   i18n
                •   scaffolding
                •   CLI
                •
2010   5   13
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
Basics



2010   5   13
MVC Archtecture




2010   5   13
project_root/    apps/     application_root/    config/
                                                                 i18n/
                                                                  lib/
                                                               modules/
                                                               templates/
                                cache/
                                config/
                                 data/
                                  lib/          model/
                                  log/
                                plugins/
                                symfony
                                 test/
                                 web/




2010   5   13
Project Initialize
                •
                    • symfony init-project [project_name]
                •
                    • symfony init-app [app_name]
                •
                    • symfony init-module [app_name]
                      [module_name]

2010   5   13
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
module directory
                modules/    sample/     actions/

                                        config/

                                          lib/

                                       templates/

                                        validate/

                           hogehoge/       ...


2010   5   13
Controller



2010   5   13
Actions




2010   5   13
Actions
                • executeXXX
                  • XXX          action

                  •            Routing

                •                View

                  •
                  •
2010   5   13
Routing


                •                 module       action

                • routing.yml
           http://www.yourdomain.com/[module_name]/[action_name]



2010   5   13
Routing




2010   5   13
User Session

                • PHP
                •                                   get/set

       $this->getUser()->setAttribute(‘notice’, ‘Hello,Wolrd!’)
       $this->setFlash(‘salt’, ‘password’)




2010   5   13
Filter

                •

                •


2010   5   13
View



2010   5   13
View
                • XXXSuccess.php
                 • XXX
                •
                    • XXXError.php
                    •                  action



2010   5   13
Helpers

                • function HTML
                 • Helper
                    • link_to, image_tag, form_tag
                 •            Helper



2010   5   13
Forms
                • 1.0 1.1
                • 1.0
                 • Form Helper
                • 1.1
                 • sfForm Class

2010   5   13
Validators
                • validation              2

                  • controller validateXXX
                  •                      yaml

                •       Validation class

                •            Validation class


2010   5   13
Validators




2010   5   13
Page Layout

                • decorator
                 • global layout
                 • action content


2010   5   13
Page Fragment
                •
                •
                •2
                  • controller view        components

                  • view              partial

                • _hogehoge.php
                               Fragment
2010   5   13
Page Fragment

                •
                    • include_partial
                    • include_component


2010   5   13
Model



2010   5   13
ORM
                • Object-Relational Mapping
                 •
                 • SQL
                 •                            OK

                • Propel
                 • 1.2        Doctrine
2010   5   13
schema


                •
                • YAML   (schema.yml)




2010   5   13
schema




2010   5   13
CLI

                • Model
                  • symfony propel-build-model
                •            schema       SQL

                  • symfony propel-build-sql

2010   5   13
DB Access

                •
                    •    = Class

                    •    = Object

                    •    = Property



2010   5   13
DB Access




2010   5   13
Cache



2010   5   13
Caching
                •
                    • controller
                    • view
                    • fragment
                    • configuration
2010   5   13
Caching
                •
                    • file
                    • database
                    • APC
                    • memcached

2010   5   13
Plugins



2010   5   13
Plugins

                •
                •
                •
                    • http://www.symfony-project.org/plugins/
                    •
2010   5   13
Plugins
                • install
                 • symfony plugin-install plugin_name
                • list
                 • symfony plugin-list
                • uninstall
                 • symfony plugin-uninstall symfony/
                    plugin_name

2010   5   13

More Related Content

Similar to symfonyイントロダクション

symfony_from_scratch
symfony_from_scratchsymfony_from_scratch
symfony_from_scratch
tutorialsruby
 
symfony_from_scratch
symfony_from_scratchsymfony_from_scratch
symfony_from_scratch
tutorialsruby
 
Structured web apps
Structured web appsStructured web apps
Structured web apps
Sheng Tian
 
OW2 JOnAS 5.0 Java EE AS- An OSGi Based Integration Platform - François Forna...
OW2 JOnAS 5.0 Java EE AS- An OSGi Based Integration Platform - François Forna...OW2 JOnAS 5.0 Java EE AS- An OSGi Based Integration Platform - François Forna...
OW2 JOnAS 5.0 Java EE AS- An OSGi Based Integration Platform - François Forna...
mfrancis
 
Joomladay Es 2009 - Nooku Framework
Joomladay Es 2009  - Nooku FrameworkJoomladay Es 2009  - Nooku Framework
Joomladay Es 2009 - Nooku Framework
Nooku
 
Symfony2 San Francisco Meetup 2009
Symfony2 San Francisco Meetup 2009Symfony2 San Francisco Meetup 2009
Symfony2 San Francisco Meetup 2009
Fabien Potencier
 
Drupal 8 - What’s cooking?
Drupal 8 - What’s cooking?Drupal 8 - What’s cooking?
Drupal 8 - What’s cooking?
Alkuvoima
 
Codemotion 2013 - Designing complex applications using html5 and knockoutjs
Codemotion 2013 - Designing complex applications using html5 and knockoutjsCodemotion 2013 - Designing complex applications using html5 and knockoutjs
Codemotion 2013 - Designing complex applications using html5 and knockoutjs
Fabio Franzini
 

Similar to symfonyイントロダクション (20)

symfony_from_scratch
symfony_from_scratchsymfony_from_scratch
symfony_from_scratch
 
symfony_from_scratch
symfony_from_scratchsymfony_from_scratch
symfony_from_scratch
 
Mozilla: Mozmill meets L10n
Mozilla: Mozmill meets L10nMozilla: Mozmill meets L10n
Mozilla: Mozmill meets L10n
 
A 20 minute introduction to AngularJS for XPage developers
A 20 minute introduction to AngularJS for XPage developersA 20 minute introduction to AngularJS for XPage developers
A 20 minute introduction to AngularJS for XPage developers
 
Structured web apps
Structured web appsStructured web apps
Structured web apps
 
Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.
Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.
Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.
 
OW2 JOnAS 5.0 Java EE AS- An OSGi Based Integration Platform - François Forna...
OW2 JOnAS 5.0 Java EE AS- An OSGi Based Integration Platform - François Forna...OW2 JOnAS 5.0 Java EE AS- An OSGi Based Integration Platform - François Forna...
OW2 JOnAS 5.0 Java EE AS- An OSGi Based Integration Platform - François Forna...
 
Yahoo! scale Node.js
Yahoo! scale Node.jsYahoo! scale Node.js
Yahoo! scale Node.js
 
10 clues showing that you are doing OSGi in the wrong manner - Jerome Moliere
10 clues showing that you are doing OSGi in the wrong manner - Jerome Moliere10 clues showing that you are doing OSGi in the wrong manner - Jerome Moliere
10 clues showing that you are doing OSGi in the wrong manner - Jerome Moliere
 
FOF Rapid Application Development on Joomla! - Joomla! Day Denmark 2012
FOF Rapid Application Development on Joomla! - Joomla! Day Denmark 2012FOF Rapid Application Development on Joomla! - Joomla! Day Denmark 2012
FOF Rapid Application Development on Joomla! - Joomla! Day Denmark 2012
 
Joomladay Es 2009 - Nooku Framework
Joomladay Es 2009  - Nooku FrameworkJoomladay Es 2009  - Nooku Framework
Joomladay Es 2009 - Nooku Framework
 
Symfony2 San Francisco Meetup 2009
Symfony2 San Francisco Meetup 2009Symfony2 San Francisco Meetup 2009
Symfony2 San Francisco Meetup 2009
 
YUI App Framework
YUI App FrameworkYUI App Framework
YUI App Framework
 
Drupal 8 - What’s cooking?
Drupal 8 - What’s cooking?Drupal 8 - What’s cooking?
Drupal 8 - What’s cooking?
 
Symfony framework-An overview and usability for web development
Symfony framework-An overview and usability for web developmentSymfony framework-An overview and usability for web development
Symfony framework-An overview and usability for web development
 
Components Approach to building Web Apps
Components Approach to building Web AppsComponents Approach to building Web Apps
Components Approach to building Web Apps
 
Drupal 8 - Quick bites
Drupal 8 - Quick  bitesDrupal 8 - Quick  bites
Drupal 8 - Quick bites
 
Codemotion 2013 - Designing complex applications using html5 and knockoutjs
Codemotion 2013 - Designing complex applications using html5 and knockoutjsCodemotion 2013 - Designing complex applications using html5 and knockoutjs
Codemotion 2013 - Designing complex applications using html5 and knockoutjs
 
Joomla
JoomlaJoomla
Joomla
 
Joomla
JoomlaJoomla
Joomla
 

More from Tomohiro MITSUMUNE (7)

B2B2Cなヘルスケアサービスの作り方
B2B2Cなヘルスケアサービスの作り方B2B2Cなヘルスケアサービスの作り方
B2B2Cなヘルスケアサービスの作り方
 
はじめてのSymfony2
はじめてのSymfony2はじめてのSymfony2
はじめてのSymfony2
 
About Haystack
About HaystackAbout Haystack
About Haystack
 
macbookについてみんなが誤解していること
macbookについてみんなが誤解していることmacbookについてみんなが誤解していること
macbookについてみんなが誤解していること
 
Linuxにおける開発環境
Linuxにおける開発環境Linuxにおける開発環境
Linuxにおける開発環境
 
15分でわかる分散バージョン管理システムgit
15分でわかる分散バージョン管理システムgit15分でわかる分散バージョン管理システムgit
15分でわかる分散バージョン管理システムgit
 
DOM Scripting ことはじめ
DOM Scripting ことはじめDOM Scripting ことはじめ
DOM Scripting ことはじめ
 

Recently uploaded

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Recently uploaded (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 

symfonyイントロダクション

  • 1. symfony introduction MITSUMUNE Tomohiro 2010/05/13 2010 5 13
  • 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
  • 5. Basics 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
  • 12. Actions 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
  • 15. Routing 2010 5 13
  • 16. User Session • PHP • get/set $this->getUser()->setAttribute(‘notice’, ‘Hello,Wolrd!’) $this->setFlash(‘salt’, ‘password’) 2010 5 13
  • 17. Filter • • 2010 5 13
  • 18. View 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
  • 27. Model 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
  • 30. schema 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
  • 34. Cache 2010 5 13
  • 35. Caching • • controller • view • fragment • configuration 2010 5 13
  • 36. Caching • • file • database • APC • memcached 2010 5 13
  • 37. Plugins 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