Server side technologies Symfony Web Technologies – Prof. Dr. Ulrik Schroeder – WS 2010/111 The slides are licensed under a Creative Commons Attribution 3.0 License Robert Heim, Alexander Friesen, Diego Santos
Web-Project's Problems Web Technologies2
Web-Project's Problems Web Technologies3 ● Security ● Complexity, i.e.: ● different output formats (HTML5, XML, JSON, RSS feeds, ...) ● Quality Control ● Portability (OS, Databases, ...) ● Maintainability
Facing the Server Side Web Technologies4 Solution: Frameworks = Standards, Best Practices, … ! ● Templating ● Abstraction (i.e. Security, Database, Sessions, …) ● Codegeneration ● Proven, tested code ● “Plugin” functionality
Symfony Web Technologies5 ● PHP Framework ● Founded by Fabien Potencier (2005) ● Best Practices ● (as seen in Ruby on Rails, Zend, etc.) ● Low hosting requirements (PHP, Apache) ● Totally Free & Open Source ● Rich documentation and big community (10.000+)
Who uses Symfony? Web Technologies6
Who uses Symfony? Web Technologies7
MVC Pattern Web Technologies8
Symfony Approach - Overview Web Technologies9 ● Application Model (MODEL) ● Object Relational Mapper ● Modules ● Templates (VIEW) ● Actions (CONTROLLER) ● Customizing
Application Model Web Technologies10 ● Define the Model (YAML-Format)
Application Model Web Technologies11 ● Symfony related Glue Code ● Database schema Generating:
Modules (!= Models) Web Technologies12 Templates: Controller: + executeIndex(...) + executeNew(...) + executeShow(...) + ...
Modules (!= Models) Web Technologies13 Templates: Controller: + executeIndex(...) + executeNew(...) + executeShow(...) + ...
Module generation Web Technologies14 ● Model → standard operations: Create, Read, Update, Delete (CRUD) ● Generate ● Controller: communicating to DB, validation, inject data in templates, ... ● Templates: list of objects, forms, … ● Adjust / customize! (but Don't Repeat Yourself (DRY)) → Refactor!
Customization Web Technologies15 ● Configuration files ● OOP (extending, overwrite, etc.) ● Hook Points ● Plugins (1000+) ● User Management ● Tagging ● Commenting ● … whole applications ...
What else? Web Technologies16 ● URL Rewriting/Routing ● Fixtures (example data for init-task) ● Backend generation ● Internationalization (i18n), localizing (i10n) ● Convert App to Plugin ● Easy Deployment ● And much more! → www.symfony-project.org
Pro's and Con's Web Technologies17 ● Pro's: ● Fast development (generation) ● Standards ● Scaleability ● Many Web-Developers know PHP ● Con's: ● Have to learn the framework ● Plugins not always stable ● PHP (refactoring may be a pain in big projects)
Live Coding Web Technologies18

Symfony presentation

  • 1.
    Server side technologies Symfony WebTechnologies – Prof. Dr. Ulrik Schroeder – WS 2010/111 The slides are licensed under a Creative Commons Attribution 3.0 License Robert Heim, Alexander Friesen, Diego Santos
  • 2.
  • 3.
    Web-Project's Problems Web Technologies3 ●Security ● Complexity, i.e.: ● different output formats (HTML5, XML, JSON, RSS feeds, ...) ● Quality Control ● Portability (OS, Databases, ...) ● Maintainability
  • 4.
    Facing the ServerSide Web Technologies4 Solution: Frameworks = Standards, Best Practices, … ! ● Templating ● Abstraction (i.e. Security, Database, Sessions, …) ● Codegeneration ● Proven, tested code ● “Plugin” functionality
  • 5.
    Symfony Web Technologies5 ● PHPFramework ● Founded by Fabien Potencier (2005) ● Best Practices ● (as seen in Ruby on Rails, Zend, etc.) ● Low hosting requirements (PHP, Apache) ● Totally Free & Open Source ● Rich documentation and big community (10.000+)
  • 6.
    Who uses Symfony? WebTechnologies6
  • 7.
    Who uses Symfony? WebTechnologies7
  • 8.
  • 9.
    Symfony Approach -Overview Web Technologies9 ● Application Model (MODEL) ● Object Relational Mapper ● Modules ● Templates (VIEW) ● Actions (CONTROLLER) ● Customizing
  • 10.
    Application Model Web Technologies10 ●Define the Model (YAML-Format)
  • 11.
    Application Model Web Technologies11 ●Symfony related Glue Code ● Database schema Generating:
  • 12.
    Modules (!= Models) WebTechnologies12 Templates: Controller: + executeIndex(...) + executeNew(...) + executeShow(...) + ...
  • 13.
    Modules (!= Models) WebTechnologies13 Templates: Controller: + executeIndex(...) + executeNew(...) + executeShow(...) + ...
  • 14.
    Module generation Web Technologies14 ●Model → standard operations: Create, Read, Update, Delete (CRUD) ● Generate ● Controller: communicating to DB, validation, inject data in templates, ... ● Templates: list of objects, forms, … ● Adjust / customize! (but Don't Repeat Yourself (DRY)) → Refactor!
  • 15.
    Customization Web Technologies15 ● Configurationfiles ● OOP (extending, overwrite, etc.) ● Hook Points ● Plugins (1000+) ● User Management ● Tagging ● Commenting ● … whole applications ...
  • 16.
    What else? Web Technologies16 ●URL Rewriting/Routing ● Fixtures (example data for init-task) ● Backend generation ● Internationalization (i18n), localizing (i10n) ● Convert App to Plugin ● Easy Deployment ● And much more! → www.symfony-project.org
  • 17.
    Pro's and Con's WebTechnologies17 ● Pro's: ● Fast development (generation) ● Standards ● Scaleability ● Many Web-Developers know PHP ● Con's: ● Have to learn the framework ● Plugins not always stable ● PHP (refactoring may be a pain in big projects)
  • 18.