Software Design Flashcards

1
Q

Why do we design our software using layers?

A

To decrease coupling and dependencies, making it easier to replace parts, as well as improve cohesion, increase reusability and increase clarity of the code.
It creates a separation of concerns.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are software design patterns and what is the benefit of using them?

A

Software design patterns are considered general reusable solutions to commonly occurring problems in software design. It helps us structure our code, in a way that improves readability and functionality.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the GRASP principle and why is it important?

A

General Responsibility Assignment Software Patterns helps describe fundamental principles of object design, including placement of responsibility for doing things and knowing things. It is a set of nine principles used for responsibility assignment in object design(Larman 1997) The nine principles are:

  1. Information expert
  2. Creator
  3. Controller
  4. Indirection
  5. Low Coupling
  6. High Cohesion
  7. Polymorphism
  8. Protected variants
  9. Pure fabrication
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the idea behind “High cohesion, low coupling?”

A

High cohesion helps us keep objects focused, understandable and manageable by making sure that things grouped together are closely related. Low coupling ensure that elements of the code are independent enough of each other, that changes in one place do not affect anything outside of that elements responsibility/area. It decreases the dependency between classes and increase the reusability of code.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly