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

Software Architecture Anti-patterns

Software Architecture Anti-patterns

Talk given at Dutch PHP Conference 2016, with my co-host Dimitrios Psarrou.

Have you ever noticed that the project with too many architects trying to add their own favourite pattern changes into super complicated mess? And the project with an architect that sees all technological options equally viable never ever starts?

All those situations have been categorised, named and shamed and we will present them to you on a gold plated tray.

Jakub Gadkowski

June 24, 2016
Tweet

More Decks by Jakub Gadkowski

Other Decks in Programming

Transcript

  1. A SHORT INTRODUCTION PATTERN Describes a problem encountered on a

    regular basis, followed by abstracted solution. ANTI PATTERN Describes a broken solution and then proposes refactored, fixed solution.
  2. BIG BALL OF MUD ANTI-PATTERN TYPICAL SYMPTOMS AND CAUSES ‣

    Bad management decisions. ‣ Change of requirements. ‣ Inexperienced developers.
  3. ‣ Small step refactoring. ‣ Just tear it down. BIG

    BALL OF MUD ANTI-PATTERN SOLUTION Image source: http://gizmodo.com/10-mesmerizing-gifs-of-giant-buildings-being-demolished-611490671
  4. STOVEPIPE ANTI-PATTERN TYPICAL SYMPTOMS AND CAUSES ‣ Lack of an

    system strategy. ‣ Lack of communication. ‣ Lack of abstraction.
  5. THE NEW TOYS ANTI-PATTERN SYMPTOMS AND CAUSES ‣ Introducing new

    technology because it’s new. ‣ Picking technology that looks good on CV. ‣ Putting technology before user’s needs.
  6. THE NEW TOYS ANTI-PATTERN SOLUTION ‣ Does it solve end

    user problems? ‣ Does it make the system more complex? ‣ Is it proven technology for this solution? ‣ Is it compatible with the team skill set?
  7. GOLD PLATING ➤ The additional effort does not add value

    ➤ Also found in management • PMBoK • Prince 2 ➤ Introduces new risks • testing • documentation • costs • timelines src: http://www.stellman-greene.com/blog/wp-content/uploads/2007/06/silverware.png
  8. THE GRAND OLD DUKE OF YORK Abstractionists versus Implementationists src:

    http://www.cliffedgemarketing.com/assets/img/blog/Thinker%20vs.%20doer%20final.jpg
  9. THE GRAND OLD DUKE OF YORK - CAUSES AND CONSEQUENCES

    Software usability and system maintenance are impacted Excessive complexity Abstractions are compromised Abstractionists are outvoted Software design disasters that make the system difficult to develop could have been prevented by using effective abstraction principles
  10. THE GRAND OLD DUKE OF YORK Specialisations: ➤ Architects ➤

    Component Developers ➤ Application Developers
  11. THE ARMCHAIR ARCHITECT ➤ Can solve all the software world's

    problems from his armchair ➤ Implementation is out of scope ➤ Avoids testing his great ideas with reality ➤ Dismisses everything that anyone else has done Popular quotes ➤ User interfaces are all worthless ➤ All web browsers, including the Web itself, are worthless ➤ Everything will change within 5-10 years, due to me personally ➤ Programmers are all unethical idiots working for evil corporations
  12. THE ARMCHAIR ARCHITECT Causes ➤ Whiteboard sketches are handed off

    as final architecture ➤ Architects don’t code ➤ Architects play golf ➤ Blame the implementers src: https://allthingslearning.files.wordpress.com/2012/06/ivory-tower-tg-version.png
  13. THE ARMCHAIR ARCHITECT - SOLUTION ➤ Be involved with the

    project ➤ Eat your own dog food ➤ Lead by example ➤ Pair programming ➤ Code reviewing ➤ Shared understanding src: http://www.informit.com/content/images/chap3_9780321247131/elementLinks/03fig01.jpg
  14. Covering your assets - providing excessive amount of documents and

    options without actually making any decision. Image source: Fallout 4, copyright Bethesda 2016
  15. COVER YOUR ASSETS ANTI-PATTERN TYPICAL SYMPTOMS AND CAUSES ‣ Document

    Driven Development syndrome. ‣ Safeguarding from (all) potential failures.
  16. COVER YOUR ASSETS ANTI-PATTERN SOLUTION ‣ Propose options, explain and

    recommend the best solution. ‣ Introduce Architecture Blueprints.
  17. DESIGN BY COMMITTEE ANTI-PATTERN TYPICAL SYMPTOMS AND CAUSES ‣ Conflicting

    interpretations of the design. ‣ Politics affects the design. ‣ Unproductive, slow process of meetings and improvements.
  18. DESIGN BY COMMITTEE ANTI-PATTERN SOLUTION ‣ Small teams of experts.

    ‣ Establish roles and responsibilities. ‣ Improve committee meetings. ‣ Improve decision process: ATAM, LAAAM.
  19. REINVENT THE WHEEL ANTI-PATTERN TYPICAL SYMPTOMS AND CAUSES ‣ Closed

    system architecture. ‣ Lack of knowledge. ‣ Jealousy. ‣ Detrimental enterprise culture.
  20. REINVENT THE WHEEL ANTI-PATTERN SOLUTION ‣ Improve (internal) communication. ‣

    Research on existing solutions. ‣ Influence company culture.
  21. VENDOR LOCK-IN Aka Bondage and Submission ➤ Complete dependency on

    vendor implementation ➤ Lack of control ➤ Quantifiable ➤ Exceptions • When the majority of functionality needed is made by a specific vendor
  22. VENDOR LOCK-IN Vendor lock in is everywhere ➤ Business lock

    in ➤ Technology lock in ➤ Cloud lock in src: http://www.mspmentor.net/wp-content/uploads/2012/11/cloud-lock-in-300x225.jpeg
  23. VENDOR LOCK-IN - TAKEAWAYS ➤ Vendor lock in is quantifiable

    ➤ Business lock in is the hardest to escape ➤ There is no real elimination of lock in. Only mitigation of the costs ➤ Pay the switching costs when the lock in becomes an impediment to your objectives ➤ Always prepare your exit strategy
  24. SPIDERWEB ARCHITECTURE ➤ Aka a million services all in a

    row ➤ Creating large number of services, because you can. ➤ Problems • Confusion • Maintenance cost ‣ Solution • Let the requirements drive what needs to be exposed
  25. ONE MODEL TO RULE THEM ALL ➤ Single domain fallacy

    ➤ There are no bounded contexts ➤ Complexity and integration issues
  26. ONE MODEL TO RULE THEM ALL - SOLUTION ➤ DDD

    ➤ Bounded contexts ➤ CQRS src: http://martinfowler.com/bliki/CQRS.html
  27. REFERENCES ➤ Antipatterns, Refactoring Software, Architectures, Projects in Crisis, William

    J. Brown Raphael C. Malveau Hays W. McCormick III Thomas J. Mowbray John Wiley & Sons, Inc. 1998 ➤ Adrian Cockcroft - OpenStack Silicon Valley 2015 - Web Services and Microservices: The Effect on Vendor Lock In ➤ Domain Driven Design - Eric Evans, 2004 ➤ Implementing DDD - Vaugh Vernon 2013 ➤ Building Microservices - Sam Newman 2015 ➤ Daniel Bryant - The seven deadly sins of micro services - Devox UK, 2016 ➤ https://sourcemaking.com/antipatterns ➤ http://c2.com/cgi/wiki ➤ http://nealford.com/ ➤ http://martinfowler.com/ ➤ https://www.nginx.com/blog/building-microservices-inter-process-communication/ ➤ https://www.infoq.com/articles/SOA-anti-patterns ➤ http://richard.dallaway.com/architecture/