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

Mendercon2022: From Chaos Code to Hexagonal Arc...

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers. →

Mendercon2022: From Chaos Code to Hexagonal Architecture

The talk will present the techniques to refactor legacy code in order to move to a clean architecture, that separate business logic from technical infrastructure.

Avatar for oussamabadr

oussamabadr

June 08, 2022

Other Decks in Programming

Transcript

  1. From Chaos Code to Hexagonal Architecture Oussama BADR / @ousamabadr

    CTO/Software Engineer @Agil-IT - Paris #mendercon2022
  2. What we will discuss: • Introduction • Legacy all around

    • Other Legacy Staff to consider • Hexagonal to the rescue • Hexagonal in Action • TL;DR #mendercon2022
  3. Legacy all around #mendercon2022 “Legacy Code is also a code

    with no boundaries, and especially when it comes to business logic.” Oussama BADR
  4. Other Legacy Stuff #mendercon2022 You need to sell you idea

    and convince others that Legacy code is really LEGACY
  5. Who is the second ? #mendercon2022 Hexagonal to the Rescue

    Alistair Cockburn American computer scientist (Source Wikipedia) “Hexagonal architecture” Article (2005): https://alistair.cockburn.us/hexagonal-architecture/
  6. First Motivations: #mendercon2022 Hexagonal to the Rescue • The system

    can’t neatly be tested. • Impossible to shift from a use case to another. • It becomes difficult or impossible to change technologie. We can also add: • Test suite can slow down very quickly. • Changing one business logic becomes a “new project” • Developer may quits if productivity decrease. • …etc
  7. Resources #mendercon2022 • “The Clean Architecture” By Uncle Bob: https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html

    • “Hexagonal architecture” Article : https://alistair.cockburn.us/hexagonal-architecture/ • GitHub: Domain-driven-hexagon https://github.com/Sairyss/domain-driven-hexagon • GitHub: Implementation of a Hexagonal Architecture: https://github.com/thombergs/buckpal