Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Build your first Symfony2 application (PHP[tek] 2014)

Build your first Symfony2 application (PHP[tek] 2014)

During this tutorial, you will get started with the Symfony2 framework, and build your first web application using the framework. We'll cover installation, configuration, bundles, controllers, working with the database and forms during this tutorial, and if we have some time left, we can go beyond those basic topics as well.

A8f72e32766355f12a56ede9aaa0ee78?s=128

Stefan Koopmanschap

May 20, 2014
Tweet

Transcript

  1. Build your first Symfony2 application

  2. Sheraton-MeetingRooms

  3. /about • PHP developer since ’97/’98 • symfony developer since

    ’06/’07 • PHPBenelux/PFZ.nl/PHPAmersfoort • Ingewikkeld / Techademy
  4. Before we get started

  5. https://joind.in/10662

  6. Today 1. Choosing your framework 2. Some history 3. Creating

    your project 4. Creating your first Hello World 5. Connecting to the database 6. Working with Twig 7. Working with forms
  7. 1

  8. Choose your framework

  9. 2

  10. Once upon a time…

  11. And they lived happily…

  12. 3

  13. http://symfony.com/download

  14. php composer.phar create-project symfony/framework-standard-edition myProject/ 2.4.4

  15. None
  16. None
  17. chmod -R 777  app/cache app/logs

  18. None
  19. None
  20. None
  21. None
  22. 4

  23. Structure Application Bundle Bundle Library Library Bundle Bundle

  24. Structure Application Bundle Bundle Library Library Bundle Bundle

  25. Structure Application • Configuration • Bootstrap • Global templates •

    Dependencies
  26. Structure Application

  27. Structure Application Bundle Bundle Library Library Bundle Bundle

  28. Structure Application Bundle Bundle Library Library Bundle Bundle

  29. Structure Application Bundle Bundle Library Library Bundle Bundle

  30. Structure Bundle • Controllers • Entities • Views • Configuration

    • Forms • Related code
  31. Structure Bundle

  32. Structure Application Bundle Bundle Library Library Bundle Bundle

  33. Structure Application Bundle Bundle Library Library Bundle Bundle

  34. Structure Library

  35. Structure Library • 3rd party libraries • Wrappers

  36. The src/ directory

  37. app/console generate:bundle

  38. None
  39. None
  40. None
  41. None
  42. None
  43. 5

  44. None
  45. app/console doctrine:generate:entity

  46. None
  47. None
  48. None
  49. app/console doctrine:generate:crud

  50. app/console doctrine:generate:crud

  51. None
  52. None
  53. None
  54. 6

  55. None
  56. None
  57. None
  58. None
  59. 7

  60. Forms are objects

  61. None
  62. None
  63. None
  64. Today 1. Choosing your framework 2. Some history 3. Creating

    your project 4. Creating your first Hello World 5. Connecting to the database 6. Working with Twig 7. Working with forms
  65. http://www.phparch.com/magazine/2013-2/september/

  66. Questions?

  67. https://joind.in/10662