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

open source efforts

open source efforts

The story behing our open source efforts

Freek Van der Herten

October 05, 2016

More Decks by Freek Van der Herten

Other Decks in Programming


  1. About me Freek Van der Herten Partner & developer at

    SPATIE @freekmurze https://murze.be
  2. Since 2003 Websites, applications and webshops Team 4 developers, 1

    manager Specialization Laravel development
  3. Open source software We use a lot of it Nginx,

    Laravel, Ubuntu, Elasticsearch, Memcached, Redis, Beanstalkd, MySQL, Composer, Glide, Homestead, Flysystem, Fractal, Carbon, PHPUnit, NPM, React, jQuery, Java, SSH, Sequel Pro, BackupPC … Basically everything listed in composer.json and package.json
  4. ± 80 packages on Packagist + 1 000 000 downloads

    A lot of Laravel specific packages, some framework agnostic ones, a few JavaScript packages We create a lot of it Open source software
  5. Zend Framework 1 PHP world was pretty stale around 2012

    Laravel 4: developer happiness, clear syntax Laracasts: miniseries on package development + Travis The first package
  6. Browsershot: take screenshots of website programmatorically PhantomJS Working in the

    open People started blogging about it The first package
  7. Blender: conversion from Zend Framework to Laravel A lot of

    functionalities that could be helpful to other developers New packages: laravel-newsletter, laravel-medialib, laravel-analytics Opensourcing Blender itself Very positive feedback from the community Beyond the first package
  8. Every package gets born inside a client project Almost every

    client project results in a package laravel-sitemap, opening-hours, … Beyond the first package
  9. Making time Time consuming Coding, writing tests, writing docs, getting

    the word out Maintenance, responding to issues, reviewing PRs 1000 issues, 750 PRs
  10. Making time Only plan 4 days a week for client

    work Extra day for support, learning and opensource efforts Free time
  11. The benefits of creating packages A lot of learning by

    coding up the package and writing tests Feedback from the community Free code! Dogfooding
  12. Requirements Latest version of PHP / Laravel Package reflects the

    requirements of the project it gets born in Can use latest features: return type hints, null coalescing, anonymous classes PHP 5 is dead (to us) Probably hurts popularity, but nudges community to use latest versions
  13. 2. pdf-to-image $pdf = new Spatie\PdfToImage\Pdf('file.pdf');
 collect(range(1, $pdf->getNumberOfPages()),

    function(int $pageNumber) use ($pdf) {
  14. Laravel Menu Menu::macro('main', function () {
 return Menu::new()
 ->action('HomeController@index', 'Home')

    ->action('AboutController@index', 'About')
 ->action('ContactController@index', 'Contact')
  15. Speed up your application 
 by caching the entire response

    Laravel Responsecache RESPONSE CACHE REQUESTS APP 1 2
  16. Laravel Translatable $newsItem = new NewsItem; // This is an

    Eloquent model
 ->setTranslation('name', 'en', 'Name in English')
 ->setTranslation('name', 'nl', 'Naam in het Nederlands')
 $newsItem->name; // Returns 'Name in English'
 $newsItem->getTranslation('name', 'nl');
  17. Future plans No roadmap Depends on the client projects Will

    probably diminish a bit as the most common problems are solved
  18. In closing Working on packages has a lot of benefits

    It’s fun Social aspect Can be recommended to everyone