What is the difference between middleware and filters?
Middleware operates in the HTTP pipeline and can apply to all requests. MVC filters run inside the MVC action-invocation pipeline and have access to action
The question library
Explore practical questions, clear explanations, and code examples across developer technologies.
Showing 1105–1116 of 3610 questions
Middleware operates in the HTTP pipeline and can apply to all requests. MVC filters run inside the MVC action-invocation pipeline and have access to action
Object mappers reduce repetitive property-copying code, but mapping rules can hide behavior if overused. Explicit mapping is often clearer for small or sec
A request enters the web server, passes through middleware, routing, authentication/authorization and endpoint execution, then the response unwinds through
Clean Architecture keeps domain rules independent of infrastructure frameworks. Application use cases coordinate domain behavior; infrastructure implements
CQRS separates operations that change state (commands) from operations that read state (queries). It can clarify models and scale needs but adds complexity
A mediator dispatches a request to a handler, reducing direct coupling between callers and handlers. It can organize use cases, but pipeline behaviors and
DDD models complex business domains using a shared language, entities, value objects, aggregates, repositories, and domain services. It is most valuable wh
An aggregate root is the entry point for changing an aggregate and protects its invariants. External code should not arbitrarily modify internal entities i
Event sourcing stores a sequence of domain events as the primary record and derives current state by replaying them. It supports audit/history but complica
The outbox writes the business change and an outgoing message record in the same database transaction. A background publisher later sends messages and mark
Accept an idempotency key, associate it with the caller and request, persist the result or operation state atomically, and return the same outcome for dupl
Use a database constraint and atomic conditional update, or optimistic/pessimistic concurrency according to requirements. Do not read stock and later write