L09: Software Design Flashcards
What is software design?
Software design is a key artefact in software development and is closely linked with system implementation.
- Based on requirements engineering and architecture design
- Closely linked with implementation
- Influenced by programming paradigm, implementation concerns
- Can be used to generate implementation skeletons
- Moving from the ‘what’ to the ‘how’
- Development process determines how much design is done up front (depends on methodology)
- Should be documented
What is the software design process?
- Define context and external interactions of the target system
- Design system and software architecture
- Identify the principal entities / constructs for
implementation (programming) paradigm - Develop and document design models
- Specify dependencies and interactions
- Evaluate design
What is a programming paradigm?
- Style of implementation / programming
- How do we think about and plan the solution?
- What units do we need, and how do they communicate with each other?
A way to classify programming languages
- Imperative: requires you to say what needs to be done, and how it is done, e.g. Java, Javascript
- Declarative: describe what needs to be done, without explicitly describing the control flow, e.g. Haskell, SQL
What are some aspects of software design?
Structure
- Runtime (runtime structure, i.e. software architecture -> can be multiple clients with one server, multiple servers, microservices, etc.)
- Development (units of code in classes, methods and packages)
- Deployment
Behaviour
- Interactions (may require separate interface design)
- Control and Data flow
What are some types of software design?
Planned
- Significant issues are thought out in advance
- Potentially inflexible and out of sync with technology and changing requirements
Evolutionary
- Design of system grows as the system is implemented
- Can become a collection of ad-hoc decisions
What are some considerations for software design?
Design for change
Make components (units) atomic so that changes can be localised and made without disrupting the whole system. Modularity, separation of concerns, loosely coupling, high cohesion
User appropriate patterns
Higher level structure, architecture design, design patterns, tried and tested solutions to solve particular problems
Communicate the design
Everyone in the development team should understand the design, and why these design choices have been made
Listen to the development team
Development team can provide insights on challenges and limitations, bidirectional process
Refactor often
Especially in evolutionary design, there is no overall plan if you are incrementally adding features. We can reduce technical debt by being agile
What is a model?
A model is an abstract view of a system. A set of complementary models can be created to show
different perspectives of a software system design
It is not a complete reflection of the real world. The more abstract the model, the easier it is to understand- but more details are left out.
What can models be used for?
- Managing complexity
- Communicating with stakeholders
- Detecting errors and omissions early
- Guiding implementation
- Understanding and managing changes
- Planning work and resources
- Predictions
What are some modelling notations for software design?
Informal diagrams
- Boxes and lines
Semi-formal diagrams
- UML, SysML
Formal specifications
- CSP, 𝜋-calculus, petri nets, Promela
What is UML?
Unified Modelling Language (UML) is a graphical language used to model various artefacts of a software system, and particularly focuses on object-oriented design.
- General-purpose graphical modelling language
- A set of diagrams to represent different aspects of design
- Particularly aimed at object-oriented design
- Usable by humans and machines
What can UML diagrams represent?
Structure
Component, composite structure, deployment, package, class, object, profile
Behaviour
Activity, state machine, use case
Interaction
Communication, sequence, interaction overview, timing
When do we use UML diagrams in software development?
Requirements
Use case diagram
Software Architecture
Component diagram, activity diagram, deployment diagram
Software Design
Class diagram, sequence diagram, state machine diagram