• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/96

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

96 Cards in this Set

  • Front
  • Back

Define design, with regards to software.

The organization of high-level software architecture and "close to code" systems.

Give some examples of design decisions.

1) Applying design patterns


2) separating access policy from business logic


3) picking specific class and method naming convention

What are the different domains of software design?

What is structure-oriented design?

Primarily concerned with the structure of the components of a program/system, their interrelationships, and what principles govern its evolution over time.

What is decision-oriented design?

Primarily concerned with the principal designs made about the system.

What is organization-oriented design?

Designs constrained by the communication structures of the developing organization.

What is "kitchen sink" design?

In which the architecture is a set of significant decisions about...EVERYTHING:


- the organization of a software system,


- the selection of the structural elements and their interfaces


- their behaviour as specified in thecollaborations among those elements,


- the composition of these structural andbehavioral elements into progressively larger subsystems,


- architectural style

What are the two levels of software design?

Software architecture (high level)


Detailed Design (close to code)

Define software architecture.

The high level decomposition of system or software


- elements and their connections


- allocation of functions to elements

True/False: an architecture has 1 specific view.

False. Multiple views are can be created depending on the target audience/stakeholder.

True/False: architecture focuses of the more stable aspects of a system that are less likely/more difficult to change.

True

What is the purpose of an architecture?

- Provide a decomposition/solution that meets the functional and quality requirements.


- Allow for effective concurrent development


- Fitness for future


- Enable reuse

How can you improve concurrent development?

- Simple interfaces


- optimize communication

What does fitness for future involve?

- Decoupling low level decisions from high level.


- Localize change


- Extension and evolution

What are the responsibilities of an architect?

- Champion architecture


- integrate info from different stakeholders


- build consensus among stakeholders


- identify and introduce best practices


- perform mining activities to identify common parts


- develop road map


- ensure architecture is followed (ie. reviews, checks)

What are the qualifications of an architects?

- Strong abstractions skills


- Excellent communication skills


- Ability to develop multi-disciplinary perspective


- Experience in a broad set of different design implementation, testing


- Excellent design skills


- Ability to think strategically


- knowledge of architectural concepts


- Eagerness to learn

What are the 7 main steps in the design process?

1. Know and understand customer's needs
2. Generate solutions (Ideation)
3. Conceptualize alternative solutions
4. Analyze solutions
5. Select solution
6. Validate it
7. Iterate

1. Know and understand customer's needs


2. Generate solutions (Ideation)


3. Conceptualize alternative solutions


4. Analyze solutions


5. Select solution


6. Validate it


7. Iterate

True/false: Requirements engineering provides the problem definition, consisting of functional requirements and quality requirements. A design has to satisfy both.

True.

What is the difference between design constraints and requirements?

Constraint: quality properties that should be minimized/maximized


Requirement: properties that should be satisfied or not

True/False: Design constraints are a part of the requirement specification.

False. They emerge from design decisions, not the problem spec.

What are 2 parts of the Synthesis step?

1. Generation of Ideas


2. Conceptualization

__________ and ___________ are checked in the Analysis Step.

Requirements and Constraints

What are 2 techniques used in the Decision Making step?

1. Checking weights of each design criteria


2. visualize alternatives in a multidimensional space

Describe 2 validation techniques.

1. Design reviews

2. Have the first release evaluated by customer



True/False: It is a good practice to think about optimization in the Synthesis step.

False.

What are the 3 groups of design criteria?

- Fitness for purpose


- Fitness for future


- Cost

Define functional requirements.

Functional requirements are concerned with what the system should do and how it should behave.

Define quality requirements.

How well the system should support functionalities.

Give 2 examples of quality requirements (4).

- Usability


- Performance


- reliability


- security

True/False: quality requirements may specify acceptable ranges.

True

True/False: Quality requirements can be used as design criteria.

True

Modifiability is concerned with fitness for:


- Future or


- Purpose?

Future

Name 2 qualities to measure modifiability by (4).

- Readability


- Maintainability


- portability


- extensibility

What are the 4 types of maintenance?



Define module.

A unit of system decomposition with a well-defined purpose and interface.

What are some (4) benefits of modular design?

It allows:


1. comprehension of system piece-by-piece


2. parallel development


3. evolution (change implementation by not interface)


4. independent compilation of interface and implementation

Define interface.

Interface: a contract between a module and its environment.

What is the difference between the provided interface and the required interface?

Provided: the services the modules provides and any guarantees.


Required: the services the module requires from its environment and assumptions.

True/False: interfaces should not change often.

True

What is the difference between syntactic and semantic interfaces?

Syntactic: specifies exposed services (ie. function signatures)


Semantic: specifies what the module does and how it behaves. (ie. side effects, when it fails)


- often documentation

What is a reasonable number of modules?

7 +- 2 Rule.

What is the Axiom of Independence?

Modules sand requirements are related such that a specific module can be adjusted to satisfy its requirement without affecting other requirements.

What is crosscutting?

When a requirement is implemented in several different modules across the module hierarchy.

When a requirement is implemented in several different modules across the module hierarchy.

What is tangling?

When several different requirements are implemented in the same module.

When several different requirements are implemented in the same module.

True/False: tangling is less problematic that crosscutting

True

True/False: Architects should strive to localize quality requirements.

False. For example, how would you localize performance?

What implementation details are usually hidden? (4)

- Data representation


- Properties of device


- Implementation of world models


- Mechanisms that support policies

Requirements that are more likely to change are more important to ________.

Localize.

How would you analyze modifiability? (6)

- Stimulus: changing functionality/quality


- Source: customer, developer, sys admin


- Artifact: system, UI, component


- Environment: Design/compile/run time


- Response: locate places to modify


- Metrics: cost and effort

How can you improve Modifiability? (2)

- Increase cohesion

- Reduce coupling

Define cohesion.

A measure of the coherence of a module amongst the pieces of that module.

Define Coupling.

The degree of relatedness between modules.

Functions within a modules can be related by ________ and ________.

Topic, interaction

What is Coincidental Cohesion?

When unrelated code is inserted into a random module.

What are god classes/modules? When are they justified?

Classes/Modules that have assumed too many responsibilities.


Libraries are examples of justifiable god classes.

Define temporal cohesion.

Gathers operations that are executed at a similar point in time. Leads to code duplication.

Define control-flow cohesion.

Code that is merged into a single module to share a common control flow. (Like switch statements)

What are the different types of coupling? (7)

- Data: A provides data to B


- Control: A controls (the inside of ) B


- Service: A calls B's service


- Identity: A knows B's identity


- Location: A knows B's location


- Quality of Service: A expects B's good service


- Content: A includes code from B

What is the weakest coupling type?

Data coupling

To reduce coupling, minimize the ________ and ________ of dependencies.

Number, strength

True/False: prefer inheriting implementation over interface.

False. Implementation Inheritance introduces strong coupling. Prefer interface.

To avoid control coupling, consider using _________.

Polymorphism

What is Stamp coupling?

Passing more data to a module than necessary.

Define refactoring.

To improve design without changing functionality.

What is the role of testing in design?

To enable refactoring without fear of breaking code.

What are 2 problems with code duplication?

- Parallel maintenance


- More code to maintain

How can you fix code duplication? (3)

- Extract method


- Extract class and pull-up method


- Form template method

When is code duplication justifiable? What are the benefits?

When you need clones/duplicates of an object for different project.


- No coupling


- customize to context


- Optimization

Name 4 code smells. (12)

- Duplicated code


- Long method


- Large class


- Comments


- Switch statement


- Primitive Obsession


- Long parameter list


- feature envy


- data clumps


- shotgun surgery


- direct constructor call


- speculative generality

How can you fix Long Methods?

- Break up into smaller private methods (extract)


- delegate subtasks to member variables that "know best". (replace data value with object)


- for example, look at comments for major steps

How can you fix Large Class?

- Gather up the little pieces into aggregate member variables


- Delegate methods to the new member variables

What are symptoms of Long Parameter List? How can you fix each?

- Doing too much


- break up into subtasks


- Too "far from home"


- localize passing parameters


- too many disparate member variables


- Gather params into aggregate member variables

What is shotgun surgery? How can you fix it?

Each time you want to make a single, seemingly coherent change, you have change lots classes in little ways.


- Can mean poor cohesion or high coupling




Look to do some gathering

What is Feature Envy? How can you fix it? What are some exceptions?

When a method seems more interested in another class than the one it's defined in.




Try moving it.




Exceptions: Visitor, iterator, and strategy design

What are Data Clumps? How can you fix it?

When a set of variables seem to "hang out" together.




Combine to aggregate member variable.




May cause some feature envy.

What is Primitive obsession? How can you fix it?

All member variables of an object are instances of primitive types.




Create "small classes" that can validate and enforce constraints.

What is wrong with Switch Statements?

Exhibits a lack of understanding of polymorphism and encapsulation.

What is Speculative generality?

- Adding features/classes because you might need to add something "someday"

What is a design pattern?

A solution to a re-occuring design pattern

Describe the general format of a design pattern.

1. Describe the problem and relevant context


2. Design solution


3. Design consequences, positive/negative impacts of solution on the system

What is the Composite Design pattern?

Treat atomic elements and their components alike.

Treat atomic elements and their components alike.

What is the intent and the applicability of the Composite Design?

Intent: Treat individual objects and multiple, recursively-composed objects uniformly


Applicability:


- Objects must be composed recursively,


- no distinction between individual


- composed elements, objects in structure can be treated uniformly.

What some (3) effects/consequences of the Composite Design? Denote if they are positive or negative.

+ Uniformity


+ Extensibility


- Overhead

What is the Decorator Pattern?

A transparent wrapper class.
Extension by wrapping.                   

A transparent wrapper class.


Extension by wrapping.

What is the intent and applicability of the decorator pattern?

Intent: augment objects with new responsibilities


Applicability:


- when extension by subclassing is impractical


- for responsibilities that can be withdrawn

What are the consequences of the decorator pattern? Denote if they are positive or negative.

+ Responsibilities can be added/removed at run-time


+ avoid subclass explosion


+ recursive nesting allows multiple responsibilities


- interface occlusion


- split identity

What is the interpreter pattern?

Provides a way to translate a language grammar into an object structure and to implement operations over that structure.

What is the visitor pattern?

Encapsulate operations on the object structure as objects to allow easy addition of new operations without disturbing the classes implementing the object structure.

The Interpreter pattern builds on the _________ pattern.

Composite

What is the Strategy Pattern's Intent and Applicability?

Intent: Define a family of algorithms, encapsulate each one, and make them interchangeable
Applicability: When an object should be configurable with one of several algorithm AND all algorithms can be encapsulated AND one interface covers all encap...

Intent: Define a family of algorithms, encapsulate each one, and make them interchangeable


Applicability: When an object should be configurable with one of several algorithm AND all algorithms can be encapsulated AND one interface covers all encapsulations

What are the consequences of the Strategy Pattern?

+ Greater Flexibility and reuse


+ Can change algorithms dynamically


- Strategy creation & communication overhead


- Inflexible strategy interface

What is the difference between Factory Method and Abstract Factory?

Factory method is just when there is a factory being called the client.


Abstract Factory is where the client is not sure of the factory or the product being created.

What are the consequences of the Template Method?

+ Inversion of control


+ promotes code reuse


+ Lets you enforce overriding rules


- Must subclass to specialize behaviour

What are the pros and cons of Object Composition?

+ provides a clean separation between components and interfaces


+ Allows for dynamic composition


+ Allows for flexible mixing/matching of features


- forwarding


- identity crisis


- Fragementation

What are the pros and cons of Inheritance?

+ No explicit forwarding


- close coupling


- static hierarchies


- combinatorial explosion of features

What is an architecture pattern?

A solution to a re-occurring architectural design problem