Are there risks in the project that could be minimized by an early design activity?
1. It’s someone else’s responsibility to do requirements.
2. I learn the domain as I write the code; incrementally.
3. The requirements are already fully understood by the stakeholders.
4. Domains are irrelevant to architecture choice.
5. I already know the requirements.
ARCHITECTURAL PATTERNS
Modules
What is the structure of the actual modular units of code?
How are larger modules decomposed into smaller sub modules?
What other modules are using any given module?
Are the modules structured in layers?
What is the class structure of the modules (e.g. class inheritance)?
Components and Connectors
What is the structure of the actual runtime elements and their various interactions?
How are various processes or threads connected?
Where can threads run concurrently?
Where might threads compete for resources?
How is data produced and consumed by runtime elements?
Allocations
How does the system relate to elements like the hardware, file systems, networks and development teams in the environment?
Where is software deployed (e.g. to what hardware are software elements allocated to)?
How is software mapped to the file system(s)?
Which developers or development teams are assigned to work on a given structure?
patterns
anti-patterns
WHAT MAKES A GOOD ARCHITECTURE?
The architecture should be designed to meet a prioritized list of quality attributes.
The architecture should be driven by the non-functional requirements of the system .
The architecture should be well documented and easily communicated.
The architecture should identify any significant conflicts or tradeoffs, and clearly define the resolutions to these issues.
The architecture should maximize the ability to localize changes to any given part of the system without affecting other parts of the system.
The architecture should, whenever possible, lean on established architectural patterns which have proven most effective at solving the problems the software system is faced with.
The architecture should utilize architectural patterns such that, as often as possible, the system does similar things the same way throughout the entire system.
Bad Design
rigidity
it’s hard to change a part of the system without affection too many other parts of the system
fragile
when making a change, unexpected parts of the system break (introducing bugs)
immobile
Viscosity
Easy to do wrong things, hard to do right things
Needless complexity
complicated class design, overly generalized
Opacity
hard to understand
Layer architect
Principles
SOLID
DRY
KISS
You aren't going to need it.
Law of Demeter
The Cooperative Game Principle
The Peter Principle
Once And Only Once
Design By Contract
open-closed-principle design conventions
All member variables should be private
No global variables
avoid multiple if-then-else or switch-case statements
Principles of Package Design
Reuse/Release Equivalency Principle
Common Reuse Principle (CRP)
Common Closure Principle (CCP)
Acyclic Dependencies Principle (ADP)
Stable Dependencies Principle (SDP)
Stable Abstractions Principle (SAP)
Coupling and Cohesion
Proximity Principle
The boy scout rule
Separation of Concerns (SoC) Principle
Object Oriented Concepts
Data and Logic together
Inheritance is the last option
Composition over Inheritance
Focus on smart data-structure
Abstraction as design mechanism
Class design
coupling
Number of class that your class depends on
Cohesion
the object is focused on doing one thing well
high cohesion and low coupling
What does just enough up front design actually mean
too little
No understanding of what and where the system boundary is
No understanding of "the big picture" within the team
No common understanding of "the big picture" across the team
Inability to communicate the overall vision
Team members aren't clear or comfortable with what they need to do
No thought about non-functional
No thought about how the constraints of the (real-world) environment affect the software (e.g. deployment environment)
No thoughts on key areas of risk, such as non-functional requirements, external interfaces, etc
The significant problems and/or their answers haven't been identified.
No thought on separation of concerns, appropriate levels of abstraction, layering, modifiability, flex points, etc
No common understanding of the role that the architect(s) will play
Inconsistent approaches to solving problems
A lack of control and guidance for the team
Significant change to the architecture during the project lifecycle that could have been anticipated
Too many design alternatives and options, often with team members disagreeing on the solution or way forward
Unsure whether the design will work (e.g. no prototyping was performed as a part of the design)
A lack of technology choices
Subtopic 18
Subtopic 19
too much
Too much information (i.e. long documents and/or information overload)
Subtopic 1
A design that is too detailed at too many levels of abstraction
Too many diagrams
Writing code or pseudo-code in documentatiON
n architecture that is too rigid with no flexibility
All decisions at all levels of abstraction have been made
Class level design and sequence diagrams for all interactions
Detailed entity relationship models and database designs (e.g. tables, views, stored procedures and indexes)
Analysis paralysis and a team that is stuck focussing on minor details
Coding becomes a simple transformation of design artefacts to code, which is boring and demotivates the team
An unbounded "design phase" (i.e. time and/or budget)
The deadline has been reached without any coding
enough
Understanding how the significant elements of your architecture fit together (i.e. structure ... components and their interactions)
Ensuring that you identify and mitigate the key risks (e.g. non-functional requirements and the constraints of the environment)
Putting some firm foundations down and ensuring that everybody understands the overall vision (i.e. "the big picture")
question
Will the architecture work? If not, why not?
Have all of the key risks been identified?
Is the architecture too simple? Is it too complex?
Has the architecture been communicated effectively?
What do people like about the diagrams? What can be improved?
Is there too much detail? Is there enough detail?
Could you give this to *your* team as a starting point?
Is there too much control? Is there not enough guidance?
Are you happy with the level of technology decisions that have been made or deferred
quality
Software quality factors
Correctness
Efficiency
Expandability
Integrity
Interoperability
Maintainability
Portability
Reusability
Reliability
Testability
Usability
Poor Software Quality
cause by
Lack of domain knowledge
Lack of technology knowledge
Unrealistic Schedules
Badly engineered software
Symptoms
Rigidity
Fragility
immobile
Viscosity
Code Quality
Skill
Technology
Care
Code review
Unit test- TDD
code smell - Code refactoring
Measure the system quality
Metric
1. Source Lines of Code (SLOC)
2. Bugs per code_section/module/time_period
3. Code Coverage - unit test
4. Design/Development Constraints
Class/method length,
Number of methods/attributes in a class,
Method/constructor parameter counts,
Magical number, string usage in code files,
Comment lines percentage etc.
5. Cyclomatic Complexity
6. Code style
stylecop
FxCop
7. Duplication
PMD
Principle
1- Software-quality requirements must be established before the design take place.
2- Software-quality metrics must be identified.
3- Software-quality metrics must be implemented.
4- The results of these metrics must be analyzed.
5- The software-quality metrics must be validated.
Continuous integration
User Story review
root causes analysis
Mistakes
Management
1.- Believing that productivity is mainly associated with man power and working hours.
2.- Not managing customer expectations.
3.- Ignoring feedback from developers.
4.- Controlling as opposite of empowering.
5.- Being afraid of making decisions.
Managing crises
Effect on Productivity
Technical Debt
How much is it Really Costing you?
$$-$$$ Error-prone code
$$$ Making a fundamental mistake in architecture or the platform technology
$-$$ The system can’t be easily tested
$-$$ Not taking care of packaging and release and deployment
$-$$ Code that mysteriously works, but nobody is sure how or why
$-$$ Forward and backward compatibility adapters and compromises
$-$$ Out of date libraries and middleware stack
$-$$ Duplicate, copy-and-paste code
$-$$ Known, outstanding bugs in code and unresolved static analysis findings
$-$$ Inefficient design or implementation
$ Inconsistent use of programming idioms and patterns
$ Missing or poor error handling and exception handling.
$0.01 Hard coding, magic numbers, code that isn’t standards compliant, poor element naming, missing comments
$0.01 Out of date documentation
$0.00 Hand-rolled code that could have and should have been done using built-in language features or libraries, or existing framework or common services.
Agile Quality Assurance
goals
changes quickly
what changed
business
technologies
people
to reach
time to market
What’s wrong with traditional
Testing a product takes a lot of time
where do bugs come from?
The dark places in our software are called technical debt
architecture in a way so that these problems are under control
openness
open for new features
flexibility
change local
simple
SOLID
automated test
Unit test
Acceptance test
define initial architecture
It has to be clear enough to get the development team running, but it should not be too specific either
architecture workshop
Gather feedback about architecture
Simulator
Refine architecture
spike
leader
it is still better to decide wrongly (and hopefully correct it later) than not taking a decision at all
Principle
Quality from the start
Early interface validation
Divide and conquer
Safety net for the code
Confidence = Productivity
Light at the end of the tunnel
design quality attribute
process
Harveynash High level design process
Harveynash Detail design process
Harveynash development process
Harveynash build process
Agile
principle
breaking projects into Small Releases
to
manage risk and accelerate feedback
time-boxing
to
limit WIP and keep everyone focused
relying only on working software as the measure of progress
simple estimating and using velocity to forecast team performance
working closely and constantly with the customer
Continuous Integration – and Continuous Delivery
to
to ensure that code is always working and stable.
best practices that aren’t important
Test-Driven Development
Pair Programming
Emergent Design and Metaphor
Daily Standups
Collective Code Ownership
Writing All Requirements as Stories
Relying on a Product Owner
Type of Agile teams to avoid
the sinking ship team
the marry go around team
the well oiled team
the roller coaster team
TA role
Characteristics of a software architect
Are You a Software Architect?
Software Architecture and Related Concerns
What is a good software architecture in a nutshell?