SlideShare a Scribd company logo
Antifragile
Software Design
Hayim Makabee
http://EffectiveSoftwareDesign.com
About Me:
Education:
Experience:
Current:
Antifragile
 This presentation is inspired on the
book “Antifragile” by Nassim Taleb.
The Triad: Antifragility,
Robustness, and Fragility
 Fragile things are exposed
to volatility, so that volatility
is prejudicial to them.
 Robust things are immune
to volatility, so that volatility
does not affect them.
 Antifragile things enjoy
volatility, so that volatility is
beneficial to them.
The Triad Over Time
 Fragile things: Break, erode or deteriorate.
 Robust things: Stay the same.
 Antifragile things: Evolve, improve, get
better.
Antifragility vs. Resilience
 “Antifragility is beyond resilience or
robustness. The resilient resists
shocks and stays the same; the
antifragile gets better.”
Nonpredictive Decision
Making
“Sensitivity to harm from volatility is
tractable, more so than forecasting the
event that would cause the harm.”
Aligned with Agile principle:
“Responding to change over following a
plan.”
Volatility in Software Design
In the case of software systems,
volatility appears in the form of changes
over time.
Changes are unavoidable, as
expressed in the Lehman laws of
software evolution:
“Continuing Change — A software
system must be continually adapted or
it becomes progressively less
satisfactory.”
Changes in Software Design
 Functional changes:
◦ Required to implement new requirements, or
to implement modifications in the
requirements.
◦ Have an impact on the system’s behavior
and functionality.
 Non-functional changes:
◦ Required to improve the quality of the design.
◦ Are normally the result of Refactoring and
focus on the reduction of Technical Debt.
◦ Should not affect the system’s behavior or
functionality.
Barbell Strategy
“Barbell Strategy: A dual strategy, a
combination of two extremes, one safe
and one speculative, deemed more
robust than a ‘monomodal’ strategy.”
Example of Barbell Strategy
“An investment strategy in which half
the portfolio is made up of long-term
bonds and the other half of very short-
term bonds.”
Barbell Strategy in Software
What is the software equivalent of a
Barbell Strategy?
The answer is: Abstraction. Software
systems should have a structure and
organization based on different levels of
abstraction.
The duality of the Barbell Strategy is
expressed as the separation between
high-level abstract elements and
concrete implementation details.
Abstract and Concrete
Elements
 Abstract elements: Are robust, and
should not be easily affected by
changes.
 Concrete implementation details: Are
fragile, directly affected by changes.
 Software systems should be built in
such a way that the volatility
(changes):
◦ Does not affect its structure and
organization, preserving the main, high-
level abstractions.
◦ Requires modifications only on the low-
Applications of the Barbell
Strategy
 Information Hiding
 Encapsulation
 Open/Closed Principle
 TDD
 Inheritance Hierarchies
 Frameworks
Information Hiding
Information Hiding was defined by
David Parnas as a criterion to
decompose a system into modules:
“Every module … is characterized by its
knowledge of a design decision which it
hides from all others. Its interface or
definition was chosen to reveal as little
as possible about its inner workings.”
Encapsulation
The mechanism of Encapsulation in Object
Oriented Programming (OOP) is a direct
application of Information Hiding.
The interface of a class is separated from
its implementation, and thus the
implementation may be changed without
affecting the clients of the class.
Thanks to encapsulation, the clients of a
class become less fragile to changes in its
implementation details.
Open/Closed Principle
The Open-Closed Principle (OCP) was
defined by Bertrand Meyer as:
“Software entities (classes, modules,
functions, etc.) should be open for
extension, but closed for modification.”
The implementation of the OCP
requires the definition of an abstraction,
so that each possible extension is a
specialization of this abstraction.
Strategy Design Pattern
TDD: Test-Driven
Development
The fundamental idea of TDD is to write the
tests before writing the code.
 TDD focuses on the early separation
between abstractions and concrete
implementation details.
 Requires the definition of abstract interfaces
and behavior for the classes being tested.
 Allows the code to be easily refactored,
because the unit tests would catch any
mistake.
 The unit tests are less fragile to volatility
(changes) because they are based on
abstractions.
Inheritance Hierarchies
In OOP, an inheritance
hierarchy organizes classes according to a
generalization-specialization rationale.
Classes near the root of the hierarchy are
more abstract than the classes on the
leaves of the inheritance tree.
The abstract classes should be less fragile
than the concrete classes, meaning that
they should be less subject to impact
caused by volatility, such as changes in
the requirements or changes in the
implementation details.
Frameworks
Frameworks provide reusable code that is
not application-specific, defining
abstractions and the relationships among
them.
The software developer extends the
framework, deriving concrete subclasses,
and writing the implementation details to
satisfy the requirements of a specific
application.
These implementation details are fragile,
but the framework is not, and may be
reused with no changes on many
Robust vs. Fragile
Robust Fragile
Dependency on interface Dependency on
implementation details
Client of encapsulated
class
Client of class with public
members
Class that may be
extended without
modifications
Class that needs to be
modified to be extended
Unit Tests Implementation of the
classes being tested
Abstract Class Concrete Class
Generic Framework Application-specific
extension of the
Conclusions so far
 Software systems are subject to volatility
in the form of changing requirements.
 Concrete implementation details are
fragile and directly affected by these
changes
 A Barbell Strategy defines concrete
details as the specialization of higher-
level abstractions.
 Proper abstractions should be robust,
surviving the impact of changes.
 Details change over time, but the system
structure and organization may be
preserved because it is based on
abstractions.
Antifragile Whole, Fragile
Parts
“The antifragility of the whole often
depends on the fragility of the parts.”
Componentization
It is common knowledge that systems
should be divided into components.
The reaction to a change in the
environment should only affect a few
components, and not the entire system.
Thus, component-based systems are
more robust than monolithic systems.
Antifragility through
Componentization
To be Antifragile, a system must be able
to benefit from changes in the
environment.
Antifragility may be achieved when
several systems share the same
components.
When a specific component is
improved, all systems using this
component can benefit from this
improvement.
Example: Rechargeable
Batteries
All users of traditional AA batteries can
benefit from improved technology of
rechargeable ones.
Coupling and Cohesion
Principles to guide the decomposition of
large software systems into modules:
 Coupling: The degree of dependency
between two modules. We always
want low coupling.
 Cohesion: The measure of how
strongly-related is the set of functions
performed by a module. We always
want high cohesion.
Applications of
Componentization
 DLLs
 ORBs
 SOA
 Microservices
 Software Product Lines
DLL: Dynamic Link Library
“DLLs provide a mechanism for shared code
and data, allowing a developer of shared
code/data to upgrade functionality without
requiring applications to be re-linked or re-
compiled.”
ORB: Object Request Broker
“An ORB acts as a broker between a client
request for a service from a distributed object
or component and the completion of that
request.”
SOA: Service-Oriented
Architecture
SOA Principles
1. Standardized Service Contracts
2. Service Loose Coupling
3. Service Abstraction
4. Service Reusability
5. Service Autonomy
6. Service Statelessness
7. Service Discoverability
8. Service Composability
9. Service Interoperability
Service Reusability
“Services contain and express agnostic
logic and can be positioned as reusable
enterprise resources.”
“Logic is divided into services with the
intent of maximizing reuse.”
Thus services should not be part of a
single system, they should be reused in
multiple systems.
Microservices
Microservices Practices (I)
1. Separated Build:
◦ Each Microservice is built independently
and has its own version.
2. Independent Deployment:
◦ Each Microservice may be deployed
without affecting the others.
3. Separated Data Stores:
◦ Microservices should not share data stores.
4. Independence of Platform:
◦ Microservices should be deployed in
containers.
Microservices Practices (II)
5. Individual Technology Choice:
◦ Each Microservice may be implemented
using a different technology.
6. Confinement of Failure:
◦ If a failure occurs in a particular
Microservice it should not propagate to
the other ones.
7. Independent Scalability:
◦ It should be possible to scale each
Microservice independently of the others.
Systems, Services and
Antifragility
At any point in time it is possible to deploy
an enhanced version of one of the
services without affecting the other ones.
If there are several systems based on
shared services, each time one of these
services is improved all the systems will be
able to immediately benefit from the
improvement.
While each system is robust, the collection
of systems is Antifragile, because they
benefit from the same changes at no
added cost.
Software Product Lines
In a Software Product Line (SPL), a
series of software products are based
on the same components and differ only
on their configuration.
In the case of SPLs there may be
several coexisting versions for each
component.
Each time a new component version is
created, all the products using previous
versions may benefit through simple
configuration updates.
Antifragile vs. Fragile
Antifragile Fragile
Several programs linking
to the same DLLs
A specific version of a
Dynamic Link Library
Several Client objects
calling the same Servant
object
The implementation
details of a specific
Servant object
Several Systems
accessing the same
Services
The implementation
details of a specific
Service
Several Applications using
shared Microservices
The implementation
details of a specific
Microservice
Several Products based A specific version of a
Conclusions
 A simple strategy for Antifragility is:
Build component-based systems with
shared components.
 When one of the shared components
is improved all the systems will be
able to benefit from this improvement
at no additional cost.
Thanks!
Q&A
http://EffectiveSoftwareDesign.com

More Related Content

What's hot (20)

PPT
VMWare Wpg Jeff Franz-Lien
jfranzlien
 
PDF
Resilient Functional Service Design
Uwe Friedrichsen
 
PPTX
Containers: DevOp Enablers of Technical Solutions
Jules Pierre-Louis
 
PPTX
What does performance mean in the cloud
Michael Kopp
 
PPT
Slides chapter 1
Priyanka Shetty
 
PPTX
DevOps Overview
Sagar Mody
 
PDF
Java Community Webinar #8: “High Performance Systems Design”
GlobalLogic Ukraine
 
PPTX
Scaling Enterprise DevOps with CloudBees
Deborah Schalm
 
PPTX
Software engineering : Layered Architecture
Muhammed Afsal Villan
 
PDF
Software systems engineering PRINCIPLES
Ivano Malavolta
 
PPTX
From Agile Development to Agile Operations (QCon SF 2009)
Stuart Charlton
 
PDF
Aspect Oriented Development
tyrantbrian
 
PDF
Java DevOps at Enterprise Scale
Ryan McGuinness
 
PPTX
Requirements Management Using Innoslate
Elizabeth Steiner
 
PPTX
Security Design Concepts
Mohammed Fazuluddin
 
PPTX
Adopting DevOps @ Scale: Lessons learned at Hertz, Kaiser Permanente and lBM
Jules Pierre-Louis
 
PPTX
Linux and Java - Understanding and Troubleshooting
Jérôme Kehrli
 
PDF
Engineering Software Products: 5. cloud based software
software-engineering-book
 
PPT
VMWare Winnipeg Forum - 2011
asedha
 
PPT
Intro
hinaaaa123
 
VMWare Wpg Jeff Franz-Lien
jfranzlien
 
Resilient Functional Service Design
Uwe Friedrichsen
 
Containers: DevOp Enablers of Technical Solutions
Jules Pierre-Louis
 
What does performance mean in the cloud
Michael Kopp
 
Slides chapter 1
Priyanka Shetty
 
DevOps Overview
Sagar Mody
 
Java Community Webinar #8: “High Performance Systems Design”
GlobalLogic Ukraine
 
Scaling Enterprise DevOps with CloudBees
Deborah Schalm
 
Software engineering : Layered Architecture
Muhammed Afsal Villan
 
Software systems engineering PRINCIPLES
Ivano Malavolta
 
From Agile Development to Agile Operations (QCon SF 2009)
Stuart Charlton
 
Aspect Oriented Development
tyrantbrian
 
Java DevOps at Enterprise Scale
Ryan McGuinness
 
Requirements Management Using Innoslate
Elizabeth Steiner
 
Security Design Concepts
Mohammed Fazuluddin
 
Adopting DevOps @ Scale: Lessons learned at Hertz, Kaiser Permanente and lBM
Jules Pierre-Louis
 
Linux and Java - Understanding and Troubleshooting
Jérôme Kehrli
 
Engineering Software Products: 5. cloud based software
software-engineering-book
 
VMWare Winnipeg Forum - 2011
asedha
 
Intro
hinaaaa123
 

Similar to Antifragile Software Design (20)

DOCX
Software engineering Questions and Answers
Bala Ganesh
 
PDF
Software design principles - jinal desai
jinaldesailive
 
PPTX
effective modular design.pptx
Dr.Shweta
 
PDF
Reactive Architecture
Knoldus Inc.
 
PDF
Reactive - Is it really a Magic Pill?
Tech Triveni
 
PDF
Ports adapters architecture (hexagonal architecture)
Farhad Taran
 
PDF
RESILIENT VOTING MECHANISMS FOR MISSION SURVIVABILITY IN CYBERSPACE: COMBININ...
IJNSA Journal
 
PDF
114 425-433
idescitation
 
PDF
5. oose design new copy
Ashenafi Workie
 
PPTX
System design process.pptx
NajibMuhammad16
 
PDF
Microservices vs. Monolithic Architecture.pdf
Digital Aptech
 
PPTX
SOFTWARE DESIGN ENGINEERING UNIT-3 PPT.pptx
KritagyaTiwari
 
PDF
Clean Code .Net Cheetsheets
NikitaGoncharuk1
 
PPTX
Software Design abtic.pptx
ssuser8c0d24
 
PDF
dist_systems.pdf
CherenetToma
 
PDF
Nina Grantcharova - Approach to Separation of Concerns via Design Patterns
iasaglobal
 
PPTX
Software Engineering CSE/IT.pptx
TheULTIMATEALLROUNDE
 
PPTX
Lecture 11
Rana Ali
 
PPT
Requirement Engineering for Dependable Systems
Kamalika Guha Roy
 
PPTX
An ultimate guide to SOLID Principles, developers must know.
ONE BCG
 
Software engineering Questions and Answers
Bala Ganesh
 
Software design principles - jinal desai
jinaldesailive
 
effective modular design.pptx
Dr.Shweta
 
Reactive Architecture
Knoldus Inc.
 
Reactive - Is it really a Magic Pill?
Tech Triveni
 
Ports adapters architecture (hexagonal architecture)
Farhad Taran
 
RESILIENT VOTING MECHANISMS FOR MISSION SURVIVABILITY IN CYBERSPACE: COMBININ...
IJNSA Journal
 
114 425-433
idescitation
 
5. oose design new copy
Ashenafi Workie
 
System design process.pptx
NajibMuhammad16
 
Microservices vs. Monolithic Architecture.pdf
Digital Aptech
 
SOFTWARE DESIGN ENGINEERING UNIT-3 PPT.pptx
KritagyaTiwari
 
Clean Code .Net Cheetsheets
NikitaGoncharuk1
 
Software Design abtic.pptx
ssuser8c0d24
 
dist_systems.pdf
CherenetToma
 
Nina Grantcharova - Approach to Separation of Concerns via Design Patterns
iasaglobal
 
Software Engineering CSE/IT.pptx
TheULTIMATEALLROUNDE
 
Lecture 11
Rana Ali
 
Requirement Engineering for Dependable Systems
Kamalika Guha Roy
 
An ultimate guide to SOLID Principles, developers must know.
ONE BCG
 
Ad

More from Hayim Makabee (20)

PDF
Movie Quotes Search Engine Industrial Project
Hayim Makabee
 
PPTX
Managing your Reputation
Hayim Makabee
 
PPTX
Applications of Machine Learning - INDT Webinar
Hayim Makabee
 
PPTX
Applications of Machine Learning
Hayim Makabee
 
PPTX
Blue Ocean Strategy: KashKlik Use Case
Hayim Makabee
 
PPTX
Managing your Reputation Gvahim Webinar
Hayim Makabee
 
PPTX
Explainable Machine Learning (Explainable ML)
Hayim Makabee
 
PPTX
Automated Machine Learning (Auto ML)
Hayim Makabee
 
PPTX
Managing your Reputation
Hayim Makabee
 
PPTX
The Story of a Young Oleh (Immigrant in Israel)
Hayim Makabee
 
PPTX
Software Architecture for Agile Development
Hayim Makabee
 
PPTX
Adaptable Designs for Agile Software Development
Hayim Makabee
 
PPTX
Applications of Machine Learning
Hayim Makabee
 
PPTX
To document or not to document? An exploratory study on developers' motivatio...
Hayim Makabee
 
PDF
To document or not to document? An exploratory study on developers' motivatio...
Hayim Makabee
 
PPTX
The SOLID Principles Illustrated by Design Patterns
Hayim Makabee
 
PPTX
Aliyah: Looking for a hi-tech job in Israel
Hayim Makabee
 
PPTX
The Role of the Software Architect (short version)
Hayim Makabee
 
PPTX
Software Quality Attributes
Hayim Makabee
 
PDF
Reducing Technical Debt: Using Persuasive Technology for Encouraging Software...
Hayim Makabee
 
Movie Quotes Search Engine Industrial Project
Hayim Makabee
 
Managing your Reputation
Hayim Makabee
 
Applications of Machine Learning - INDT Webinar
Hayim Makabee
 
Applications of Machine Learning
Hayim Makabee
 
Blue Ocean Strategy: KashKlik Use Case
Hayim Makabee
 
Managing your Reputation Gvahim Webinar
Hayim Makabee
 
Explainable Machine Learning (Explainable ML)
Hayim Makabee
 
Automated Machine Learning (Auto ML)
Hayim Makabee
 
Managing your Reputation
Hayim Makabee
 
The Story of a Young Oleh (Immigrant in Israel)
Hayim Makabee
 
Software Architecture for Agile Development
Hayim Makabee
 
Adaptable Designs for Agile Software Development
Hayim Makabee
 
Applications of Machine Learning
Hayim Makabee
 
To document or not to document? An exploratory study on developers' motivatio...
Hayim Makabee
 
To document or not to document? An exploratory study on developers' motivatio...
Hayim Makabee
 
The SOLID Principles Illustrated by Design Patterns
Hayim Makabee
 
Aliyah: Looking for a hi-tech job in Israel
Hayim Makabee
 
The Role of the Software Architect (short version)
Hayim Makabee
 
Software Quality Attributes
Hayim Makabee
 
Reducing Technical Debt: Using Persuasive Technology for Encouraging Software...
Hayim Makabee
 
Ad

Recently uploaded (20)

PDF
Troubleshooting Virtual Threads in Java!
Tier1 app
 
PDF
Download iTop VPN Free 6.1.0.5882 Crack Full Activated Pre Latest 2025
imang66g
 
PPTX
Farrell__10e_ch04_PowerPoint.pptx Programming Logic and Design slides
bashnahara11
 
PPTX
Contractor Management Platform and Software Solution for Compliance
SHEQ Network Limited
 
PDF
Supabase Meetup: Build in a weekend, scale to millions
Carlo Gilmar Padilla Santana
 
PPTX
Presentation about Database and Database Administrator
abhishekchauhan86963
 
PPTX
ChessBase 18.02 Crack + Serial Key Free Download
cracked shares
 
PDF
Salesforce Pricing Update 2025: Impact, Strategy & Smart Cost Optimization wi...
GetOnCRM Solutions
 
PDF
Balancing Resource Capacity and Workloads with OnePlan – Avoid Overloading Te...
OnePlan Solutions
 
PDF
Enhancing Security in VAST: Towards Static Vulnerability Scanning
ESUG
 
PDF
MiniTool Power Data Recovery Crack New Pre Activated Version Latest 2025
imang66g
 
PPT
Why Reliable Server Maintenance Service in New York is Crucial for Your Business
Sam Vohra
 
PDF
Malaysia’s e-Invoice System: A Complete Guide for Businesses
Matiyas Solutions
 
PDF
How Agentic AI Networks are Revolutionizing Collaborative AI Ecosystems in 2025
ronakdubey419
 
PDF
Step-by-Step Guide to Install SAP HANA Studio | Complete Installation Tutoria...
SAP Vista, an A L T Z E N Company
 
PDF
AI Image Enhancer: Revolutionizing Visual Quality”
docmasoom
 
PDF
Top 10 AI Use Cases Every Business Should Know.pdf
nicogonzalez1075
 
PDF
Salesforce Implementation Services Provider.pdf
VALiNTRY360
 
PDF
Applitools Platform Pulse: What's New and What's Coming - July 2025
Applitools
 
PDF
How to Download and Install ADT (ABAP Development Tools) for Eclipse IDE | SA...
SAP Vista, an A L T Z E N Company
 
Troubleshooting Virtual Threads in Java!
Tier1 app
 
Download iTop VPN Free 6.1.0.5882 Crack Full Activated Pre Latest 2025
imang66g
 
Farrell__10e_ch04_PowerPoint.pptx Programming Logic and Design slides
bashnahara11
 
Contractor Management Platform and Software Solution for Compliance
SHEQ Network Limited
 
Supabase Meetup: Build in a weekend, scale to millions
Carlo Gilmar Padilla Santana
 
Presentation about Database and Database Administrator
abhishekchauhan86963
 
ChessBase 18.02 Crack + Serial Key Free Download
cracked shares
 
Salesforce Pricing Update 2025: Impact, Strategy & Smart Cost Optimization wi...
GetOnCRM Solutions
 
Balancing Resource Capacity and Workloads with OnePlan – Avoid Overloading Te...
OnePlan Solutions
 
Enhancing Security in VAST: Towards Static Vulnerability Scanning
ESUG
 
MiniTool Power Data Recovery Crack New Pre Activated Version Latest 2025
imang66g
 
Why Reliable Server Maintenance Service in New York is Crucial for Your Business
Sam Vohra
 
Malaysia’s e-Invoice System: A Complete Guide for Businesses
Matiyas Solutions
 
How Agentic AI Networks are Revolutionizing Collaborative AI Ecosystems in 2025
ronakdubey419
 
Step-by-Step Guide to Install SAP HANA Studio | Complete Installation Tutoria...
SAP Vista, an A L T Z E N Company
 
AI Image Enhancer: Revolutionizing Visual Quality”
docmasoom
 
Top 10 AI Use Cases Every Business Should Know.pdf
nicogonzalez1075
 
Salesforce Implementation Services Provider.pdf
VALiNTRY360
 
Applitools Platform Pulse: What's New and What's Coming - July 2025
Applitools
 
How to Download and Install ADT (ABAP Development Tools) for Eclipse IDE | SA...
SAP Vista, an A L T Z E N Company
 

Antifragile Software Design

  • 3. Antifragile  This presentation is inspired on the book “Antifragile” by Nassim Taleb.
  • 4. The Triad: Antifragility, Robustness, and Fragility  Fragile things are exposed to volatility, so that volatility is prejudicial to them.  Robust things are immune to volatility, so that volatility does not affect them.  Antifragile things enjoy volatility, so that volatility is beneficial to them.
  • 5. The Triad Over Time  Fragile things: Break, erode or deteriorate.  Robust things: Stay the same.  Antifragile things: Evolve, improve, get better.
  • 6. Antifragility vs. Resilience  “Antifragility is beyond resilience or robustness. The resilient resists shocks and stays the same; the antifragile gets better.”
  • 7. Nonpredictive Decision Making “Sensitivity to harm from volatility is tractable, more so than forecasting the event that would cause the harm.” Aligned with Agile principle: “Responding to change over following a plan.”
  • 8. Volatility in Software Design In the case of software systems, volatility appears in the form of changes over time. Changes are unavoidable, as expressed in the Lehman laws of software evolution: “Continuing Change — A software system must be continually adapted or it becomes progressively less satisfactory.”
  • 9. Changes in Software Design  Functional changes: ◦ Required to implement new requirements, or to implement modifications in the requirements. ◦ Have an impact on the system’s behavior and functionality.  Non-functional changes: ◦ Required to improve the quality of the design. ◦ Are normally the result of Refactoring and focus on the reduction of Technical Debt. ◦ Should not affect the system’s behavior or functionality.
  • 10. Barbell Strategy “Barbell Strategy: A dual strategy, a combination of two extremes, one safe and one speculative, deemed more robust than a ‘monomodal’ strategy.”
  • 11. Example of Barbell Strategy “An investment strategy in which half the portfolio is made up of long-term bonds and the other half of very short- term bonds.”
  • 12. Barbell Strategy in Software What is the software equivalent of a Barbell Strategy? The answer is: Abstraction. Software systems should have a structure and organization based on different levels of abstraction. The duality of the Barbell Strategy is expressed as the separation between high-level abstract elements and concrete implementation details.
  • 13. Abstract and Concrete Elements  Abstract elements: Are robust, and should not be easily affected by changes.  Concrete implementation details: Are fragile, directly affected by changes.  Software systems should be built in such a way that the volatility (changes): ◦ Does not affect its structure and organization, preserving the main, high- level abstractions. ◦ Requires modifications only on the low-
  • 14. Applications of the Barbell Strategy  Information Hiding  Encapsulation  Open/Closed Principle  TDD  Inheritance Hierarchies  Frameworks
  • 15. Information Hiding Information Hiding was defined by David Parnas as a criterion to decompose a system into modules: “Every module … is characterized by its knowledge of a design decision which it hides from all others. Its interface or definition was chosen to reveal as little as possible about its inner workings.”
  • 16. Encapsulation The mechanism of Encapsulation in Object Oriented Programming (OOP) is a direct application of Information Hiding. The interface of a class is separated from its implementation, and thus the implementation may be changed without affecting the clients of the class. Thanks to encapsulation, the clients of a class become less fragile to changes in its implementation details.
  • 17. Open/Closed Principle The Open-Closed Principle (OCP) was defined by Bertrand Meyer as: “Software entities (classes, modules, functions, etc.) should be open for extension, but closed for modification.” The implementation of the OCP requires the definition of an abstraction, so that each possible extension is a specialization of this abstraction.
  • 19. TDD: Test-Driven Development The fundamental idea of TDD is to write the tests before writing the code.  TDD focuses on the early separation between abstractions and concrete implementation details.  Requires the definition of abstract interfaces and behavior for the classes being tested.  Allows the code to be easily refactored, because the unit tests would catch any mistake.  The unit tests are less fragile to volatility (changes) because they are based on abstractions.
  • 20. Inheritance Hierarchies In OOP, an inheritance hierarchy organizes classes according to a generalization-specialization rationale. Classes near the root of the hierarchy are more abstract than the classes on the leaves of the inheritance tree. The abstract classes should be less fragile than the concrete classes, meaning that they should be less subject to impact caused by volatility, such as changes in the requirements or changes in the implementation details.
  • 21. Frameworks Frameworks provide reusable code that is not application-specific, defining abstractions and the relationships among them. The software developer extends the framework, deriving concrete subclasses, and writing the implementation details to satisfy the requirements of a specific application. These implementation details are fragile, but the framework is not, and may be reused with no changes on many
  • 22. Robust vs. Fragile Robust Fragile Dependency on interface Dependency on implementation details Client of encapsulated class Client of class with public members Class that may be extended without modifications Class that needs to be modified to be extended Unit Tests Implementation of the classes being tested Abstract Class Concrete Class Generic Framework Application-specific extension of the
  • 23. Conclusions so far  Software systems are subject to volatility in the form of changing requirements.  Concrete implementation details are fragile and directly affected by these changes  A Barbell Strategy defines concrete details as the specialization of higher- level abstractions.  Proper abstractions should be robust, surviving the impact of changes.  Details change over time, but the system structure and organization may be preserved because it is based on abstractions.
  • 24. Antifragile Whole, Fragile Parts “The antifragility of the whole often depends on the fragility of the parts.”
  • 25. Componentization It is common knowledge that systems should be divided into components. The reaction to a change in the environment should only affect a few components, and not the entire system. Thus, component-based systems are more robust than monolithic systems.
  • 26. Antifragility through Componentization To be Antifragile, a system must be able to benefit from changes in the environment. Antifragility may be achieved when several systems share the same components. When a specific component is improved, all systems using this component can benefit from this improvement.
  • 27. Example: Rechargeable Batteries All users of traditional AA batteries can benefit from improved technology of rechargeable ones.
  • 28. Coupling and Cohesion Principles to guide the decomposition of large software systems into modules:  Coupling: The degree of dependency between two modules. We always want low coupling.  Cohesion: The measure of how strongly-related is the set of functions performed by a module. We always want high cohesion.
  • 29. Applications of Componentization  DLLs  ORBs  SOA  Microservices  Software Product Lines
  • 30. DLL: Dynamic Link Library “DLLs provide a mechanism for shared code and data, allowing a developer of shared code/data to upgrade functionality without requiring applications to be re-linked or re- compiled.”
  • 31. ORB: Object Request Broker “An ORB acts as a broker between a client request for a service from a distributed object or component and the completion of that request.”
  • 33. SOA Principles 1. Standardized Service Contracts 2. Service Loose Coupling 3. Service Abstraction 4. Service Reusability 5. Service Autonomy 6. Service Statelessness 7. Service Discoverability 8. Service Composability 9. Service Interoperability
  • 34. Service Reusability “Services contain and express agnostic logic and can be positioned as reusable enterprise resources.” “Logic is divided into services with the intent of maximizing reuse.” Thus services should not be part of a single system, they should be reused in multiple systems.
  • 36. Microservices Practices (I) 1. Separated Build: ◦ Each Microservice is built independently and has its own version. 2. Independent Deployment: ◦ Each Microservice may be deployed without affecting the others. 3. Separated Data Stores: ◦ Microservices should not share data stores. 4. Independence of Platform: ◦ Microservices should be deployed in containers.
  • 37. Microservices Practices (II) 5. Individual Technology Choice: ◦ Each Microservice may be implemented using a different technology. 6. Confinement of Failure: ◦ If a failure occurs in a particular Microservice it should not propagate to the other ones. 7. Independent Scalability: ◦ It should be possible to scale each Microservice independently of the others.
  • 38. Systems, Services and Antifragility At any point in time it is possible to deploy an enhanced version of one of the services without affecting the other ones. If there are several systems based on shared services, each time one of these services is improved all the systems will be able to immediately benefit from the improvement. While each system is robust, the collection of systems is Antifragile, because they benefit from the same changes at no added cost.
  • 39. Software Product Lines In a Software Product Line (SPL), a series of software products are based on the same components and differ only on their configuration. In the case of SPLs there may be several coexisting versions for each component. Each time a new component version is created, all the products using previous versions may benefit through simple configuration updates.
  • 40. Antifragile vs. Fragile Antifragile Fragile Several programs linking to the same DLLs A specific version of a Dynamic Link Library Several Client objects calling the same Servant object The implementation details of a specific Servant object Several Systems accessing the same Services The implementation details of a specific Service Several Applications using shared Microservices The implementation details of a specific Microservice Several Products based A specific version of a
  • 41. Conclusions  A simple strategy for Antifragility is: Build component-based systems with shared components.  When one of the shared components is improved all the systems will be able to benefit from this improvement at no additional cost.