Software Design Concepts Flashcards

1
Q

Idempotence

A

Idempotence, in programming and mathematics, is a property of some operations such that no matter how many times you execute them, you achieve the same result. In programming, idempotence can be a property of many different code elements, including functions, methods, requests and statements.

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

IoC

A

Inversion of control

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

Inversion of control (IoC)

A

Inversion of Control is a design pattern that helps to decouple the components in a system, making them more flexible, reusable, and testable. It allows developers to write more loosely-coupled code, which results in a more maintainable and extensible system.

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

Dependency Injection

A

Dependency injection (DI) is one form of IoC where we delegate the responsibility of creating and injecting components’ dependencies to some other party outside of the components themselves.

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

What is inversion of control life cycle?

A

Inversion of Control (IoC) is a software design principle responsible for the lifecycle of objects throughout the application. The mission of IoC is to manage the instances used in the application and to reduce dependency.

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

What is SOLID?

A

SOLID is a popular set of design principles that are used in object-oriented software development. SOLID is an acronym that stands for five key design principles: single responsibility principle, open-closed principle, Liskov substitution principle, interface segregation principle, and dependency inversion principle.

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

Single Responsibility Principle

A

Single-responsibility Principle (SRP) states:

A class should have one and only one reason to change, meaning that a class should have only one job.

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

Open-closed principle

A

Open-closed Principle (OCP) states:

Objects or entities should be open for extension but closed for modification.
This means that a class should be extendable without modifying the class itself.

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

Liskov Substitution principle

A

Liskov Substitution Principle states:

Let q(x) be a property provable about objects of x of type T. Then q(y) should be provable for objects y of type S where S is a subtype of T.

This means that every subclass or derived class should be substitutable for their base or parent class.

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

Interface segregation principle

A

Interface segregation principle states:

A client should never be forced to implement an interface that it doesn’t use, or clients shouldn’t be forced to depend on methods they do not use.

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

Dependency Inversion principle

A

Dependency inversion principle states:

Entities must depend on abstractions, not on concretions. It states that the high-level module must not depend on the low-level module, but they should depend on abstractions.

This principle allows for decoupling.

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

What are Microservices?

A

Microservices - also known as the microservice architecture - is an architectural style that structures an application as a collection of services that are:

Independently deployable
Loosely coupled
Organized around business capabilities
Owned by a small team
The microservice architecture enables an organization to deliver large, complex applications rapidly, frequently, reliably and sustainably - a necessity for competing and winning in today’s world.

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

What is a Deterministic function?

A

A deterministic function always returns the same results if given the same input values.

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

What is Polymorphism?

A

Polymorphism means “many forms”, and it occurs when classes are related to each other by inheritance. Allows us to perform a single action in different ways. Think of a base class Animal that has a method of animalSound(). The derived animals perform the same action in their own way.

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

What is Lexical Scoping?

A

Lexical scoping is a way of defining how variables and functions interact based on their position within the code. Refers to the ability of a function to access variables from the parent scope.

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