SlideShare a Scribd company logo
MODULAR VS MONOLITH
TIM OXLEY
GOOD
MORNING! 🌞
TIM OXLEY
@secoif

github.com/timoxley
MODULAR VS MONOLITH
ME IN 2012: 👶
ME IN 2012:

“AVOID FRAMEWORKS” 🗿
ME IN 2012:

“BUILD LIBRARIES INSTEAD” 🎊
BUILDING A LIBRARY
▸ Reusable!
▸ More Robust!
▸ Higher Quality Code!
▸ Better Documentation!
▸ Better Tests!
▸ Open Source!
ME IN 2012:

“LIBRARY-FIRST DEVELOPMENT” 🎵
ME IN 2015:

“YES BUT, THERE ARE SOME 

MAJOR CAVEATS…” 😮
RABBIT HOLES
EVERYWHERE 🕳
LIBRARIES ARE A
LOT OF WORK 💝
NOTHING
FOR FREE 💔
MOST OF THE TIME:
YAGNI 🚮
gunshowcomic.com
WHAT PROBLEM AM I TRYING TO
SOLVE?
IS THIS THE SIMPLEST THING THAT
WILL WORK? 🛀
NOT EVERYTHING NEEDS A
MILITARY-GRADE
SOLUTION
ENGINEERS HAVE A
STRONG URGE TO
OVER-ENGINEER
ENGINEERS OFTEN
BUILD THINGS WE WANT,
RATHER THAN THINGS
WE NEED
Modular vs Monolith
ENGINEERS OFTEN SPEND
HOURS TO
SAVE MINUTES
OVER-ENGINEERING: THE
ADDING OF UNNECESSARY
COMPLEXITY 🚼
COMPLEXITY KILLS
PROJECTS 💣
OVER-ENGINEERING

IS MORE COMMON THAN
UNDER-ENGINEERING 📠
xkcd.com
OVER-ENGINEERING

IS MORE COSTLY THAN
UNDER-ENGINEERING 💰
DEFER
DECISIONS 🐛
THE WRONG STRUCTURE CAN BE
MORE COSTLY

THAN NO STRUCTURE AT ALL 🎷
STRUCTURE CAN BE MORE EASILY
EXTRACTED FROM LOOSE STRUCTURE.
INCORRECT & COMPLEX STRUCTURE
NEEDS TO BE TORN DOWN BEFORE
BUILDING NEW STRUCTURE
ASSUME YOUR FIRST
ATTEMPT WILL BE BAD 💩
MAKE DECISIONS THAT
ARE EASY TO REVERSE
OPTIMISE FOR
DELETION
DRAW IN PENCIL BEFORE
YOU DRAW IN INK ✏
BEST WAY TO PLAN FOR INEVITABLE,
UNEXPECTED CHANGES: DON’T INVEST TOO
MUCH IN SOLVING TODAY’S PROBLEMS
THE PERFECT SOLUTION FOR TODAY MAY BE A
TERRIBLE SOLUTION FOR TOMORROW
TREAD LIGHTLY
NODE.JS:

CULTURE OF EXTREME
MODULARITY 🌯
PUBLISHING TO NPM IS
NOT THE ONLY WAY TO DO
“MODULAR” CODE. 📡
FUNCTION
STATEMENT
FILE
FOLDER
INTERNAL PACKAGE
EXTERNAL PACKAGE
(BAD DEFAULT)
AVOID

PREMATURE
ABSTRACTION 🔮
ABSTRACTIONS

DECREASE LOCAL COMPLEXITY

WHILE
INCREASING GLOBAL COMPLEXITY 🍩
BUILDING THE WRONG
THING FOR THE RIGHT
REASONS 🏭
FLAT IS BETTER
THAN NESTED 🌈
FLAT IS BETTER THAN NESTED APPLIES AT ALL LEVELS
▸ At the statement level: avoid nested if/else.
▸ At the function level: avoid unnecessary nested calls
▸ At the class level: avoid deeply inheritance hierarchies.
▸ At the file level: avoid deeply nested directories.
▸ At the project level: avoid deeply nested projects.
BUILD THE SIMPLEST
THING THAT WORKS 🔑
THE SIMPLEST THING
IS PROBABLY FLAT 🗺
MODULAR VS MONOLITH
THE SWEET SPOT IS
SOMEWHERE IN THE MIDDLE
A MODULITH?
MONOLITH

FIRST 🏛
PROGRESSIVE
MODULARISATION ✂
FUNCTION
STATEMENT
FILE
FOLDER
INTERNAL PACKAGE
EXTERNAL PACKAGE
OPEN SOURCE
LATER 🎁
MAKE SURE WHAT YOU’RE
BUILDING ACTUALLY MAKE SENSE
AND IS USEFUL IN PRODUCTION.
LESS
ABANDONWARE 🏚
openopensource.org
LESS

OVER-ENGINEERING 🏋
BUILD THE SIMPLEST
THING THAT WORKS 🎷
AVOID

UNNECESSARY
COMPLEXITY 🍲
THANK YOU!
@secoif

github.com/timoxley

campjs.com

More Related Content

PDF
The how instead of what syndrome
PDF
Enterprise Social Networking : Social Media Week presentation
PDF
(PROJEKTURA) HRUSKO Project Management Thruths
PDF
Well-designed Good(s)
PPTX
12 Most Profound Quotes from Facebooks CEO Mark Zuckerberg
PPTX
Steve Jobs Inspirational Quotes
PPTX
Treasure Mountain Share
ODP
Finding a Great Project to Work On: For Non-technical Folks
The how instead of what syndrome
Enterprise Social Networking : Social Media Week presentation
(PROJEKTURA) HRUSKO Project Management Thruths
Well-designed Good(s)
12 Most Profound Quotes from Facebooks CEO Mark Zuckerberg
Steve Jobs Inspirational Quotes
Treasure Mountain Share
Finding a Great Project to Work On: For Non-technical Folks

Viewers also liked (20)

PDF
Menos overengineering: Notepad++
PPT
Overengineering Simplicity
PDF
Built it, but nobody came: avoiding over-engineering
PDF
Organisational Wiki Adoption
PDF
Internet of Things - Benefits for the Ummah
PDF
How Ceph performs on ARM Microserver Cluster
PDF
Facebook Platform - Hack Thursday CW 40
PPTX
HockeyApp is not an app
PPT
Currency matters trading platform vision v1.1
DOCX
Rmt ganti
PDF
Digitalisierung mit UNIT4
PPT
Degrafa Overview
PDF
Proven Mobile Solutions that Increase Productivity, Visibility and Sales
PDF
Inception Product Feature Webinar: Workflow, Versioning & Restore
PDF
Embedded Reporting Tools to Enhance Your Application
PDF
Starting up - Lessons learned from the trenches
PPTX
TechZarInfo web design and development
PDF
Serveau software f
PPT
Small business solutions worldwide
PPTX
Business Intelligence: A Financial Perspective
Menos overengineering: Notepad++
Overengineering Simplicity
Built it, but nobody came: avoiding over-engineering
Organisational Wiki Adoption
Internet of Things - Benefits for the Ummah
How Ceph performs on ARM Microserver Cluster
Facebook Platform - Hack Thursday CW 40
HockeyApp is not an app
Currency matters trading platform vision v1.1
Rmt ganti
Digitalisierung mit UNIT4
Degrafa Overview
Proven Mobile Solutions that Increase Productivity, Visibility and Sales
Inception Product Feature Webinar: Workflow, Versioning & Restore
Embedded Reporting Tools to Enhance Your Application
Starting up - Lessons learned from the trenches
TechZarInfo web design and development
Serveau software f
Small business solutions worldwide
Business Intelligence: A Financial Perspective
Ad

Similar to Modular vs Monolith (20)

PPT
Salzburg Keynote March 27, 2007
PDF
¿Que necesita para ser una buena desarrolladora?
PPTX
¿Que se necesita para ser una buena desarrolladora
PDF
NADC19 Dennis Hambeukers - Increasing human problem-solving capacity with design
PPTX
Common Core in the Cloud 2013: College & Career Readiness & Common Core natio...
PDF
Advancing the web without breaking it - #btconf
PDF
Emergent Patterns in DevOps
PPTX
the_pragmatic_programmer_ch.1.pptx
PDF
How to Craft and Deliver Winning Presentations
PPTX
Inclusion in Emerging Technology | Seattle Interactive 2017
PDF
Great Coding Skills Aren't Enough
PDF
Seo automation using gpt 3 and transformer-based language models
PDF
8 Steps to Global Collaboration for Every Classroom
PDF
Clean(er) Code - Tech'n'Drinks @myposter
PPTX
Common Core in the Cloud June 2013 #tic13
PDF
Pressing the Big Scary Red Button
PDF
Steward of Possible
PDF
Developers, you're designing experiences (and you didn't even know it)
PPTX
Design principles in a nutshell
PPTX
Design principles in a nutshell
Salzburg Keynote March 27, 2007
¿Que necesita para ser una buena desarrolladora?
¿Que se necesita para ser una buena desarrolladora
NADC19 Dennis Hambeukers - Increasing human problem-solving capacity with design
Common Core in the Cloud 2013: College & Career Readiness & Common Core natio...
Advancing the web without breaking it - #btconf
Emergent Patterns in DevOps
the_pragmatic_programmer_ch.1.pptx
How to Craft and Deliver Winning Presentations
Inclusion in Emerging Technology | Seattle Interactive 2017
Great Coding Skills Aren't Enough
Seo automation using gpt 3 and transformer-based language models
8 Steps to Global Collaboration for Every Classroom
Clean(er) Code - Tech'n'Drinks @myposter
Common Core in the Cloud June 2013 #tic13
Pressing the Big Scary Red Button
Steward of Possible
Developers, you're designing experiences (and you didn't even know it)
Design principles in a nutshell
Design principles in a nutshell
Ad

More from Timothy Oxley (6)

PDF
Components vs Frameworks
PDF
Bundling Client Side Assets
PDF
component: ruby gems for the browser
PDF
Benefits of Clientside templating for Red Dot Ruby
PDF
Intro to testing Javascript with jasmine
PPT
Testable client side_mvc_apps_in_javascript
Components vs Frameworks
Bundling Client Side Assets
component: ruby gems for the browser
Benefits of Clientside templating for Red Dot Ruby
Intro to testing Javascript with jasmine
Testable client side_mvc_apps_in_javascript

Recently uploaded (20)

PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PPTX
Operating system designcfffgfgggggggvggggggggg
PPT
Introduction Database Management System for Course Database
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PPTX
Transform Your Business with a Software ERP System
PDF
System and Network Administraation Chapter 3
PDF
Digital Systems & Binary Numbers (comprehensive )
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PPTX
Computer Software and OS of computer science of grade 11.pptx
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PPTX
assetexplorer- product-overview - presentation
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
Digital Strategies for Manufacturing Companies
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PPTX
CHAPTER 2 - PM Management and IT Context
wealthsignaloriginal-com-DS-text-... (1).pdf
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Operating system designcfffgfgggggggvggggggggg
Introduction Database Management System for Course Database
Upgrade and Innovation Strategies for SAP ERP Customers
2025 Textile ERP Trends: SAP, Odoo & Oracle
Transform Your Business with a Software ERP System
System and Network Administraation Chapter 3
Digital Systems & Binary Numbers (comprehensive )
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Odoo Companies in India – Driving Business Transformation.pdf
Navsoft: AI-Powered Business Solutions & Custom Software Development
Computer Software and OS of computer science of grade 11.pptx
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
assetexplorer- product-overview - presentation
Which alternative to Crystal Reports is best for small or large businesses.pdf
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Digital Strategies for Manufacturing Companies
Design an Analysis of Algorithms I-SECS-1021-03
CHAPTER 2 - PM Management and IT Context

Modular vs Monolith