Skip to content
0:00 / 0:00

#reprpattern#asp.netcore#minimalapis

REPR (Request-Endpoint-Response) Pattern Will Make Your APIs Clean

Milan Jovanović

169K subscribers • 11 videos on Hallway

YouTube
  • Recommended by 2 people: 2 in engineering communities.
  • Presented by Milan Jovanović, Microsoft MVP
  • An opinion. It argues one side of a question engineers disagree on.

Intermediate. Assumes working knowledge.

34K views2 years ago2 recommendations

Software designWeb developmentSoftware architectureAPI designDesign patterns

Milan Jovanović explains the Request-Endpoint-Response pattern and demonstrates how to implement it using FastEndpoints and Controllers.

☄️ Master the Modular Monolith Architecture: bit.ly/3SXlzSt 📌 Accelerate your Clean Architecture skills: bit.ly/3PupkOJ 🚀 Support me on Patreon to access the source code: patreon.com/milanjovanovic Layered architectures, such as Clean architecture, organize the solution across layers. This results in a folder structure grouped by technical concerns. Vertical slice architecture, on the other hand, organizes the code around features or use cases. An exciting approach to structuring APIs around features is using the REPR pattern. It stands for Request-EndPoint-Response. This aligns perfectly with the idea of vertical slices. You can achieve this with the MediatR library, for example. I will show you how to implement the REPR pattern with Controllers, Api.Endpoints, and FastEndpoints. Check out my courses: bit.ly/3PupkOJ CQRS Pattern With MediatR milanjovanovic.tech/blog/cqrs-pattern-with-mediatr Vertical Slice Architecture milanjovanovic.tech/blog/vertical-slice-architecture Join my weekly .NET newsletter: milanjovanovic.tech Read my Blog here: milanjovanovic.tech/blog Chapters What is the REPR pattern? REPR pattern using Controllers REPR pattern using Ardalis.ApiEndpoints Remark: Fluent generics in C# REPR pattern using FastEndpoints

Why it's here

2 people recommend this

What people say. Recommended as a clear explanation of the REPR pattern for organizing minimal APIs in .NET.

Moments people linked to

u/brendan2alexanderin r/dotnet • Recommends

On “Should I learn ASP.NET MVC first?”

Regarding minimal APIS, I would recommend you check out the REPR (Request-Endpoint-Response) pattern. It is helpfully explained on this youtube video: [video I have gone "all in" on this approach. Lightining fast and more orgnized. Check it out.
2View on Reddit

u/Quito246in r/dotnet • Recommends

On “As a newcomer, is minimal API worth learning first?”

Sure thing. REPR (Request-Endpoint-Response) - basically you can create endpoint for each action e.g. endpoint for creating order nicely in separate file. Milan has a nice video link to this video SRP - let´s say I have orders controller then controller as an object has multiple responsibilities creating orders, updating, deletion, getting of orders. Basically one object is doing too much things. Compared to REPR where each resource action has own handler this also means that OCP is not violated.