$30 off During Our Annual Pro Sale. View Details »

PHP Moderno

PHP Moderno

Jonata Weber

October 23, 2017
Tweet

More Decks by Jonata Weber

Other Decks in Programming

Transcript

  1. PHP Moderno <?= 'Jonata Weber' ?>

  2. @JonataWeber

  3. Versões Suportadas

  4. PSRs PHP Standards Recommendations 1 - Basic Coding Standard 2

    - Coding Style Guide 3 - Logger Interface 4 - Autoloading Standard 6 - Caching Interface 7 - HTTP Message Interface 11 - Container Interface 13 - Hypermedia Links 16 - Simple Cache
  5. composer.json { "require": { "monolog/monolog": "1.0.*" } } php composer.phar

    install http://www.packagist.org
  6. None
  7. Monolog github.com/Seldaek/monolog IFTTT, SendGrid, Slack, NewRelic, Redis, Mongo, etc...

  8. www.phptherightway.com

  9. Model-View-Controller

  10. foo.php

  11. models/FooModel.php views/foo-list.php

  12. Anonymous Functions http://php.net/manual/pt_BR/function s.anonymous.php

  13. Anonymous Class https://secure.php.net/manual/pt_BR /language.oop5.anonymous.php

  14. Traits http://php.net/manual/pt_BR/languag e.oop5.traits.php

  15. Namespaces http://php.net/manual/pt_BR/languag e.namespaces.php

  16. Generators https://secure.php.net/manual/pt_BR /language.generators.php

  17. SPL Standard PHP Library • Estrutura de Dados • Iteradores

    • Interfaces • Exceções • Manipulação de Arquivos • Classes e Interfaces Genéricas
  18. Buit in server PHP >= 5.4 (2012) $ php -S

    localhost:8000
  19. PHP 7 https://secure.php.net/manual/pt_BR/migration7 0.new-features.php • Scalar Type Hints • Return

    Type Declarations • Spaceship Operator (<=>) • Null Coalesce Operator (??) • Arrays Constantes • Performance
  20. Types

  21. Microframeworks • Silex - silex.sensiolabs.org • Slim - slimframework.com •

    Lumen - lumen.laravel.com • Zend Expressive
  22. Servers • PaaS - Plataform as a Service • Virtual

    ou Dedicated Servers • nginx e PHP-FPM • Docker e Vagrant
  23. Deployment • Rocketeer • Phing • Deployer

  24. Livecoding

  25. Perguntas? @JonataWeber bit.ly/ws-cursos

  26. Referências • phptherightway.com • Livro PHP Moderno - O'Reilly •

    https://www.youtube.com/watch?v=ZQVztAwoHUA