Symfony y Drupal - Drupal Day Santander 2013

28
Drupal y Symfony Drupal Day Santander 2013 Juampy Novillo Requena

description

http://2013.drupalday.es/sesiones#symfony

Transcript of Symfony y Drupal - Drupal Day Santander 2013

Page 1: Symfony y Drupal - Drupal Day Santander 2013

Drupal y SymfonyDrupal Day Santander 2013

Juampy Novillo Requena

Page 2: Symfony y Drupal - Drupal Day Santander 2013

Acerca de mí

Drupal Developer en

Maintainer Twitter y OAuth

Autor de Drush User's Guide

Page 3: Symfony y Drupal - Drupal Day Santander 2013

Acerca de Drupal

Page 4: Symfony y Drupal - Drupal Day Santander 2013

2% de la Web usa DrupalFuente: http://buytaert.net/

Page 5: Symfony y Drupal - Drupal Day Santander 2013

Eventos en todo el mundo

http://www.garfieldtech.com/presentations/sflportland-drupal8-symfony2/#/2/3

Page 6: Symfony y Drupal - Drupal Day Santander 2013

Pero...

Drupal es unproyectoOpen Sourceque se creó hace12 años.

Toca saldar deudatécnica.

http://3.bp.blogspot.com

Page 7: Symfony y Drupal - Drupal Day Santander 2013
Page 8: Symfony y Drupal - Drupal Day Santander 2013
Page 9: Symfony y Drupal - Drupal Day Santander 2013

http://buytaert.net/the-future-is-a-restful-drupal

Febrero 2012: primera reunión (presencial)

Page 10: Symfony y Drupal - Drupal Day Santander 2013

¿Qué se ha hecho hasta ahora?

http://m.forocoches.com

http://www.clker.com/cliparts/i/w/L/q/u/1/work-in-progress.svg

Page 11: Symfony y Drupal - Drupal Day Santander 2013

ClassLoader● Carga automática de clases (PSR-0).

● Reemplaza al registro de clases de Drupal.

Page 12: Symfony y Drupal - Drupal Day Santander 2013

HTTP Foundation y HttpKernel

Page 13: Symfony y Drupal - Drupal Day Santander 2013

RoutingReemplaza hook_menu() por mimodulo.routing.yml + Controller/Form.

Page 14: Symfony y Drupal - Drupal Day Santander 2013

Routing (2)En hook_menu() sólo queda el título de la página.

Page 15: Symfony y Drupal - Drupal Day Santander 2013

Routing (3)En dblog.routing.yml: la ruta, reglas de acceso y controllador.

Page 16: Symfony y Drupal - Drupal Day Santander 2013

Routing (4)En el controllador, la lógica de control.

Page 17: Symfony y Drupal - Drupal Day Santander 2013

EventDispatcherComo nuestros hooks, pero:

● OOO● Agrupables● Testeables

En Drupal 8 convivirá con loshooks.

Drupal 9 no tendrá hooks.

http://img.desmotivaciones.es

Page 18: Symfony y Drupal - Drupal Day Santander 2013

Ejemplo event listener/subscriber

Page 19: Symfony y Drupal - Drupal Day Santander 2013

Suscribirse a un eventoDefinimos un servicio con el tag

authentication_provider

Page 20: Symfony y Drupal - Drupal Day Santander 2013

Implementar el servicio

Page 21: Symfony y Drupal - Drupal Day Santander 2013

DependencyInjectionPor fin :D

Para código procedural, Drupal::service('id') :(

Page 22: Symfony y Drupal - Drupal Day Santander 2013

Doctrine (common)Sólo para procesar annotations.

Page 23: Symfony y Drupal - Drupal Day Santander 2013

TWIG

Page 24: Symfony y Drupal - Drupal Day Santander 2013

Otros proyectos OS incorporados

JQuery Backbone

CKEditor Modrnizr Farbtastic Grippie

Normalize Composer

PHPUnit Guzzle Zend Feed

Page 25: Symfony y Drupal - Drupal Day Santander 2013

Al fin... test unitarios de verdad

http://www.carlescliment.com/blog/testing-unitario-drupal

Page 26: Symfony y Drupal - Drupal Day Santander 2013

¿Y qué pinto yo en todo esto?

https://drupal.org/getting-involved

IRC: #Drupal-Contribute y #Drupal-WSCCI

https://drupal.org/project/drupal/git-instructions

Page 27: Symfony y Drupal - Drupal Day Santander 2013

¡Gracias! ¿Preguntas?

http://about.me/juampy

@juampy72

Page 28: Symfony y Drupal - Drupal Day Santander 2013

Recursoshttp://buytaert.net/the-future-is-a-restful-drupalhttp://2012.drupalcamp.es/sites/default/files/slides/symfony-drupal-8.pdfhttp://www.garfieldtech.com/presentations/dcmunich2012-wsccihttp://crossfunctional.net/blog/2013/mar/symfony-components-in-drupal-8http://symfony.com/blog/symfony2-meets-drupal-8https://speakerdeck.com/player/4f6a3e51d171350022008299?slide=1#http://previousnext.com.au/blog/understanding-drupal-8s-plugin-systemhttp://blog.erdfisch.de/2012/09/hands-introduction-drupal-8-plugin-systemhttps://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.mdhttps://github.com/Crell/slides-drupal8-symfony2