Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥

Symfony @ BlaBlaCar

Symfony @ BlaBlaCar

Talk given with Benjamin De Bernardi aka Junior (@Genes0r) during SymfonyCon Paris 2015

Olivier Dolbeau

December 04, 2015
Tweet

More Decks by Olivier Dolbeau

Other Decks in Programming

Transcript

  1. Leader ride-sharing service. Our goal is to become the 1st

    travel platform. 30€ 30€ 30€ 30€
  2. Symfony Upgrades Started with SF2 2.0 Upgrade as soon as

    we can Remove deprecated code Follow best practices 2.0 → 2.7
  3. Expected Deal with ∞ combination of brands / medias. Different

    configuration / views / ... Keep (a lot of) small containers.
  4. • Not that small containers • You need to add

    code in app_prod. php to choose the right kernel to boot. • You can’t easily use your application as a consumer. DON’T!
  5. What else? + Quick to bootstrap a new project +

    Quick to code a small project - Hard to respect MVC - Hard to deal with cache - Hard to deal with integrity problems in DB - Not made to decouple code (relations). - Not made to scale.
  6. Check eventName & event interface Dispatch the event in the

    application. Decorated EventDispatcher. Publish to RabbitMQ
  7. + Perfect to decouple code inside the app. + Small

    listeners, easy to understand, to test. + Easy to dispatch events outside application. + Scalable! - Sometimes, hard to understand what happen. - Need tools / rules to keep a common logic. - Try to limit entities usage. ;) What else?
  8. 29 582 Commits There are “only” 15 506 commits for

    symfony/symfony There are “only” 10 228 commits for joyent/node There are “only” 9 266 commits for twbs/bootstrap There are 44 809 commits for rails/rails (but it’s ruby… #troll)
  9. What else ? • Long learning curve • Too many

    side effects • Time consuming • Big maintenance • Spaghetti code
  10. The gateway ❖ It’s code ❖ It uses DDD ❖

    Everyone love it ❖ It’s very well organized ❖ There’s a lot of (very) strict rules ❖ It separates business logic & data access ❖ It’s a vendor ! Easy to use everywhere
  11. The gateway ❖ Flexible ❖ Easy to test ❖ Deployed

    when needed ❖ Used for all new projects
  12. Gateway V3 W W W W W C W C

    C C W Current ecosystem W • 90 workers • 40 commands
  13. V3 W W W W W C W C C

    C W Future ecosystem? W Gateway Gateway Gateway
  14. V3 W W W W W C W C C

    C W Future ecosystem? W B B B B B B D D D
  15. DO! DON’T! + Use feature flags / on the fly

    toggling. + Make code reviews. + Keep a clean codebase. + Use encapsulation! <3 + Be generic + Promote reusability - Onboard people too quickly. - Depend too much on the framework - Let your container get too big. - Try not to extend the framework.
  16. Symfony2 was a good choice. Even if we made lot

    of wrong choices. We’ll decouple!
  17. • Fail, learn, succeed! • Microservices FTW! • Be worldwide!

    • Bermudas are great tools to build performant websites Benjamin De Bernardi @Genes0r Olivier Dolbeau @odolbeau We’re hiring! In Paris & Warsaw! http://blbl.cr/dreamjobs