SlideShare a Scribd company logo
OOP ~ Engineering
~ The Discipline ~
1940s
2008
1940s
• Invents macros
• Invents variables
• Invents code stack
• Invents sub routines
• Invents floating point
• Invents binary computing
• Invents integer add and logic not
1940s ~ Relays
1940s ~ Relays
1940s ~ Vacuum Tubes
1940s ~ Vacuum Tubes
1940s ~ Report
We shall need a great number of mathematicians of ability
because there will probably be a good deal of work of this
kind to be done.
1940s ~ Report
One of our difficulties will be the maintenance of an
appropriate disciple, so we do not lose track of what we
are doing.
Discipline
• Mathematicians of Ability
• A Great number of them
• Appropriate Disciple
1950s
• Solved the memory problem (Magnetic cores that could
store memory)
• Tubes are being mass produced (music amps)
• FORTRAN was invented
Brief History of Computing
Alan Kay
Brief History of Computing
Dennis Ritchie
Brief History of Computing
Brad Cox and Bjarne Stroustrup
Brief History of Computing
What happened to women?
1950s
We invent the core, a much denser
memory.
1940s ~ Vacuum Tubes
A use case driven approach:-- a precursor to user stories
OO Software Engineering
Interactors
INTERACTOR
Entities
INTERACTOR
ENTITY
Boundaries
BOUNDARY
BOUNDARY
INTERACTOR
ENTITY
ENTITY
Boundaries
INTERACTOR
BOUNDARY
BOUNDARY
ENTITY
ENTITY
ENTITY
DM
USER
REQUEST MODEL
MVC
CONTROLLER
MODEL
VIEW
Web MVC
CONTROLLER
MODEL
VIEW
MODEL
MODEL
MODEL
MODEL
MODELS
CONTROLLER
CONTROLLER
CONTROLLER
CONTROLLER
CONTROLLERS
VIEW
VIEW
VIEW
VIEWS
VIEWS
VIEWS
Model View Presenter || MVVM
PRESENTER BOUNDARY
VIEW
MODEL
VIEW
INTERACTOR
ENTITY
ENTITY
ENTITY
RESPONSE
MODEL
DATA FLOW
CONTROLLER BOUNDARY
INTERACTOR
RESPONSE
MODEL
REQUEST
MODEL
BOUNDARYPRESENTER
What about the Database?
DATABASE
DATABASE
Tasks
CommandsModels
KITCHEN
SINK
PETS
GRANDMA
Utils
UI
CONTROLLERS SERVLETS
The database is a detail
DATABASE as Plugins
INTERACTOR
ENTITY
ENTITY
ENTITY
ENTITY
GATEWAY
ENTITY GATEWAY
IMPLEMENTATION
DATABASE API
How about Architecture?
Good architecture lends
itself to decision deference
Good architectures
maximize the number of
deferred decisions
Pluggable
Use CasesUI
DATABASE FRAMEWORKS
~ Frameworks
Pluggable Architecture
BOUNDARY
BOUNDARY
REQUEST
MODEL
RESPONSE
MODEL
INTERACTOR ENTITIES
ENTITY GATEWAY
DATABASE
~ TDD, for Architecture
~ No Setters
~ Message Passing

More Related Content

Similar to Thinking in the OOP way by Mark Musoba

Computing through the ages
Computing through the agesComputing through the ages
Computing through the ages
LSC-CyFair Academy for Lifelong Learning
 
Short History of Computer
Short History of ComputerShort History of Computer
Short History of Computer
Haseeb Ahmed Awan
 
Computer for Management..pptx
Computer for Management..pptxComputer for Management..pptx
Computer for Management..pptx
Ankur Kukreti
 
computer history
computer historycomputer history
computer historyJelz JZ
 
History lecture notes s2004
History lecture notes   s2004History lecture notes   s2004
History lecture notes s2004MUHAMMAD UMAIR
 
Microprocessor laboratory
Microprocessor laboratoryMicroprocessor laboratory
Microprocessor laboratory
binvid
 
Fundamentals of Computing Chapter 1
Fundamentals of Computing Chapter 1Fundamentals of Computing Chapter 1
Fundamentals of Computing Chapter 1
Mohd Harris Ahmad Jaal
 
History of computer with pictures and descriptions
History of computer with pictures and descriptionsHistory of computer with pictures and descriptions
History of computer with pictures and descriptions
Muzammil Ali
 
Chapter 1 part i introduction
Chapter 1 part i introductionChapter 1 part i introduction
Chapter 1 part i introduction
Azimjon Khamdamov
 
History of Computers.pdf
History of Computers.pdfHistory of Computers.pdf
History of Computers.pdf
Shiva340703
 
Generations of Computer.pptx
Generations of Computer.pptxGenerations of Computer.pptx
Generations of Computer.pptx
Fatima644381
 
historyofcomputer-170621232538.pdf
historyofcomputer-170621232538.pdfhistoryofcomputer-170621232538.pdf
historyofcomputer-170621232538.pdf
KamranAli649587
 
History of Computer
History of ComputerHistory of Computer
History of Computer
Nikki Paccial
 
History of Computers_d284acd37858bc8b56565ad9acfcc8ab.pptx
History of Computers_d284acd37858bc8b56565ad9acfcc8ab.pptxHistory of Computers_d284acd37858bc8b56565ad9acfcc8ab.pptx
History of Computers_d284acd37858bc8b56565ad9acfcc8ab.pptx
ZakiFarejo
 
Computers basics.pptx basics of computers in business environment
Computers basics.pptx basics of computers in business environmentComputers basics.pptx basics of computers in business environment
Computers basics.pptx basics of computers in business environment
ssusere1704e
 
Computers basics.pptx basics of computers in IT
Computers basics.pptx basics of computers in ITComputers basics.pptx basics of computers in IT
Computers basics.pptx basics of computers in IT
ssusere1704e
 
HISTORY, DEFINITION, Creator-OF-COMPUTER.pptx
HISTORY, DEFINITION, Creator-OF-COMPUTER.pptxHISTORY, DEFINITION, Creator-OF-COMPUTER.pptx
HISTORY, DEFINITION, Creator-OF-COMPUTER.pptx
DelgadoAdrianJonJ
 
Evolution of computers/computer evolution/c++
Evolution of computers/computer evolution/c++Evolution of computers/computer evolution/c++
Evolution of computers/computer evolution/c++
Archie
 
computer
computercomputer
computer
Keshav Chauhan
 

Similar to Thinking in the OOP way by Mark Musoba (20)

Computing through the ages
Computing through the agesComputing through the ages
Computing through the ages
 
Short History of Computer
Short History of ComputerShort History of Computer
Short History of Computer
 
Computer for Management..pptx
Computer for Management..pptxComputer for Management..pptx
Computer for Management..pptx
 
computer history
computer historycomputer history
computer history
 
History lecture notes s2004
History lecture notes   s2004History lecture notes   s2004
History lecture notes s2004
 
Ch 1
Ch 1Ch 1
Ch 1
 
Microprocessor laboratory
Microprocessor laboratoryMicroprocessor laboratory
Microprocessor laboratory
 
Fundamentals of Computing Chapter 1
Fundamentals of Computing Chapter 1Fundamentals of Computing Chapter 1
Fundamentals of Computing Chapter 1
 
History of computer with pictures and descriptions
History of computer with pictures and descriptionsHistory of computer with pictures and descriptions
History of computer with pictures and descriptions
 
Chapter 1 part i introduction
Chapter 1 part i introductionChapter 1 part i introduction
Chapter 1 part i introduction
 
History of Computers.pdf
History of Computers.pdfHistory of Computers.pdf
History of Computers.pdf
 
Generations of Computer.pptx
Generations of Computer.pptxGenerations of Computer.pptx
Generations of Computer.pptx
 
historyofcomputer-170621232538.pdf
historyofcomputer-170621232538.pdfhistoryofcomputer-170621232538.pdf
historyofcomputer-170621232538.pdf
 
History of Computer
History of ComputerHistory of Computer
History of Computer
 
History of Computers_d284acd37858bc8b56565ad9acfcc8ab.pptx
History of Computers_d284acd37858bc8b56565ad9acfcc8ab.pptxHistory of Computers_d284acd37858bc8b56565ad9acfcc8ab.pptx
History of Computers_d284acd37858bc8b56565ad9acfcc8ab.pptx
 
Computers basics.pptx basics of computers in business environment
Computers basics.pptx basics of computers in business environmentComputers basics.pptx basics of computers in business environment
Computers basics.pptx basics of computers in business environment
 
Computers basics.pptx basics of computers in IT
Computers basics.pptx basics of computers in ITComputers basics.pptx basics of computers in IT
Computers basics.pptx basics of computers in IT
 
HISTORY, DEFINITION, Creator-OF-COMPUTER.pptx
HISTORY, DEFINITION, Creator-OF-COMPUTER.pptxHISTORY, DEFINITION, Creator-OF-COMPUTER.pptx
HISTORY, DEFINITION, Creator-OF-COMPUTER.pptx
 
Evolution of computers/computer evolution/c++
Evolution of computers/computer evolution/c++Evolution of computers/computer evolution/c++
Evolution of computers/computer evolution/c++
 
computer
computercomputer
computer
 

Recently uploaded

Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTSHeap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Soumen Santra
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
Victor Morales
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 
Technical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prismsTechnical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prisms
heavyhaig
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
camseq
 
Water billing management system project report.pdf
Water billing management system project report.pdfWater billing management system project report.pdf
Water billing management system project report.pdf
Kamal Acharya
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
Kamal Acharya
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
Kamal Acharya
 
Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
Dr Ramhari Poudyal
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
WENKENLI1
 
DESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABS
DESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABSDESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABS
DESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABS
itech2017
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Christina Lin
 
basic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdfbasic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdf
NidhalKahouli2
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
SUTEJAS
 
Building Electrical System Design & Installation
Building Electrical System Design & InstallationBuilding Electrical System Design & Installation
Building Electrical System Design & Installation
symbo111
 
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdfTutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
aqil azizi
 
PPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testingPPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testing
anoopmanoharan2
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
Massimo Talia
 

Recently uploaded (20)

Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTSHeap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 
Technical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prismsTechnical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prisms
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
 
Water billing management system project report.pdf
Water billing management system project report.pdfWater billing management system project report.pdf
Water billing management system project report.pdf
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
 
Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
 
DESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABS
DESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABSDESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABS
DESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABS
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
 
basic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdfbasic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdf
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
 
Building Electrical System Design & Installation
Building Electrical System Design & InstallationBuilding Electrical System Design & Installation
Building Electrical System Design & Installation
 
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdfTutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
 
PPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testingPPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testing
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
 

Thinking in the OOP way by Mark Musoba

Editor's Notes

  1. https://www.youtube.com/watch?v=ecIWPzGEbFc
  2. Alan Turing was probably the first person to write code that we could recognize today as code executed in an electronic computer with binary as an instruction format.
  3. Alan Turing was probably the first person to write code that we could recognize today as code executed in an electronic computer with binary as an instruction format.
  4. Alan Turing was probably the first person to write code that we could recognize today as code executed in an electronic computer with binary as an instruction format.
  5. Relay is a coil of wire, which if current is passed through generated a magnetic field that attracts the amateur, pulling it in to grab the switch contact to either close or open the switch. You can either open/close the switch to complete the circuit. These were mainly invented for telegraps, since telegrap signals could go for ~20 miles to amplify the signal, by putting a relay between the signals, which would close the switch on a new battery to relay the signal for another ~20 miles
  6. A device like this could probably switch 10 times as reliably, the clock rate was ~10 milliseconds. The clock rate on relays was not significant by today’s standards, but was faster than anything
  7. Vacuum tubes were unreliably slow and could fail often because they could not hold the vacuum for long, the filaments would burn out quickly, they were not standard, but were faster than relays, but they so unreliable to put them in a serial format was unreliable.
  8. The colossus computer. ACE = Automated Computing Engine Alan Turing designed: He designed the instruction set He designed the word width He designed the concept of the machine The first reliable tube computer that used mercury delay lines. A mercury delay line is a tube of mercury fluid. You put a speaker on one end and a microphone at the other. The sound waves roar through the mercury coming out at the other end, picked up by the microphone transistor, and cycle it around to the beginning of the memory. This was akin to rotating memory like a disc, only that it was memory. They figured they could get 1024 bits into the tube, then they would have 22 tubes, this was a 22 bit word size machine. This was a 1024x22 machine to write code on.
  9. Alan Turing, in inventing computing foresaw the rigour discipline it would require to do work
  10. He understood the problems we were going to face in the next 60 years after writing a few lines of software in Base 32.
  11. He understood the problems we were going to face in the next 60 years after writing a few lines of software in Base 32. Our industry has been hunting for discipline while at the same time rejecting it.
  12. Alan Turing, in inventing computing foresaw the rigour discipline it would require to do work
  13. Alan Kay invented Object Oriented Programming in SmallTalk, but not the way we know it now.
  14. Brief history of C, C++ and Objective C. How many languages have we developed in the last 5 years. Why don’t we agree that we can speak the same language for a long time without inventing and adopting new languages - Had a chapter zero, that Bjarne copied and gave the impression that C++ was the next C.
  15. These guys popularized OOP. Both wanted a better C, so they wrote preprocessors in front of C to add the imperatives that they were looking for. Objective C was known before C++.
  16. Woman have a more structured and methodical approach to things that we seem to have lost
  17. The colossus computer. ACE = Automated Computing Engine Alan Turing: Designed the instruction set Designed the word width Designed the concept of the machine The first reliable tube computer that used mercury delay lines. A mercury delay line is a tube of mercury fluid. You put a speaker on one end and a microphone at the other. The sound waves roar through the mercury coming out at the other end, picked up by the microphone transistor, and cycle it around to the beginning of the memory. This was akin to rotating memory like a disc, only that it was memory. They figured they could get 1024 bits into the tube, then they would have 22 tubes, this was a 22 bit word size machine. This was a 1024x22 machine to write code on.
  18. A use case does not describe the system, nor the implementation details of the data OOP has two problems, which stem from state abstraction and management: They hide state mutations They share state using pointers These do not lend very well to concurrency and parallel programming
  19. Entities have application independent business rules Interactors will talk to multiple entities
  20. Entities have application independent business rules Interactors will talk to multiple entities
  21. These are output boundaries, that separate the output from the input.
  22. DM => Delivery Mechanism Output boundaries separate the output from the input.
  23. This was designed for SmallTalk The model object hides a small business rule The role of the control is to gather input from some device (keyboard, mouse) The control translates the gestures into method calls on the model. The model is not allowed to know what devices control it, the model was not allowed to know where it gets its input from The view registered with the model and the model calls back to the view through an observer pattern, and the view is tasked with presenting the model to the user in an appropriate pattern This is minute. There was a MVC for a button, text box or group of buttons. This is unlike the current web
  24. What happens here is that you have controller logic leaking into the models Url parsing logic Http request manipulation Etc Business logic also leaks into views, especially if the team cannot keep discipline. The problem is that there are no SOLID boundaries
  25. The boundary is a hard architectural boundary that separates the business rules. The arrows point to the left of the boundary, and not to the right. This is the gist of the plugin architecture. The UI is a plugin into the business rules, not the other way round If something changes often, it should be a plugin, if something is not going to change often, it should be plugged into. The presenter is a class or set of classes that takes the response model and translates it into a view model. Response model => This is a model that has data in it created in the interactor as a result of a use case, but the data is not presentable (Date, currency) View model => Created by presenter (takes the data and turns them into formatted strings) and contains string formatted data. The view model knows how to format data. All significant processing of the presentation of the screen is done in the Presenter The view has to be so stupid as not to be tested.
  26. All arrows point in one direction to the left of the boundary point in one direction.
  27. Frameworks and design patterns are details that should be hidden
  28. Who calls the database? Grandma?
  29. The programmer’s job is to separate the details from the things that are general. We separate the things that are important from the things that are not We are ABSTRACTORS The database is a detail for persistence! Persistence existed before relational database. Directory structures Hierarchical databases Flat data structures Why are we preferring the table structures for the last 30 years, abstracted behind a language called SQL. Why databases? Because working with disks is a pain. You have to take into account: Spin velocity Byte marks You had to send accelerate and decelerate velocity 100ms for seeking the byte to write sequence Waiting for rotational latency To write a byte, you had to read a sector (4k bytes) We invented indexing to make dealing with disks easier. Then created tables to hold the indexes and then creates frameworks to abstract all that away.
  30. The entity gateway has every method for every operation you want to perform on the database. The database specific implementation (SQL) lives in the gateway implementation. The SQL stuff plugs into the business rules. For testing, we replace the gateway implementation with stubs that return test data. If the tests take more than a couple of minutes to run, they will fail in their purpose … If you run the tests yourself and see them execute in real time, you could make decisions based on what happened on those tests.
  31. An architect is someone who defers design decisions until they are absolutely necessary Good architectures allow major architectural decisions to be deferred. The job of an architect is not to make decisions, the job of a good architect is to defer decisions as long as possible to allow the program to be built in the absence of decisions so that decisions can be made later with the most possible information (or adequate information).
  32. You need to make some decisions early, like language, but you do not need to decide what database will be used early. You may already know due to existing constraints, but you can still pretend like you don’t know the database and defer that decision as long as possible. If the first thing you type at the beginning of the project is the web framework, you have lost the architecture. The business rules should always come first and then defer the framework decision later.
  33. And this is achieved by using a plugin model.
  34. Everything is a plugin to the Use Cases. The Use Cases do not know that they exist, they are indepent to everything else. People have gotten emotional about dependency injection, however, you do not want to inject everything. The thing you want to inject is the factories (and let the rest of the business rules use those factories) and strategies. Do not inject anything into the Use cases! You do not want the Use Case code to know about the DI framework, or any framework for that matter.
  35. Framework authors are out to screw you! There are not really out to screw you but they will screw you inadvertently since they have their interests in mind, not yours. The relationship between the developer and framework author is fraught to one side: Developers make tremendous commitments to the frameworks, while the framework authors do not make any commitments. The author will change the framework any time he feels like it. A good software developer looks at frameworks and understands that any frameworks come with benefits but also with tremendous costs. And the costs can be pretty high. Use the frameworks but keep them at arms-length. Do not follow the examples of the framework author (that he writes in the docs), because they are comfortable coupling to his framework, but you should not. How do break away from you framework if it becomes a liability? There has to be loose coupling between frameworks and your business logic.
  36. TDD Use TDD to structure the primary interface to the code
  37. TDD Use copy constructors
  38. TDD Use TDD to structure the primary interface to the code