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
Tweet

More Decks by Yevhen "Eugene" Kuzminov

Other Decks in Programming

Transcript

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

    to hate PHP” Ievgen Kuzminov. MobiDev. Kharkiv, Ukraine.
  2. 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
  3. 1) Symfony 2) Laravel 3) Yii 4) Slim ... How

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

    code ▣ Teach to use the framework only ▣ “In which folder should I put this class?”
  5. ▣ 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
  6. ▣ Not an end in itself, but the criterion ▣

    Harder to follow with dynamic composition ▣ Dependency Injection. WAT ? SOLID
  7. ▣ Composer ▣ The League of Extraordinary Packages ▣ Aura

    for PHP Packages ▣ Bundler / Gems ▣ Dry-Web
  8. Ruby or Rails? Array ▣ first ▣ second ▣ last

    ▣ second_to_last ▣ third_to_last ▣ forty_two
  9. 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.
  10. Business logic architecture in PHP ▣ MVC is not enough

    ▣ Dependency Injection is not a silver bullet ▣ DCI ▣ CQRS (https://github.com/qandidate-labs/broadway) ▣ ?
  11. ▣ PHPUnit ▣ Codeception ▣ Just recently became “a must”

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

    ▣ Agnostic middlewares ▣ Architectural framework ▣ Loosely-coupled tools/libs