Clean Architecture Flashcards

(13 cards)

1
Q

What is the core goal of Clean Architecture?

A

To separate business logic from UI and data for maintainability and prevent Technical Debt

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

What is the Dependency Rule?

A

Inner layers never depend on outer layers; dependencies point inwards.

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

What lives in the Domain Layer?

A

Pure business logic, entities, and abstract repository interfaces.

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

What lives in the Data Layer?

A

Databases, APIs, data sources, and repository implementations.

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

What lives in the Presentation Layer?

A

UI widgets, screens, and state management logic.

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

What is an Entity?

A

A pure class representing a business object independent of frameworks.

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

Where should you put ‘Use Cases’?

A

In the Domain layer, defining specific business actions.

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

Why use Repository Interfaces in Domain?

A

To decouple the business logic from specific data sources.

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

What is the main benefit for testing?

A

Core logic can be tested without UI or databases.

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

What is a DTO (Data Transfer Object)?

A

A model used only for parsing JSON or SQL data.

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

List out 4 folders can be in the data folder

A
  1. datasources/ -> SQLite Service
  2. mappers/
  3. models/
  4. repositories/
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

List out 4 folders can be in the domain folder

A
  1. entities/ # LogEntity (Pure Class)
  2. failures/ # LogFailures (error classes)
  3. repositories/ # LogRepository (Interface)
  4. usecases/
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

List out 4 folders can be in the presentation folder

A
  1. dialogs/
  2. providers/
  3. screens/
  4. widgets/
How well did you know this?
1
Not at all
2
3
4
5
Perfectly