Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Making your applications work together through ...

Michael C.
December 01, 2016

Making your applications work together through interoperability

Michael C.

December 01, 2016

Transcript

95 slides
  1. ME?

  2. $logger->critical( 'An exceptional exception occured' ); PSR-3: LOGGING $logger->emergency( ‘Nicolas

    merged a Parse Error into Symfony’ array('repository' => ‘symfony/symfony') );
  3. PSR-6: CACHING $america = $cachePool->hasItem('trumpPresidency'); // FALSE $ryan = $cachePool->getItem('RyanStatus');

    // CacheItem Object $ryan->get(); // ‘Not here' $ryan->set(‘Looking after his new baby') $ryan->expiresAfter('86400'); $cachePool->save($ryan);
  4. PSR-11: CONTAINER INTERFACE /** * Describes the interface of a

    container that exposes methods to read its entries. */ interface ContainerInterface { /** * Finds an entry of the container by its identifier and returns it. * */ public function get($id); /** * Returns true if the container can return an entry for the given identifier. * Returns false otherwise. * */ public function has($id); }
  5. DEPENDENCY HELL Library 1 Library 2 Library 3 Application Business

    Logic Monolog Symfony Cache Pimple Klogger Stash Zend Framework Analog PHP Cache PHP League Container Monolog Symfony Cache Symfony DI
  6. DEPENDENCY HELL Library 1 Library 2 Library 3 Application Business

    Logic Monolog Symfony Cache Pimple Klogger Stash Zend Framework Analog PHP Cache PHP League Container Monolog Symfony Cache Symfony DI PSR-3 Logger PSR-6 Logger PSR-11 DIC PSR-3 Logger PSR-6 Logger PSR-11 DIC PSR-3 Logger PSR-6 Logger PSR-11 DIC PSR-3 Logger PSR-6 Logger PSR-11 DIC
  7. ▸ Monolog
 Klogger —> PSR-3 Logging Library —> Monolog
 Analog

    ▸ Symfony Cache
 Stash —> PSR-6 Caching Library —> Symfony Cache
 PHP Cache ▸ Pimple
 Zend Framework —> PSR-11 Container —> Symfony DI
 PHP League Container
 Symfony DI TITLE TEXT
  8. 10%

  9. API

More Decks by Michael C.

Other Decks in Programming