a practical introduction to symfony (european drupal days 2015)
Post on 16-Jul-2015
378 Views
Preview:
TRANSCRIPT
© Ibuildings 2014/2015 - All rights reserved
#DrupalDaysEU
A Pratical Introduction to Symfony
#DrupalDaysEU
© Ibuildings 2014/2015 - All rights reserved
Gold Sponsors
#DrupalDaysEU
© Ibuildings 2014/2015 - All rights reserved
Media Sponsors
Silver Sponsors
© Ibuildings 2014/2015 - All rights reserved
Speaker InfoAlessio BarniniSoftware Engineer
alessio@ibuildings.it@barno7
•
#DrupalDaysEU
© Ibuildings 2014/2015 - All rights reserved
• It is a Framework
• It is a set of Tools
• It is a development methodology
• It is a Community
What is Symfony?
•
#DrupalDaysEU
© Ibuildings 2014/2015 - All rights reserved
• Bundles
• Documentation
• Support
• Security
Why should I use a framework?
© Ibuildings 2014/2015 - All rights reserved
How does it work?
•
#DrupalDaysEU
© Ibuildings 2014/2015 - All rights reserved
• Client —————> Server
• Client <————— Server
How does it work?
•
#DrupalDaysEU
© Ibuildings 2014/2015 - All rights reserved
The Application FlowController
RoutingComponent
© Ibuildings 2014/2015 - All rights reserved
Model View Controller?Bundle?
•
#DrupalDaysEU
© Ibuildings 2014/2015 - All rights reserved
• Bundle
• Model
• View
• Controller
Symfony Structure
•
#DrupalDaysEU
© Ibuildings 2014/2015 - All rights reserved
Model
Username
Password
Create Table
•
#DrupalDaysEU
© Ibuildings 2014/2015 - All rights reserved
Controller
indexAction()
getUserAction()
saveUserAction()
Response
Html
Redirect
404, etc…
•
#DrupalDaysEU
© Ibuildings 2014/2015 - All rights reserved
View
getUserAction()
User
hello Alessio !Your email is alessio@ibuildings.it
•
#DrupalDaysEU
© Ibuildings 2014/2015 - All rights reserved
But, what is a bundle ?
services events etc.. Bundle
User
Stand-AloneUserBundleJsRoutingBundle
JMSTranslationBundle
…
•
#DrupalDaysEU
© Ibuildings 2014/2015 - All rights reserved
• Symfony uses Twig
• Twig is a template engine
• Develop by SensioLabs
Twig
•
#DrupalDaysEU
© Ibuildings 2014/2015 - All rights reserved
• PHP Package Manager
• Bundles
• Vendor
Composer
•
#DrupalDaysEU
© Ibuildings 2014/2015 - All rights reserved
• It’s a ORM (Object Relational Mapping )
• Easy CRUD
• Easy Generate Getter / Setter
• Relation
• DQL (Doctrine Query Language)
• Query Builder
Doctrine
•
#DrupalDaysEU
© Ibuildings 2014/2015 - All rights reserved
• HttpFoundation
• Routing
• Form
• Validator
• Translation
• Security
Some Important Components
•
#DrupalDaysEU
© Ibuildings 2014/2015 - All rights reserved
• Requirements: http://symfony.com/doc/2.3/reference/requirements.html
• PHP needs to be a minimum version of PHP 5.3.3
• JSON needs to be enabled
• ctype needs to be enabled
• your php.ini needs to have the date.timezone setting
• PDO installed ( for Doctrine )
• Install: http://symfony.com/download (symfony 2.3)
Ok, I Want Symfony
•
#DrupalDaysEU
© Ibuildings 2014/2015 - All rights reserved
Githubhttps://github.com/IbuildingsItaly/European-Drupal-Days-A-Pratical-Introduction-to-Symfony
© Ibuildings 2014/2015 - All rights reserved
Thanks
top related