The Request-EndPoint-Response (REPR) pattern
The Request-EndPoint-Response (REPR) pattern offers a simple approach, similar to what we explored in Vertical Slice Architecture, which deviates from the traditional Model-View-Controller (MVC) pattern.
As we explored in the MVC chapter, REST APIs don’t have views, so we have to distort the MVC concept to make it work. REPR is more appropriate than MVC to build REST APIs in the context of HTTP, since each URL is a way to describe how to reach an endpoint (execute an operation), not a controller.
So, with REPR, a request hits an endpoint, which fulfills the request, and then the endpoint responds to the client with the result of that operation, forming a symbiotic relationship between the request, endpoint, and response: REPR.
Simple, elegant, yet very powerful.
Goal
REPR aims to align our REST APIs to HTTP and treat the inherent request-response concept behind the web as a first-class citizen in our application...