PHP 2013

618 views

Published on

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
618
On SlideShare
0
From Embeds
0
Number of Embeds
93
Actions
Shares
0
Downloads
9
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

PHP 2013

  1. 1. PHP 2013Raúl Fraile
  2. 2. thegreenbees.es nitsnets.comproweb.ua.es servergrove.essharedsecrets.com cloid.net
  3. 3. Antes de empezar...
  4. 4. Próxima reunión:Lunes 17 de JunioPablo GodelDespliegue de aplicaciones PHPFundador de ServerGroveCreador de la mailing-list de PHP en españolViviendo en USA desde 1999
  5. 5. PHP 5.3+
  6. 6. 1.0 08-06-19952.0 01-11-19973.0 06-06-19984.0 22-05-20005.0 13-07-20045.1 24-11-20055.2 02-11-20065.3 30-06-20095.4 01-03-20125.5 RC1 09-05-2013
  7. 7. Futuras versiones: releasesmás frecuentes
  8. 8. PHP 5.3: Namespaces,closures, PHAR...
  9. 9. <?php namespace LadybugTheme; use LadybugFormatFormatInterface;use LadybugContainer; abstract class BaseTheme implements ThemeInterface{ /** @var Container $container */protected $container; protected $formats; public function __construct(Container $container){$this->container = $container;}}
  10. 10. <?php $values = range(1, 30); $evenNumbers = array_filter($values, function($number){return ($number % 2) == 0;});
  11. 11. PHP 5.4:Traits, sintaxis cortapara arrays, servidor web...
  12. 12. <?php trait Loggable {public function log() {// my log function}} class Car {use Loggable;} $car = new Car();$car->log();
  13. 13. Composer
  14. 14. Gestor de dependencias para PHP
  15. 15. {"require": {"doctrine/orm": "2.2.3"}}
  16. 16. {"require": {"doctrine/orm": "2.2.*"}}
  17. 17. {"require": {"doctrine/orm": ">=2.2.3"}}
  18. 18. {"require": {"doctrine/orm": ">=2.2.3"},"require-dev": {"mockery/mockery": "0.8.0"}}
  19. 19. composer.jsonVS composer.lock
  20. 20. packagist.org
  21. 21. security.sensiolabs.org
  22. 22. Estándares
  23. 23. Framework Interop Groupwww.php-fig.org
  24. 24. PSR-0:Autoloading
  25. 25. Se lanza cuando se intentautilizar una clase ointerface no definidopreviamente
  26. 26. Traductornamespace -> archivo∖Doctrine∖DBAL∖Driver [lib_path]/Doctrine/DBAL/Driver.php
  27. 27. bool spl_autoload_register([callable $autoload_function,[bool $throw = true,[bool $prepend = false]]])
  28. 28. PSR-1/2: Coding Standard
  29. 29. Importante: elegir un CSy ser consistente
  30. 30. Proyectos open source:compartir mismo CS
  31. 31. fabpot / PHP-CS-Fixer
  32. 32. PSR-3: Logger Interface
  33. 33. namespace PsrLog;interface LoggerInterface{/*** System is unusable.*/public function emergency($message, array $context = array()); /*** Action must be taken immediately.*/public function alert($message, array $context = array()); /*** Critical conditions.*/public function critical($message, array $context = array()); /*** Runtime errors that do not require immediate action but should typically* be logged and monitored.*/public function error($message, array $context = array()); /*** Exceptional occurrences that are not errors.*/public function warning($message, array $context = array()); ...
  34. 34. Symfony
  35. 35. Más que un framework
  36. 36. Componentes independientesy desacoplados
  37. 37. BrowserKitClassLoaderConfigConsoleCssSelectorDependencyInjectionDomCrawlerEventDispatcherFinderFormHttpFoundationHttpKernelLocaleProcessRoutingSecuritySerializerTemplatingTranslationValidatorYamlStopWatchPropertyAccessOptionsResolver
  38. 38. Comunidad
  39. 39. Conferencias
  40. 40. Buena oportunidad paraaprender y hacer contactos
  41. 41. desymfony.com
  42. 42. GitHub
  43. 43. Tu verdadero CV
  44. 44. raulfraile/Ladybug
  45. 45. symfony2cheatsheet.com
  46. 46. Less talk, more code
  47. 47. ¿Preguntas?

×