[an error occurred while processing this directive]
SOLID
I am attending a conference in Porto,
Portugal and will be unable to attend today. So here is some
material for you to learn about SOLID on your own.
Software development is not a game of
Jenga!
The SOLID principles
of object-oriented programming are
- Single-responsibility
principle
- Uncle
Bob's post from 8 May 2014, but similarly described by
Tom DeMarco (1979) and Meilir Page-Jones (1988) as cohesion.
-
Hackernoon with a short excursion
into the history of programming in Medium.
I have had the supreme pleasure of meeting Dave Parnas
on a number of occasions, he taught in Darmstadt for some
years. He quit the "Star Wars / SDI initiative" of Ronald
Reagan by observing (correctly) that you can't actually test
software that is designed to prevent a nuclear attack. Are
you going to have Russia shoot a few missiles at New York
and hope you can intercept them? We only disagree heartily
on whether there should be a professional engineering
certificate issued to software engineers - he insists it is
necessary, I say it can't be done because SW development
moves too fast.
- Open-closed principle
- A chapter
from Uncle Bob's Engineering Notebook hosted on someone's
public Google drive.
- Bertrand
Meyer was the originator of this in 1988, says
Hackernoon@Medium.
- Liskov substitution
principle
- Barbara
Liskov was one of the first women to be awarded a PhD
in computer science (Stanford, 1968). Her research group at
MIT, the Programming Methodology group developed what we
know today as object-oriented programming with her ideas of
inheritance. She was awarded the Turing
Award from the ACM in 2009 for her work on data
abstraction. I had the extreme pleasure of being her dinner
partner at the GI yearly conference in Braunschweig. She
noted that men often scoff at her being a Turing award
winner, because "that's how we program, that's nothing
special." She still takes pride in her work having been so
useful to programming.
- Subtypes must be
substitutable for their base types: “What is wanted here is
something like the following substitution property; If for
each object s of type S there is an object
t of type T such that for all programs P
defined in terms of T, the behavior of P is
unchanged when s is substituted for t then S
is a subtype of T.”
- Barbara Liskov. 1987.
Keynote address - data abstraction and hierarchy. SIGPLAN
Not. 23, 5 (May 1988), 17–34.
DOI:https://doi.org/10.1145/62139.62141
- Thorben
Janssen. 2018. SOLID
Design Principles Explained: The Liskov Substitution
Principle with Code Examples
- Interface segregation
principle
- Dependency inversion
principle
- Decouple modules -
high-level modules should not depend on low-level modules.
Both should depend on abstractions. Abstractions should not
depend on details.
- Uncle Bob's chapter
The Viking
Code School has a great overview of all five concepts, look
especially at the bakery and drill examples!
Yes, there will be a question on the exam
about SOLID.
Copyright
Prof. Dr. Debora Weber-Wulff
Questions or comments:
<weberwu@htw-berlin.de>
Some rights reserved. CC-BY-NC-SA - Copyright and Warranty
Last Change:
2020-04-10 14:10 |