Font size
WorksheetsArchitecture
Total questions: 13
Worksheet time: 9mins
Layered Architecture requires
(select one)
Groups of classes that call one another in the same direction (without cycles)
Packaging layers in separate modules
Having 3 layers
(eg Controller, Service, Repository)
Equal distribution of complexity between layers
Each layer to have its own data structures
These are valid examples of layers
(select one)
order, shipment, customer
controller, service, repository
offers, corporate offers, batch runner
Relaxed Layer Architecture ...
(select one)
Allows a layer to call back into the caller layer
Allows defining more than 3 layers
Allows to skip layers,
if calling in the same direction
Allows a layer to use the data structures of another layer
An Application Service (Facade Design Pattern):
(select ⚠️three)
Orchestrates a flow
(eg. a use-case)
Is decoupled from other components
Should be stripped of heavy logic
Allows orchestrated components to be less coupled to each other
Clean Architecture goals
(select ⚠️two)
Keep Domain logic agnostic to DB, UI, and External APIs
Simplify unit-testing of Domain Logic
Use fewer interfaces
Align Domain Model
with API model (DTO)
Responsibilities of an Adapter
(select ⚠️two)
Orchestrate a Use Case
Implement Business Logic
Call an unfriendly API
Convert data Domain <=> DTO of External API
A Value Object should ...
(select ⚠️two)
Be Immutable
Be typically small
Have persistent identity (eg PK)
NOT contain logic
Have a single field
In the classic Hexagonal Architecture (aka Ports-and-Adapters), the Use Cases...
(select one)
are accessed via secondary(output) ports
are isolated from Entities via Adapters
access the outside APIs via secondary(output) ports
talk to the database directly
In the classic Onion Architecture, the following dependency is NOT allowed:
(select one)
Application → Infra
Infra → Domain
Persistence → Domain
Application → Domain
In an Onion Architecture, a use-case optimized query (eg. a search):
(select one)
Must always go through the Domain
Allows changing data directly in the DB
Requires a dedicated Read DB updated via events
Selects the minimum necessary data from DB for performance reasons
Vertical Slice Architecture means ...
(select one)
Grouping code by UseCase, not by Layer
Developing software driven by .feature files
Separating code in Modules, by functional area
Writing the entire implementation of a feature in a single file (eg. *UseCase)
What does the term "cohesion" refer to in software engineering ?
The degree to which a module or component focuses on performing a single, well-defined task
The process of combining multiple software components into a single program.
The practice of ensuring that code is easy to understand by using proper indentation and naming conventions.
The measure of how closely a software system matches its requirements
What does the term "coupling" refer to?
The practice of grouping related functions or methods within a single class or module
The process of connecting external devices to a computer system
The degree to which a component is independent of other components
The measure of how well a software system handles errors and exceptions
