symfony et sonata project chez canal+

13
Symfony et Sonata Project chez Canal+

Upload: ekino

Post on 19-Jul-2015

807 views

Category:

Internet


1 download

TRANSCRIPT

Sym

fony

et S

onat

a Pro

ject

ch

ez C

anal

+

2 2

Instructions: Right-click on the top right corner of the shaded box select ‘Format Background’ then select the fill colour from the inbuilt colour theme. This textbox will not print and not show in screen-show mode

Instructions: Change the colour of the text to match the shaded area on the left

•  Sonata Project Lead dev •  15% des installations de Symfony •  Polyglot: Python, Go, Javascript,

Puppet, etc …

•  @th0masr •  github.com/rande

Thomas Rabaix Architecte Logiciel ekino.

3 3

Instructions: Right-click on the top right corner of the shaded box select ‘Format Background’ then select the fill colour from the inbuilt colour theme. This textbox will not print and not show in screen-show mode

Instructions: Change the colour of the text to match the shaded area on the left

Canal+

Refonte de certains backoffices de gestion de contenu: •  8 applications dans un repo git •  2 APIs : Une API interne et une API

Publique •  1 SDK : pour consommer l’API publique

4 4

Instructions: Right-click on the top right corner of the shaded box select ‘Format Background’ then select the fill colour from the inbuilt colour theme. This textbox will not print and not show in screen-show mode

Structure de fichiers adaptée au besoin

•  Chaque application doit pouvoir être isolée •  Pas de dépendance entre applications •  Même base de code (Component)

apps

logs

cache

src/CanalPlus

Component

Bundle/App1Bundle

app1_prod.log

app1_prod

app1

App1Kernel.php

web

config

5 5

•  ./console app1 your:command •  Un point d’entrée pour symfony •  clear cache: rm –rf cache/* #win

•  Tests unitaires sur l’ensemble du code des applications

•  Réduction de la dette technique car les applications sont mises à jour à chaque évolution

•  Makefile: « One tool to rule them all »

•  Réalité des projets web: bower, npm, gulp, capistrano, scss, bash, pip, bundler, etc ….

•  make install •  make update

Structure de fichiers adaptés au besoin

6 6

Instructions: Right-click on the top right corner of the shaded box select ‘Format Background’ then select the fill colour from the inbuilt colour theme. This textbox will not print and not show in screen-show mode

Symfony2 écosystème

•  2550 bundles •  FosRestBundle •  FosUserBundle •  Nelmio •  LiipMonitor •  Sonata’s Bundles

7

8

9 9

•  L’AdminBundle permet de gagner du temps pour la création d’IHM standard

•  Permet d’inclure des fonctionnalités riches grâce à ReactJS (ou autres solutions)

•  Création d’un SonataRestAdminBundle pour administrer des API RestFul

•  Une IHM unique pour croiser les données d’API ou d’une base de données

•  Gestion des droits provenant de Symfony

Sonata AdminBundle

Le pivot de la l’administration des données

•  Permet l’édition de contenus •  Gestion des règles métiers •  Gestion des rôles

10 10

•  Intégration des fonctionnalités de resize dynamique de nginx => en c; en cache; ça booste …

•  POC pour utiliser thumbor pour le crop intelligent d’image

•  Stockage des médias sur Amazon •  Budget is the limit

Sonata MediaBundle

L’agrégateur des sources multimédia

•  Rajout d’un mode mosaïque •  Rajout d’une arborescence pour retrouver

les médias facilement. •  Intégration de médias interne du SI Canal+

grâce à la création de « providers » spécifiques

11 11

•  Création de blocs métier pour se connecter aux web services existants

•  La complexité est cachée aux utilisateurs.

•  Intégration facile avec Akamai (CDN) •  Facilité grâce à Symfony et Sonata qui

intègrent les notions de cache HTTP

Sonata PageBundle

L’intégrateur de flux pour des pages riches.

•  Amélioration de l’ergonomie de l’administration d’une page

•  « SharedBlock » réutilisation de blocs sur plusieurs pages.

12 12

•  RestFul API with JSON+HAL

•  HateosBundle: création de ressources HAL à partir d’annotations

•  Il n’existe pas de client pour consommer ces ressources

•  Création d’un librairie: https://github.com/ekino/php-hal-client

•  Permet de naviguer dans les réponses HAL •  Option pour intégrer JMS Serializer: •  Ressources => Objets

Rest Json+Hal

13

Bref… … ekino recrute …

… La suite au PHP TOUR 2015

http://www.afup.org/pages/phptourluxembourg2015/index.php