0
Symfony: A brief introduction
Me <ul><li>PHP Developer @ Teabag Studios </li></ul><ul><li>Magento, Zend Framework, Symfony </li></ul>http://www.craig-wi...
What is Symfony? <ul><li>PHP MVC Framework </li></ul><ul><li>RoR, Mohavi </li></ul><ul><li>Goal </li></ul><ul><ul><li>Spee...
Symfony: History http://en.wikipedia.org/wiki/Symfony
Installation <ul><li>Windows/Mac/Linux </li></ul><ul><li>Apache, PHP 5, MySQL, mod_rewrite </li></ul><ul><li>Command Line ...
Installation: continued <ul><li>PHP folder (/usr/share/php/symfony) </li></ul><ul><li>Symbolic Link – /usr/bin/ </li></ul>
Installation: continued 2 <ul><li>Multiple versions </li></ul><ul><ul><ul><li>symfony14 -V, symfony10 -V </li></ul></ul></ul>
Project Setup <ul><li>CLI </li></ul>
Project File/Folder Structure
Frontend/Admin <ul><li>frontend_dev.php, admin_dev.php </li></ul><ul><li>Debug Toolbar – symfony 1 st  to introduce </li><...
http://localhost/craig_app/web/frontend_dev.php
Models <ul><li>schema.yml, schema.xml </li></ul><ul><li>Autogenerate models </li></ul><ul><li>SQL </li></ul><ul><li>Fixtur...
schema.xml example
Building models
Models: continued <ul><li>StaticPage.php  </li></ul><ul><ul><li>object represents single record of static_page </li></ul><...
Examples
Actions - Modules <ul><li>Index.php, frontend_dev.php -> actions </li></ul><ul><li>Create module </li></ul>
View <ul><li>3 parts </li></ul><ul><ul><li>Action </li></ul></ul><ul><ul><li>View </li></ul></ul><ul><ul><li>Route (option...
Forms/Validation <ul><li>Based on Propel/custom </li></ul><ul><li>Labels, widgets, defaults, validators </li></ul><ul><li>...
Widgets and Validators
Admin Generator <ul><li>Quick/easy admin system </li></ul><ul><li>Modular </li></ul><ul><li>Based on Propel </li></ul><ul>...
Example
Plugins <ul><li>Extend Symfony functionality easily </li></ul><ul><li>Extend existing libraries for Symfony </li></ul><ul>...
Community <ul><li>Forum -  http://forum.symfony-project.org </li></ul><ul><li>IRC  –  Freenode - #symfony  </li></ul><ul><...
Applications/Websites <ul><li>Yahoo! Bookmarks </li></ul><ul><li>Yahoo! Answers </li></ul><ul><li>DailyMotion </li></ul><u...
Where next? <ul><li>http://www.symfony-project.org/gentle-introduction/1_4/en/ </li></ul><ul><li>Jobeet </li></ul><ul><ul>...
Questions?
Upcoming SlideShare
Loading in...5
×

Symfony: A Brief Introduction

1,137

Published on

Presentation for Leeds PHP User Group - July 2010

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,137
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
16
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Symfony: A Brief Introduction"

  1. 1. Symfony: A brief introduction
  2. 2. Me <ul><li>PHP Developer @ Teabag Studios </li></ul><ul><li>Magento, Zend Framework, Symfony </li></ul>http://www.craig-willis.co.uk http://www.twitter.com/craig_willis
  3. 3. What is Symfony? <ul><li>PHP MVC Framework </li></ul><ul><li>RoR, Mohavi </li></ul><ul><li>Goal </li></ul><ul><ul><li>Speed up creation, maintenance/replace repetition </li></ul></ul><ul><ul><li>Robust enterprise applications </li></ul></ul><ul><ul><li>Full control of configuration </li></ul></ul>
  4. 4. Symfony: History http://en.wikipedia.org/wiki/Symfony
  5. 5. Installation <ul><li>Windows/Mac/Linux </li></ul><ul><li>Apache, PHP 5, MySQL, mod_rewrite </li></ul><ul><li>Command Line Interface (CLI) </li></ul><ul><ul><li>http://www.symfony-project.org/installation/1_3 </li></ul></ul><ul><ul><li>SVN: http://svn.symfony-project.com/branches/1.4 </li></ul></ul>
  6. 6. Installation: continued <ul><li>PHP folder (/usr/share/php/symfony) </li></ul><ul><li>Symbolic Link – /usr/bin/ </li></ul>
  7. 7. Installation: continued 2 <ul><li>Multiple versions </li></ul><ul><ul><ul><li>symfony14 -V, symfony10 -V </li></ul></ul></ul>
  8. 8. Project Setup <ul><li>CLI </li></ul>
  9. 9. Project File/Folder Structure
  10. 10. Frontend/Admin <ul><li>frontend_dev.php, admin_dev.php </li></ul><ul><li>Debug Toolbar – symfony 1 st to introduce </li></ul><ul><li>Logging/cache </li></ul>
  11. 11. http://localhost/craig_app/web/frontend_dev.php
  12. 12. Models <ul><li>schema.yml, schema.xml </li></ul><ul><li>Autogenerate models </li></ul><ul><li>SQL </li></ul><ul><li>Fixtures (sample data) </li></ul>
  13. 13. schema.xml example
  14. 14. Building models
  15. 15. Models: continued <ul><li>StaticPage.php </li></ul><ul><ul><li>object represents single record of static_page </li></ul></ul><ul><li>StaticPagePeer.php </li></ul><ul><ul><li>static methods, collections of StaticPage objects </li></ul></ul><ul><li>BaseStaticPage* </li></ul><ul><ul><li>Autogenerated when re-build model </li></ul></ul><ul><ul><li>Parents of each model file </li></ul></ul><ul><li>Both main (child) classes are empty by default </li></ul>
  16. 16. Examples
  17. 17. Actions - Modules <ul><li>Index.php, frontend_dev.php -> actions </li></ul><ul><li>Create module </li></ul>
  18. 18. View <ul><li>3 parts </li></ul><ul><ul><li>Action </li></ul></ul><ul><ul><li>View </li></ul></ul><ul><ul><li>Route (optional for URL) </li></ul></ul><ul><li>actions.class.php indexSuccess.php </li></ul>
  19. 19. Forms/Validation <ul><li>Based on Propel/custom </li></ul><ul><li>Labels, widgets, defaults, validators </li></ul><ul><li>String, choice, file, boolean.... </li></ul>
  20. 20. Widgets and Validators
  21. 21. Admin Generator <ul><li>Quick/easy admin system </li></ul><ul><li>Modular </li></ul><ul><li>Based on Propel </li></ul><ul><li>3 Parts </li></ul><ul><ul><li>generator.yml </li></ul></ul><ul><ul><li>actions.class.php </li></ul></ul><ul><ul><li>View tempates (optional) </li></ul></ul>
  22. 22. Example
  23. 23. Plugins <ul><li>Extend Symfony functionality easily </li></ul><ul><li>Extend existing libraries for Symfony </li></ul><ul><li>More configuration! </li></ul>
  24. 24. Community <ul><li>Forum - http://forum.symfony-project.org </li></ul><ul><li>IRC – Freenode - #symfony </li></ul><ul><li>Google Groups - http://groups.google.com/group/symfony-community </li></ul>
  25. 25. Applications/Websites <ul><li>Yahoo! Bookmarks </li></ul><ul><li>Yahoo! Answers </li></ul><ul><li>DailyMotion </li></ul><ul><li>Delicious </li></ul>
  26. 26. Where next? <ul><li>http://www.symfony-project.org/gentle-introduction/1_4/en/ </li></ul><ul><li>Jobeet </li></ul><ul><ul><li>http://www.symfony-project.org/jobeet/1_2/Propel/en/ </li></ul></ul><ul><ul><li>http://www.jobeet.org/en/ </li></ul></ul><ul><li>IRC/Forum </li></ul>
  27. 27. Questions?
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×