Blog
Mert Özen's blog posts on software development, backend, frontend, and DevOps.
What Is Vertical Slice Architecture? Organizing Code by Feature, Not by Layer
Vertical Slice Architecture slices code by what each request needs end to end rather than by technical layer, so coupling drops between slices and rises inside them. With real git output we watch the same two features conflict in five files in a layered Bookstore and in one file in a sliced one, then look at a slice's anatomy and three common misreadings.
Your First Slice Without MediatR: Minimal API, a Handler Class, and Endpoint Registration
A slice without MediatR is built from request and response records, a handler class that uses DbContext directly, and an IEndpoint that maps its own route, with an assembly scan doing the registration. We write Bookstore's PlaceOrder and GetOrderDetails slices with .NET 10 AddValidation, TypedResults, and EF Core projections, and show how a naming convention can take down every endpoint and how to catch that at startup.
Sharing Across Slices: Duplication or Abstraction, and Where Does Domain Logic Go?
Across slices you share the domain model, cross-cutting concerns, and infrastructure; you don't share request/response types, queries, or workflows, and invariants move into the entity without waiting for a second copy. With real output we see a rule placed on a request allow a 7-copy order and a slice calling another slice save an order whose payment was declined, then prevent that with an ArchUnitNET slice test.