Architecting ASP.NET Core Applications: Best Practices Flashcards

1
Q

What is dependency inversion in soliD design principles?

A

Means that objects depends on interfaces instead of real implementations.

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

What is the two main benefits of dependency inversion?

A

loosely-coupled applications and testable software.

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

What is separation of concerns in Solid design principles?

A

Means separating software in different sections or modules which each one addresses a specific concern.

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

What is the term “concern” in software architecture?

A

is a larger computational problem that can’t be solved by a single class.

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

What is the DRY software dev principle?

A

don’t repeat yourself… meaning less code repetition.

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

How is persistence ignorance is achieved?

A

Via POCOs - domain classes shouldn’t be impacted by how they’re persisted.

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

What is the all-in-one architecture? What is an example of that?

A

All files, controllers, views (and everything else) are in the same (large) project. A MVC project.

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

Can an all-in-one project be difficult to maintain?

A

Yes, can get very difficult since it is too easy to tight couple stuff.

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

What are the 4 benefits of layered architecture?

A

1 - Is split according to concerns (modules);
2 - Promote reuse
3 - Easier to maintain
4 - Is pluggable.

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

What are the 3 layers of a typical layered architecture?

A

Presentation, Business logic and data access layers.

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

What is the 2 main disadvantages of layered architecture ?

A

Still coupling between layers and behaves as a single application.

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

What is clean architecture (architecture style)? Was it created in 2012?

A

Is a variation of hexagonal and onion architectures styles. yes

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

What is clean architecture based on?

A

In design principles (including SOLID)

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

What is the 2 main benefit of clean architecture?

A

create maintainable and testable applications.

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

What are the 3 circular layers of clean architecture?

A

Interface Entities, application core, Infrastructure/Presentation

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

Which kind of code goes to the core project?

A

Entities, Interfaces (implemented later on in the Core and in the Infrastructure, Services and Exceptions).

17
Q

What is ultimately not permitted in the core project?

A

ef core or any presentation dependency (aka installed packages)

18
Q

Which kind of code goes to the infrastructure project?

A

Data access (ef core), logging, identity (auth), file access

19
Q

Which kind of code goes to the UI project? Can API go here?

A

MVC, Razor, middleware, filters. Yes, API also goes here.

20
Q

What are the main 3 benefits of clean architecture?

A

Independent UI, no knowledge of used DB, testable and maintainable.