-
Book Overview & Buying
-
Table Of Contents
Clean Architecture with .NET
By :
In this chapter, we moved from infrastructure and application concerns into the Presentation layer, building a secure, testable user interface on top of our existing use cases. We implemented core pages such as the Product Catalog, Shopping Cart, Checkout, and Order Confirmation, using Razor components and custom UI elements to translate application behavior into a cohesive user experience. Along the way, we reinforced key architectural boundaries—introducing ViewModels where appropriate, modeling shared UI state explicitly, and keeping presentation concerns from leaking into the Domain and Application layers.
We strengthened the UI by applying role-based authorization policies and custom authorization handlers, ensuring that access control is enforced consistently within the Presentation layer. Rather than treating security as an afterthought, we integrated it directly into the structure of our components and pages.
We also introduced testing at the UI boundary. Using...