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

“We like to hate PHP" or bittersweet lessons learned from the Ruby ecosystem

“We like to hate PHP" or bittersweet lessons learned from the Ruby ecosystem


Yevhen "Eugene" Kuzminov

September 03, 2016

More Decks by Yevhen "Eugene" Kuzminov

Other Decks in Programming


  1. or bittersweet lessons learned from the Ruby ecosystem “We like

    to hate PHP” Ievgen Kuzminov. MobiDev. Kharkiv, Ukraine.
  2. PHP is bad/slow/wrong/ugly… ? http://phpsadness.com/ Unexpected T_PAAMAYIM_NEKUDOTAYIM (╯°□°)╯︵ ┻━┻

  3. Ruby is not better It is just a different mindset

  4. Ievgen Kuzminov http://stdout.in @iJackUA 6 years in PHP 2 years

    in Ruby Currently: Ruby Team Lead in MobiDev Author of http://rwdtow.stdout.in
  5. How to start a rant? http://stdout.in/en/post/ruby-ecosystem-bitte rsweet-or-we-like-to-hate-php

  6. Healthy ecosystem: ▣ Frameworks pluralism ▣ Libraries agnosticism ▣ Tools,

    that just work
  7. Recent decade of The Web Dev

  8. ‘’ Vicious circle of demand

  9. 1) Symfony 2) Laravel 3) Yii 4) Slim ... How

    many framework are in production? 1) Ruby on Rails ¯\_(ツ)_/¯
  10. Frameworks are cheating! ▣ Do not teach to write better

    code ▣ Teach to use the framework only ▣ “In which folder should I put this class?”
  11. What is it ? (Uncle Bob)

  12. ▣ Framework ▣ CMS ▣ Library Have you ever written

    your OWN...
  13. ▣ Learn the other language to get better view on

    your “native” one ▣ Traits/mixins are not “composition” ▣ Now I consider OOP as an “issue” I thought I knew OOP
  14. ▣ Not an end in itself, but the criterion ▣

    Harder to follow with dynamic composition ▣ Dependency Injection. WAT ? SOLID
  15. None
  16. ...or they don't have a chance because people can't look

    further the Rails monster. (C)
  17. Evolution and Performance

  18. PHP FIG Community and Standards

  19. ▣ Composer ▣ The League of Extraordinary Packages ▣ Aura

    for PHP Packages ▣ Bundler / Gems ▣ Dry-Web
  20. Monkey-patching What is it? Example: 5.minutes.ago vs TimeMath.minutes.decrease(Time.now, 5)

  21. Ruby or Rails? Array ▣ first ▣ second ▣ last

    ▣ second_to_last ▣ third_to_last ▣ forty_two
  22. Syntax, DSL, metaprogramming Ruby has less parenthesis and formatting issues.

    Can handle DSL and metaprogramming. PHP has less possibilities… and that’s fine! Who cares when your IDE has autocomplete.
  23. ▣ PSR-4 rules! Modules and Namespaces ▣ Constants autoload hell

  24. ▣ Zend Expressive ▣ Slim ▣ Laravel ▣ ... Middlewares

  25. Architecture inspiration Sandi Metz Nick Sutterer

  26. The Clean Architecture by Uncle Bob

  27. Trailblazer

  28. Business logic architecture in PHP ▣ MVC is not enough

    ▣ Dependency Injection is not a silver bullet ▣ DCI ▣ CQRS (https://github.com/qandidate-labs/broadway) ▣ ?
  29. Learn SQL. I mean it! ORM vs SQL

  30. Where Ruby outperforms PHP Background jobs and queues

  31. Where PHP outperforms Ruby Code debug

  32. ▣ PHPUnit ▣ Codeception ▣ Just recently became “a must”

    ▣ Who write tests? Automated testing ▣ Minitest / RSpec ▣ Capybara ▣ Propagated by Rails ▣ “TDD is dead” © DHH
  33. Ideal PHP world for me ▣ Simple and reliable frameworks

    ▣ Agnostic middlewares ▣ Architectural framework ▣ Loosely-coupled tools/libs
  34. “Haters gonna hate” (C) Break bad! Change the paradigm! Elixir,

    Go, Closure…
  35. Thank you! kyzminov@gmail.com http://stdout.in @iJackUA Questions ?