Software Design Flashcards
What is the behavioral design pattern?
Explains how objects interact. It describes how different objects and classes send messages to each other to make things happen and how the steps of a task are divided among different objects.
What is the structural design pattern?
Ease the design by identifying a simple way to realize the relationship among entities. Structural design patterns uses inheritance to create interfaces.
Sometimes you need to change the structure of a class or the relationship between classes but don’t want the project to be affected.
What is the creational design pattern?
Deals with object creation mechanisms; trying to create objects based of the application requirements. Focuses on how the objects are created and utilized in an application.
If you have a huge project with lots of classes, it means you will have lots of objects. If the objects are not centralized then it can lead to very complicated code.
Ex: singleton, factory, builder, prototype, etc
What are the 3 types of software design patterns?
Creational
Structural
Behavioral
What are design patterns?
Design patterns are documented and tested solutions for recurring problems.
What is the SOLID principle?
Single Responsibility: This means that every class, or similar structure, in your code should have only one job to do. Everything in that class should be related to a single purpose.
Open/ Closed Principle: A software module/class is open for extension and closed for modification.
Liskov Substitution Principle: states that you should be able to use any derived class instead of a parent class and have it behave in the same manner without modification.
Interface Segregation Principle (ISP): The Interface Segregation Principle states “that clients should not be forced to implement interfaces they don’t use. Instead of one fat interface, many small interfaces are preferred based on groups of methods
Dependency Inversion Principle: The Dependency Inversion Principle (DIP) states that high-level modules/classes should not depend on low-level modules/classes. Both should depend upon abstractions. Secondly, abstractions should not depend upon details. Details should depend upon abstractions.
Relational vs non-relational databases?
A relational database is structured, meaning the data is organized in tables. Many times, the data within these tables have relationships with one another, or dependencies.
A non relational database is document-oriented, meaning, all information gets stored in more of a laundry list order. Within a single construct, or document, you will have all of your data listed out.