Modularization Notice
Modularization Notice
Mandate
https://plus.google.com/112678702228711889851/posts/eVeouesvaVX
1
Jeff Bezos Mandate
1. All teams will henceforth expose their data and functionality
through service interfaces.
2
Jeff Bezos Mandate
5. All service interfaces, without exception, must be designed from
the ground up to be externalizable. That is to say, the team must
plan and design to be able to expose the interface to developers
in the outside world. No exceptions.
3
Stevey's Google Platforms Rant
Google+ is a prime example of our complete failure to
understand platforms
If you delay it, it'll be ten times as much work as just doing it
correctly up front.
4
Stevey's Google Platforms Rant
You can't cheat.
You can't have secret back doors for internal apps to get
special priority access, not for ANY reason.
You need to solve the hard problems up front.
I'm not saying it's too late for us, but the longer we wait, the
closer we get to being Too Late.
5
On the Criteria to Be Used in
Decomposing Systems into
Modules
David L. Parnas
Communications of the ACM,
December 1972
6
Introduction
Usually nothing is said about the criteria to be used in dividing
the system into modules.
What is modularization?
“module" = responsibility assignment
(rather than a subprogram)
7
Benefits of Modular Programming
Managerial: development time should be shortened because
separate groups would work on each module with little need for
communication
8
Example: KWIC System
Input: an ordered set of lines
Each line is an ordered set of words
Each word is an ordered set of characters.
Output:
A listing of all circular shifts of all lines in alphabetical order
9
KWIC Example
Input:
Pattern-Oriented Software Architecture
Software Architecture
Introducing Design Patterns
Output
Architecture Software
Architecture Pattern-Oriented Software
Design Patterns Introducing
Introducing Design Patterns
Patterns Introducing Design
Pattern-Oriented Software Architecture
Software Architecture
Software Architecture Pattern-Oriented
10
Modularization #1
11
Modularization #1
Input. This module reads the data lines from the input medium
and stores them in core for processing by the remaining modules
12
Modularization #2
13
Modularization #2
Lines Storage:
CHAR(r,w,c): an integer representing the c-th character in
the r-th line, w-th word
SETCHAR(rpv,c,d): causes the c-th character in the w-th
word of the r-th line to be the character represented by d
WORDS(r) returns as value the number of words in line r.
Circular Shifter:
The module creates the impression that we have a line
holder containing all the circular shifts of the lines.
CSCHAR(I,w,c) provides the value representing the c-th
character in the w-th word of the I-th circular shift
14
Comparison
Modularization #1:
Each major step in the processing was a module
15
Changeability
Design decisions likely to change under many circumstances.
1. Input format
2. The decision to have all lines stored in core
3. The decision to pack the characters four to a word
4. The decision to make an index for the circular shifts rather
that actually store them as such
17
Comprehensibility
To understand the output module in the first modularization, it will
be necessary to understand something of the alphabetizer, the
circular shifter, and the input module.
18
Conclusion
We have tried to demonstrate by these examples that it is almost
always incorrect to begin the decomposition into modules on the
basis of a flowchart.
19
Later Comments
To a man with a hammer, everything looks like a nail.
Although some tools could make the job easier, no special tools
were needed to use the principal, just discipline and skill.
20