a practical introduction to symfony (european drupal days 2015)

22
© Ibuildings 2014/2015 - All rights reserved #DrupalDaysEU A Pratical Introduction to Symfony

Upload: ibuildings-italia

Post on 16-Jul-2015

379 views

Category:

Internet


2 download

TRANSCRIPT

Page 1: A Practical Introduction to Symfony (European Drupal Days 2015)

© Ibuildings 2014/2015 - All rights reserved

#DrupalDaysEU

A Pratical Introduction to Symfony

Page 2: A Practical Introduction to Symfony (European Drupal Days 2015)

#DrupalDaysEU

© Ibuildings 2014/2015 - All rights reserved

Gold Sponsors

Page 3: A Practical Introduction to Symfony (European Drupal Days 2015)

#DrupalDaysEU

© Ibuildings 2014/2015 - All rights reserved

Media Sponsors

Silver Sponsors

Page 4: A Practical Introduction to Symfony (European Drupal Days 2015)

© Ibuildings 2014/2015 - All rights reserved

Speaker InfoAlessio BarniniSoftware Engineer

[email protected]@barno7

Page 5: A Practical Introduction to Symfony (European Drupal Days 2015)

#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?

Page 6: A Practical Introduction to Symfony (European Drupal Days 2015)

#DrupalDaysEU

© Ibuildings 2014/2015 - All rights reserved

• Bundles

• Documentation

• Support

• Security

Why should I use a framework?

Page 7: A Practical Introduction to Symfony (European Drupal Days 2015)

© Ibuildings 2014/2015 - All rights reserved

How does it work?

Page 8: A Practical Introduction to Symfony (European Drupal Days 2015)

#DrupalDaysEU

© Ibuildings 2014/2015 - All rights reserved

• Client —————> Server

• Client <————— Server

How does it work?

Page 9: A Practical Introduction to Symfony (European Drupal Days 2015)

#DrupalDaysEU

© Ibuildings 2014/2015 - All rights reserved

The Application FlowController

RoutingComponent

Page 10: A Practical Introduction to Symfony (European Drupal Days 2015)

© Ibuildings 2014/2015 - All rights reserved

Model View Controller?Bundle?

Page 11: A Practical Introduction to Symfony (European Drupal Days 2015)

#DrupalDaysEU

© Ibuildings 2014/2015 - All rights reserved

• Bundle

• Model

• View

• Controller

Symfony Structure

Page 12: A Practical Introduction to Symfony (European Drupal Days 2015)

#DrupalDaysEU

© Ibuildings 2014/2015 - All rights reserved

Model

Username

Email

Password

Create Table

Page 13: A Practical Introduction to Symfony (European Drupal Days 2015)

#DrupalDaysEU

© Ibuildings 2014/2015 - All rights reserved

Controller

indexAction()

getUserAction()

saveUserAction()

Response

Html

Redirect

404, etc…

/index
Page 14: A Practical Introduction to Symfony (European Drupal Days 2015)

#DrupalDaysEU

© Ibuildings 2014/2015 - All rights reserved

View

getUserAction()

User

hello Alessio !Your email is [email protected]

Page 15: A Practical Introduction to Symfony (European Drupal Days 2015)

#DrupalDaysEU

© Ibuildings 2014/2015 - All rights reserved

But, what is a bundle ?

services events etc.. Bundle

User

Stand-AloneUserBundleJsRoutingBundle

JMSTranslationBundle

Page 16: A Practical Introduction to Symfony (European Drupal Days 2015)

#DrupalDaysEU

© Ibuildings 2014/2015 - All rights reserved

• Symfony uses Twig

• Twig is a template engine

• Develop by SensioLabs

Twig

Page 17: A Practical Introduction to Symfony (European Drupal Days 2015)

#DrupalDaysEU

© Ibuildings 2014/2015 - All rights reserved

• PHP Package Manager

• Bundles

• Vendor

Composer

Page 18: A Practical Introduction to Symfony (European Drupal Days 2015)

#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

Page 19: A Practical Introduction to Symfony (European Drupal Days 2015)

#DrupalDaysEU

© Ibuildings 2014/2015 - All rights reserved

• HttpFoundation

• Routing

• Form

• Validator

• Translation

• Security

Some Important Components

Page 20: A Practical Introduction to Symfony (European Drupal Days 2015)

#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

Page 21: A Practical Introduction to Symfony (European Drupal Days 2015)

#DrupalDaysEU

© Ibuildings 2014/2015 - All rights reserved

Githubhttps://github.com/IbuildingsItaly/European-Drupal-Days-A-Pratical-Introduction-to-Symfony

Page 22: A Practical Introduction to Symfony (European Drupal Days 2015)

© Ibuildings 2014/2015 - All rights reserved

Thanks