Slide 1

Slide 1 text

vladikk doit-intl.com #DDDEU THE FRACTAL GEOMETRY OF SOFTWARE DESIGN

Slide 2

Slide 2 text

@vladikk vladikk.com [email protected] VLADIK (VLAD) 
 KHONONOV

Slide 3

Slide 3 text

vladikk doit-intl.com #DDDEU

Slide 4

Slide 4 text

vladikk doit-intl.com #DDDEU • How much food do we need to stay alive? • How creative are we? • How profitable are our companies?

Slide 5

Slide 5 text

vladikk doit-intl.com #DDDEU West, G. (2018). Scale: The universal laws of life and death in organisms, cities and companies. Weidenfeld & Nicolson. How much food do we need to stay alive? How creative are we? How profitable are our companies?

Slide 6

Slide 6 text

vladikk doit-intl.com #DDDEU METABOLIC RATE OF ANIMALS West, G. (2018). Scale: The universal laws of life and death in organisms, cities and companies. Weidenfeld & Nicolson.

Slide 7

Slide 7 text

vladikk doit-intl.com #DDDEU REGISTERED PATENTS West, G. (2018). Scale: The universal laws of life and death in organisms, cities and companies. Weidenfeld & Nicolson.

Slide 8

Slide 8 text

vladikk doit-intl.com #DDDEU West, G. (2018). Scale: The universal laws of life and death in organisms, cities and companies. Weidenfeld & Nicolson. INCOME AND ASSETS OF COMPANIES

Slide 9

Slide 9 text

vladikk doit-intl.com #DDDEU West, G. (2018). Scale: The universal laws of life and death in organisms, cities and companies. Weidenfeld & Nicolson. How much food do we need to stay alive? How creative are we? How profitable are our companies?

Slide 10

Slide 10 text

vladikk doit-intl.com #DDDEU West, G. (2018). Scale: The universal laws of life and death in organisms, cities and companies. Weidenfeld & Nicolson. How much food do we need to stay alive? How creative are we? How profitable are our companies?

Slide 11

Slide 11 text

vladikk doit-intl.com #DDDEU West, G. (2018). Scale: The universal laws of life and death in organisms, cities and companies. Weidenfeld & Nicolson.

Slide 12

Slide 12 text

vladikk doit-intl.com #DDDEU METABOLIC RATE OF ANIMALS West, G. (2018). Scale: The universal laws of life and death in organisms, cities and companies. Weidenfeld & Nicolson.

Slide 13

Slide 13 text

vladikk doit-intl.com #DDDEU West, G. (2018). Scale: The universal laws of life and death in organisms, cities and companies. Weidenfeld & Nicolson. How much food do we need to stay alive? How creative are we? How profitable are our companies?

Slide 14

Slide 14 text

vladikk doit-intl.com #DDDEU "Viewed through this lens, cities, companies, plants, animals, our bodies, and even tumors manifest a remarkable similarity in the ways that they are organized and function." - Geo ff rey West

Slide 15

Slide 15 text

vladikk doit-intl.com #DDDEU

Slide 16

Slide 16 text

vladikk doit-intl.com #DDDEU AGENDA 1. A primer on energy supply networks 2. How network theory applies to software design 3. Leveraging the network theory to manage complexity 4. S ^ D

Slide 17

Slide 17 text

vladikk doit-intl.com #DDDEU ENERGY SUPPLY 
 NETWORKS

Slide 18

Slide 18 text

vladikk doit-intl.com #DDDEU ENERGY SUPPLY NETWORKS Systems that are sustained by the transport of energy through hierarchical networks.

Slide 19

Slide 19 text

vladikk doit-intl.com #DDDEU ENERGY SUPPLY NETWORKS

Slide 20

Slide 20 text

vladikk doit-intl.com #DDDEU ENERGY SUPPLY NETWORKS

Slide 21

Slide 21 text

vladikk doit-intl.com #DDDEU SOFTWARE DESIGN AS AN ENERGY SUPPLY NETWORK

Slide 22

Slide 22 text

vladikk doit-intl.com #DDDEU WHAT IS THE ENERGY SUPPLIED BY SOFTWARE DESIGN?

Slide 23

Slide 23 text

vladikk doit-intl.com #DDDEU WHAT IS THE ENERGY SUPPLIED BY SOFTWARE DESIGN? — KNOWLEDGE

Slide 24

Slide 24 text

vladikk doit-intl.com #DDDEU

Slide 25

Slide 25 text

vladikk doit-intl.com #DDDEU Shared Knowledge Encapsulated 
 Knowledge Boundaries Encapsulated 
 Knowledge

Slide 26

Slide 26 text

vladikk doit-intl.com #DDDEU KNOWLEDGE: THE ENERGY OF SOFTWARE DESIGN Implementation Coupling Functional Coupling Model Coupling Contract Coupling

Slide 27

Slide 27 text

vladikk doit-intl.com #DDDEU KNOWLEDGE: THE ENERGY OF SOFTWARE DESIGN Implementation Coupling Functional Coupling Model Coupling Contract Coupling • How the parts of the system are implemented • Private interfaces • Not intended for inter-component integration

Slide 28

Slide 28 text

vladikk doit-intl.com #DDDEU KNOWLEDGE: THE ENERGY OF SOFTWARE DESIGN Implementation Coupling Functional Coupling Model Coupling Contract Coupling • Knowledge of what the system has to do • Business logic • Use cases • Rules, invariants, constraints

Slide 29

Slide 29 text

vladikk doit-intl.com #DDDEU KNOWLEDGE: THE ENERGY OF SOFTWARE DESIGN Implementation Coupling Functional Coupling Model Coupling Contract Coupling • Models of the business domain • Data structures • Software system-related aspects of the business domain • Understanding of the functional requirements

Slide 30

Slide 30 text

vladikk doit-intl.com #DDDEU KNOWLEDGE: THE ENERGY OF SOFTWARE DESIGN Implementation Coupling Functional Coupling Model Coupling Contract Coupling • Components’ integration contracts • Integration-specific models, APIs • The minimal data needed for components to work together

Slide 31

Slide 31 text

vladikk doit-intl.com #DDDEU “System design is inherently about boundaries (what’s in, what’s out, what spans, what moves between), and about tradeo ff s. It reshapes what is outside, just as it shapes what is inside.” - Ruth Malan (@ruthmalan)

Slide 32

Slide 32 text

vladikk doit-intl.com #DDDEU KNOWLEDGE: THE ENERGY OF SOFTWARE DESIGN Knowledge vs Data: TBs of data across a contract-based interface vs 
 a few bytes across implementation-coupled modules

Slide 33

Slide 33 text

vladikk doit-intl.com #DDDEU KNOWLEDGE: THE ENERGY OF SOFTWARE DESIGN So ft ware systems are sustained by the transport of knowledge (energy) through hierarchical networks of modules.

Slide 34

Slide 34 text

vladikk doit-intl.com #DDDEU ECONOMIES OF SCALE IN 
 ENERGY SUPPLY NETWORKS

Slide 35

Slide 35 text

vladikk doit-intl.com #DDDEU West, G. (2018). Scale: The universal laws of life and death in organisms, cities and companies. Weidenfeld & Nicolson.

Slide 36

Slide 36 text

vladikk doit-intl.com #DDDEU West, G. (2018). Scale: The universal laws of life and death in organisms, cities and companies. Weidenfeld & Nicolson.

Slide 37

Slide 37 text

vladikk doit-intl.com #DDDEU METABOLIC RATE OF ANIMALS West, G. (2018). Scale: The universal laws of life and death in organisms, cities and companies. Weidenfeld & Nicolson.

Slide 38

Slide 38 text

vladikk doit-intl.com #DDDEU METABOLIC RATE OF ANIMALS West, G. (2018). Scale: The universal laws of life and death in organisms, cities and companies. Weidenfeld & Nicolson.

Slide 39

Slide 39 text

vladikk doit-intl.com #DDDEU y = 3.4 * x3/4 West, G. (2018). Scale: The universal laws of life and death in organisms, cities and companies. Weidenfeld & Nicolson.

Slide 40

Slide 40 text

vladikk doit-intl.com #DDDEU y = 3.4 * x3/4 y = x Sublinear 
 Growth Linear 
 Growth Sublinear function grows slower than any linear function

Slide 41

Slide 41 text

vladikk doit-intl.com #DDDEU Chihuahua Yorkshire Terrier Pug Beagle Boxer Newfoundland 1.8kg 3.5kg 7kg 14.5kg 29kg 58kg

Slide 42

Slide 42 text

vladikk doit-intl.com #DDDEU Chihuahua Yorkshire Terrier Pug Beagle Boxer Newfoundland 1.8kg 3.5kg 7kg 14.5kg 29kg 58kg BASAL METABOLIC RATE The minimum number of calories a day needed 
 to stay alive without performing any activities. https://www.sciencedirect.com/topics/engineering/basal-metabolic-rate

Slide 43

Slide 43 text

vladikk doit-intl.com #DDDEU Chihuahua Yorkshire Terrier Pug Beagle Boxer Newfoundland 1.8kg 3.5kg 7kg 14.5kg 29kg 58kg 110 220 440 880 1,760 3,520 Breed Weight Basal 
 Metabolic 
 Rate

Slide 44

Slide 44 text

vladikk doit-intl.com #DDDEU Chihuahua Yorkshire Terrier Pug Beagle Boxer Newfoundland 1.8kg 3.5kg 7kg 14.5kg 29kg 58kg 110 220 440 880 1,760 3,520 110 180 302 521 876 1,474 Breed Weight Linear Thinking Basal 
 Metabolic 
 Rate

Slide 45

Slide 45 text

vladikk doit-intl.com #DDDEU West, G. (2018). Scale: The universal laws of life and death in organisms, cities and companies. Weidenfeld & Nicolson. NO. OF GASOLINE STATIONS

Slide 46

Slide 46 text

vladikk doit-intl.com #DDDEU West, G. (2018). Scale: The universal laws of life and death in organisms, cities and companies. Weidenfeld & Nicolson.

Slide 47

Slide 47 text

vladikk doit-intl.com #DDDEU REGISTERED PATENTS West, G. (2018). Scale: The universal laws of life and death in organisms, cities and companies. Weidenfeld & Nicolson.

Slide 48

Slide 48 text

vladikk doit-intl.com #DDDEU y = x1.15 y = x West, G. (2018). Scale: The universal laws of life and death in organisms, cities and companies. Weidenfeld & Nicolson.

Slide 49

Slide 49 text

vladikk doit-intl.com #DDDEU y = x1.15 y = x Superlinear 
 Growth Linear 
 Growth Superlinear function grows faster than any linear function

Slide 50

Slide 50 text

vladikk doit-intl.com #DDDEU ECONOMIES OF SCALE Superlinear 
 Growth Sublinear 
 Growth Linear 
 Growth

Slide 51

Slide 51 text

vladikk doit-intl.com #DDDEU KNOWLEDGE: THE ENERGY OF SOFTWARE DESIGN So ft ware systems are sustained by the transport of knowledge (energy) through hierarchical networks of modules.

Slide 52

Slide 52 text

vladikk doit-intl.com #DDDEU Knowledge (sublinear growth) Functionality (Linear growth)

Slide 53

Slide 53 text

vladikk doit-intl.com #DDDEU ECONOMIES OF SCALE Superlinear 
 Growth Sublinear 
 Growth Linear 
 Growth

Slide 54

Slide 54 text

vladikk doit-intl.com #DDDEU ECONOMIES OF SCALE Superlinear 


Slide 55

Slide 55 text

vladikk doit-intl.com #DDDEU GROWTH LIMITS

Slide 56

Slide 56 text

vladikk doit-intl.com #DDDEU "You can plainly see the impossibility of increasing the size of structures to vast dimensions either in art or in nature; … also it would be impossible to build up the bony structures of men, horses, or other animals so as to hold together and perform their normal functions . . . for if his height be increased inordinately he will fall and be crushed under his own weight.” - Galileo Galilei

Slide 57

Slide 57 text

vladikk doit-intl.com #DDDEU

Slide 58

Slide 58 text

vladikk doit-intl.com #DDDEU

Slide 59

Slide 59 text

vladikk doit-intl.com #DDDEU Cross-section Resistance to fracture is proportional to the cross-sectional area

Slide 60

Slide 60 text

vladikk doit-intl.com #DDDEU x2 x2 x2 Weight increase: Strength increase: 2 * 2 * 2 = x8 2 * 2 = x4

Slide 61

Slide 61 text

vladikk doit-intl.com #DDDEU

Slide 62

Slide 62 text

vladikk doit-intl.com #DDDEU GROWTH LIMITS Superlinear 
 Growth Sublinear 
 Growth Linear 
 Growth • As a system grows, it becomes more efficient • Undesired consequences of growth become more efficient as well

Slide 63

Slide 63 text

vladikk doit-intl.com #DDDEU ORGANISMS • Limbs are unable to support the overall weight • The amount of cells surpasses capillaries’ ability to supply energy • All available energy used for repairing consequences of entropy CITIES • Overcrowding • Crime rates • Pollution • Spread of diseases COMPANIES • Sublinear scaling of sales, incomes, and profits • Bureaucracy • Administration and management complexity SOFTWARE SYSTEMS ?

Slide 64

Slide 64 text

vladikk doit-intl.com #DDDEU GROWTH LIMITS IN SOFTWARE SYSTEMS

Slide 65

Slide 65 text

vladikk doit-intl.com #DDDEU Knowledge (sublinear growth) Functionality (Linear growth)

Slide 66

Slide 66 text

vladikk doit-intl.com #DDDEU M8 M10 M9 M6 M1 M2 M3 M4 M5 M7

Slide 67

Slide 67 text

vladikk doit-intl.com #DDDEU Knowledge (sublinear growth) Complexity (superlinear growth) Cognitive Limit (No growth) Functionality (Linear growth)

Slide 68

Slide 68 text

vladikk doit-intl.com #DDDEU Knowledge Miller, G. A. (1994). The magical number seven, plus or minus two: Some limits on our capacity for processing information. Psychological Review, 101(2), 343–352 ESTIMATED CAPACITY FOR PROCESSING INFORMATION 2000s: 4 +/- 1 Cowan, Nelson. "The magical number 4 in short-term memory: A reconsideration of mental storage capacity." Behavioral and brain sciences 24.1 (2001): 87-114.

Slide 69

Slide 69 text

vladikk doit-intl.com #DDDEU Knowledge (sublinear growth) Complexity (superlinear growth) Cognitive Limit (No growth) Functionality (Linear growth)

Slide 70

Slide 70 text

vladikk doit-intl.com #DDDEU Knowledge - Galileo Galilei

Slide 71

Slide 71 text

vladikk doit-intl.com #DDDEU Knowledge (sublinear growth) Complexity (superlinear growth) Cognitive Limit (No growth) Functionality (Linear growth)

Slide 72

Slide 72 text

vladikk doit-intl.com #DDDEU EXTENDING GROWTH LIMITS

Slide 73

Slide 73 text

vladikk doit-intl.com #DDDEU “I have sketched a bone whose natural length has been increased three times and whose thickness has been multiplied until, for a correspondingly large animal, it would perform the same function which the small bone performs for its small animal” - Galileo Galilei

Slide 74

Slide 74 text

vladikk doit-intl.com #DDDEU “if one wishes to maintain in a great giant the same proportion of limb as that found in an ordinary man he must find a harder and stronger material for making the bones” - Galileo Galilei

Slide 75

Slide 75 text

vladikk doit-intl.com #DDDEU POSTPONING GROWTH LIMITS 1. Adapt form / shape to withstand increased stress 2. Use stronger materials

Slide 76

Slide 76 text

vladikk doit-intl.com #DDDEU SUSTAINABLE GROWTH 
 REQUIRES INNOVATION

Slide 77

Slide 77 text

vladikk doit-intl.com #DDDEU ORGANISMS • Limbs are unable to support the overall weight • Crime rates • Pollution • Spread of diseases COMPANIES • Sublinear scaling of sales, incomes, and profits

Slide 78

Slide 78 text

vladikk doit-intl.com #DDDEU https://en.wikipedia.org/wiki/List_of_largest_cities_throughout_history

Slide 79

Slide 79 text

vladikk doit-intl.com #DDDEU https://en.wikipedia.org/wiki/List_of_largest_cities_throughout_history Stone tools, Fire, Bow, Wheel Writing Water 
 Mill Gunpowder Printing Press Optical Lens Steam 
 Engine Telegraph Plastics Airplane Transistor Nuclear Power Space Flight Internet Mobile Technology

Slide 80

Slide 80 text

vladikk doit-intl.com #DDDEU "Technology can bring benefits if, and only if, it diminishes a limitation’" - Eliyahu M. Goldratt

Slide 81

Slide 81 text

vladikk doit-intl.com #DDDEU INNOVATION IN SOFTWARE DESIGN

Slide 82

Slide 82 text

vladikk doit-intl.com #DDDEU “if one wishes to maintain in a great giant the same proportion of limb as that found in an ordinary man he must find a harder and stronger material for making the bones” - Galileo Galilei

Slide 83

Slide 83 text

vladikk doit-intl.com #DDDEU Knowledge (sublinear growth) Complexity (superlinear growth) Cognitive Limit (No growth) Functionality (Linear growth) Cognitive Limit (superlinear growth)

Slide 84

Slide 84 text

vladikk doit-intl.com #DDDEU “I have sketched a bone whose natural length has been increased three times and whose thickness has been multiplied until, for a correspondingly large animal, it would perform the same function which the small bone performs for its small animal” - Galileo Galilei

Slide 85

Slide 85 text

vladikk doit-intl.com #DDDEU "Highly complex, self-sustaining structures, whether cells, organisms, ecosystems, cities, or corporations, require the close integration of enormous numbers of their constituent units that need e ff icient servicing at all scales. This has been accomplished in living systems by evolving fractal-like, hierarchical branching network systems.” - Geo ff rey West

Slide 86

Slide 86 text

vladikk doit-intl.com #DDDEU

Slide 87

Slide 87 text

vladikk doit-intl.com #DDDEU

Slide 88

Slide 88 text

vladikk doit-intl.com #DDDEU

Slide 89

Slide 89 text

vladikk doit-intl.com #DDDEU http://paulbourke.net/fractals/googleearth/

Slide 90

Slide 90 text

vladikk doit-intl.com #DDDEU Y. Chen, P. Cheng, Heat transfer and pressure drop in fractal tree-like microchannel nets Lorthois, Sylvie, and Francis Cassot. "Fractal analysis of vascular networks: insights from morphogenesis." Journal of theoretical biology 262.4 (2010): 614-633.

Slide 91

Slide 91 text

vladikk doit-intl.com #DDDEU https://opte.org Klinkhamer, Christopher, et al. "Functionally fractal urban networks: Geospatial co-location and homogeneity of infrastructure."

Slide 92

Slide 92 text

vladikk doit-intl.com #DDDEU

Slide 93

Slide 93 text

vladikk doit-intl.com #DDDEU Chihuahua Yorkshire Terrier Pug Beagle Boxer Newfoundland 1.8kg 3.5kg 7kg 14.5kg 29kg 58kg 110 220 440 880 1,760 3,520 110 180 302 521 876 1,474 Breed Weight Linear Thinking Basal 
 Metabolic 
 Rate

Slide 94

Slide 94 text

vladikk doit-intl.com #DDDEU West, G. (2018). Scale: The universal laws of life and death in organisms, cities and companies. Weidenfeld & Nicolson. NO. OF GASOLINE STATIONS

Slide 95

Slide 95 text

vladikk doit-intl.com #DDDEU Sublinear 
 Growth Linear 
 Growth Sublinear function grows slower than any linear function

Slide 96

Slide 96 text

vladikk doit-intl.com #DDDEU Knowledge (sublinear growth) Complexity (superlinear growth) Cognitive Limit (No growth) Functionality (Linear growth) Complexity Sublinear growth)

Slide 97

Slide 97 text

vladikk doit-intl.com #DDDEU FRACTAL MODULARITY

Slide 98

Slide 98 text

vladikk doit-intl.com #DDDEU KNOWLEDGE: THE ENERGY OF SOFTWARE DESIGN Implementation Coupling Functional Coupling Model Coupling Contract Coupling Shared Knowledge Encapsulated 
 Knowledge Boundaries Encapsulated 
 Knowledge

Slide 99

Slide 99 text

vladikk doit-intl.com #DDDEU KNOWLEDGE: THE ENERGY OF SOFTWARE DESIGN So ft ware systems are sustained by the transport of knowledge (energy) through hierarchical networks of modules.

Slide 100

Slide 100 text

vladikk doit-intl.com #DDDEU Y. Chen, P. Cheng, Heat transfer and pressure drop in fractal tree-like microchannel nets

Slide 101

Slide 101 text

vladikk doit-intl.com #DDDEU Knowledge (sublinear growth) Complexity (superlinear growth) Cognitive Limit (No growth) Functionality (Linear growth)

Slide 102

Slide 102 text

vladikk doit-intl.com #DDDEU Knowledge

Slide 103

Slide 103 text

vladikk doit-intl.com #DDDEU

Slide 104

Slide 104 text

vladikk doit-intl.com #DDDEU INTEGRATION STRENGTH (S) Implementation Coupling Functional Coupling Model Coupling Contract Coupling Shared Knowledge Encapsulated 
 Knowledge Boundaries Encapsulated 
 Knowledge

Slide 105

Slide 105 text

vladikk doit-intl.com #DDDEU DISTANCE (D) Downstream Module Upstream Module depends on Distance

Slide 106

Slide 106 text

vladikk doit-intl.com #DDDEU DISTANCE (D) M ethods Classes Sub-M odules M odules Com ponents (M icro)Services System s Coordination

Slide 107

Slide 107 text

vladikk doit-intl.com #DDDEU COST OF CHANGE IS PROPORTIONAL TO THE DISTANCE BETWEEN COMPONENTS

Slide 108

Slide 108 text

vladikk doit-intl.com #DDDEU Downstream Module Upstream Module depends on Integration Strength (S) Distance (D)

Slide 109

Slide 109 text

vladikk doit-intl.com #DDDEU LOW STRENGTH HIGH STRENGTH LOW DISTANCE HIGH DISTANCE

Slide 110

Slide 110 text

vladikk doit-intl.com #DDDEU LOW STRENGTH HIGH STRENGTH ? LOW DISTANCE HIGH DISTANCE • High cost of cascading changes • Low shared knowledge • Minimizes cascading changes

Slide 111

Slide 111 text

vladikk doit-intl.com #DDDEU LOW STRENGTH HIGH STRENGTH Loose Coupling LOW DISTANCE HIGH DISTANCE • High cost of cascading changes • Low shared knowledge • Minimizes cascading changes

Slide 112

Slide 112 text

vladikk doit-intl.com #DDDEU LOW STRENGTH HIGH STRENGTH ? Loose Coupling LOW DISTANCE HIGH DISTANCE • High shared knowledge • Frequent cascading changes • Low cost of cascading changes

Slide 113

Slide 113 text

vladikk doit-intl.com #DDDEU LOW STRENGTH HIGH STRENGTH High 
 Cohesion Loose Coupling LOW DISTANCE HIGH DISTANCE • High shared knowledge • Frequent cascading changes • Low cost of cascading changes

Slide 114

Slide 114 text

vladikk doit-intl.com #DDDEU High 
 Cohesion LOW STRENGTH HIGH STRENGTH ? Loose Coupling LOW DISTANCE HIGH DISTANCE • Low cost of cascading changes • Low shared knowledge • Co-located unrelated modules

Slide 115

Slide 115 text

vladikk doit-intl.com #DDDEU High 
 Cohesion LOW STRENGTH HIGH STRENGTH Local 
 Complexity Loose Coupling LOW DISTANCE HIGH DISTANCE • Low cost of cascading changes • Low shared knowledge • Co-located unrelated modules

Slide 116

Slide 116 text

vladikk doit-intl.com #DDDEU High 
 Cohesion LOW STRENGTH HIGH STRENGTH Local 
 Complexity Loose Coupling ? LOW DISTANCE HIGH DISTANCE • High cost of cascading changes • High shared knowledge • Frequent cascading changes

Slide 117

Slide 117 text

vladikk doit-intl.com #DDDEU High 
 Cohesion LOW STRENGTH HIGH STRENGTH Local 
 Complexity Loose Coupling Global 
 Complexity LOW DISTANCE HIGH DISTANCE • High cost of cascading changes • High shared knowledge • Frequent cascading changes

Slide 118

Slide 118 text

vladikk doit-intl.com #DDDEU Local Complexity

Slide 119

Slide 119 text

vladikk doit-intl.com #DDDEU Global Complexity

Slide 120

Slide 120 text

vladikk doit-intl.com #DDDEU High 
 Cohesion LOW STRENGTH HIGH STRENGTH Local 
 Complexity Loose Coupling Global 
 Complexity LOW DISTANCE HIGH DISTANCE

Slide 121

Slide 121 text

vladikk doit-intl.com #DDDEU High 
 Cohesion LOW STRENGTH HIGH STRENGTH Local 
 Complexity Loose Coupling Global 
 Complexity LOW DISTANCE HIGH DISTANCE

Slide 122

Slide 122 text

vladikk doit-intl.com #DDDEU High

Slide 123

Slide 123 text

vladikk doit-intl.com #DDDEU High

Slide 124

Slide 124 text

vladikk doit-intl.com #DDDEU High

Slide 125

Slide 125 text

vladikk doit-intl.com #DDDEU 1. Minimize integration strength as much as possible 2. Balance integration strength and distance • Both are high? — Reduce distance • Both are low? — Increase distance APPLYING M=S^D

Slide 126

Slide 126 text

vladikk doit-intl.com #DDDEU Implementation Functional Model Contract INTEGRATION STRENGTH

Slide 127

Slide 127 text

vladikk doit-intl.com #DDDEU 1. Minimize integration strength as much as possible 2. Balance integration strength and distance • Both are high? — Reduce distance • Both are low? — Increase distance 3. Repeat at all levels of abstraction APPLYING M=S^D

Slide 128

Slide 128 text

vladikk doit-intl.com #DDDEU Strength: 
 Contract M=S^D IN DOMAIN-DRIVEN DESIGN Distance Bounded Context Bounded Context

Slide 129

Slide 129 text

vladikk doit-intl.com #DDDEU Strength: 
 Model M=S^D IN DOMAIN-DRIVEN DESIGN Distance Bounded Context

Slide 130

Slide 130 text

vladikk doit-intl.com #DDDEU Strength: 
 Functional M=S^D IN DOMAIN-DRIVEN DESIGN Distance Aggregate

Slide 131

Slide 131 text

vladikk doit-intl.com #DDDEU Implementation 
 Strength M=S^D IN DOMAIN-DRIVEN DESIGN Distance public class CampaignPublishingSaga { private readonly ICampaignRepository _repository; private readonly IList _events; // ... public void Process(CampaignActivated activated) { var campaign = _repository.Load(activated.CampaignId); var advertisingMaterials = campaign.GenerateAdvertisingMaterials); var commandIssuedEvent = new CommandIssuedEvent( target: Target.PublishingService, command: new SubmitAdvertisementCommand(activated.CampaignId, advertisingMaterials)); _events.Append(activated); _events.Append(commandIssuedEvent); } public void Process(PublishingConfirmed confirmed) { var commandIssuedEvent = new CommandIssuedEvent( target: Target.CampaignAggregate, command: new TrackConfirmation(confirmed.CampaignId, confirmed.ConfirmationId)); _events.Append(confirmed); _events.Append(commandIssuedEvent); } public void Process(PublishingRejected rejected) { var commandIssuedEvent = new CommandIssuedEvent( target: Target.CampaignAggregate, command: new TrackRejection(rejected.CampaignId, rejected.RejectionReason)); _events.Append(rejected); _events.Append(commandIssuedEvent); } }

Slide 132

Slide 132 text

vladikk doit-intl.com #DDDEU M=S^D IN DOMAIN-DRIVEN DESIGN public class CampaignPublishingSaga { private readonly ICampaignRepository _repository; private readonly IList _events; // ... public void Process(CampaignActivated activated) { var campaign = _repository.Load(activated.CampaignId); var advertisingMaterials = campaign.GenerateAdvertisingMaterials); var commandIssuedEvent = new CommandIssuedEvent( target: Target.PublishingService, command: new SubmitAdvertisementCommand(activated.CampaignId, advertisingMaterials)); _events.Append(activated); _events.Append(commandIssuedEvent); } public void Process(PublishingConfirmed confirmed) { var commandIssuedEvent = new CommandIssuedEvent( target: Target.CampaignAggregate, command: new TrackConfirmation(confirmed.CampaignId, confirmed.ConfirmationId)); _events.Append(confirmed); _events.Append(commandIssuedEvent); } public void Process(PublishingRejected rejected) { var commandIssuedEvent = new CommandIssuedEvent( target: Target.CampaignAggregate, command: new TrackRejection(rejected.CampaignId, rejected.RejectionReason)); _events.Append(rejected); _events.Append(commandIssuedEvent); } } Bounded Context Bounded Context Bounded Context Aggregate

Slide 133

Slide 133 text

vladikk doit-intl.com #DDDEU Implementation Functional Model Contract INTEGRATION STRENGTH

Slide 134

Slide 134 text

vladikk doit-intl.com #DDDEU M = S ^ D

Slide 135

Slide 135 text

vladikk doit-intl.com #DDDEU “The most e ff ective tool available for dealing with complexity is abstraction. Many types of abstraction can be used, but encapsulation is the main form of abstraction by which complexity is managed in object-oriented programming.” - Rebecca Wirfs-Brock

Slide 136

Slide 136 text

vladikk doit-intl.com #DDDEU WRAP UP

Slide 137

Slide 137 text

vladikk doit-intl.com #DDDEU KNOWLEDGE: THE ENERGY OF SOFTWARE DESIGN So ft ware systems are sustained by the transport of knowledge (energy) through hierarchical networks of modules.

Slide 138

Slide 138 text

vladikk doit-intl.com #DDDEU Knowledge (sublinear growth) Complexity (superlinear growth) Cognitive Limit (No growth) Functionality (Linear growth)

Slide 139

Slide 139 text

vladikk doit-intl.com #DDDEU High

Slide 140

Slide 140 text

vladikk doit-intl.com #DDDEU

Slide 141

Slide 141 text

vladikk doit-intl.com #DDDEU

Slide 142

Slide 142 text

@vladikk vladikk.com vladik at khononov.com

Slide 143

Slide 143 text

@vladikk vladikk.com vladik at khononov.com

Slide 144

Slide 144 text

@vladikk vladikk.com vladik at khononov.com THANK YOU!