-
Book Overview & Buying
-
Table Of Contents
Get Your Hands Dirty on Clean Architecture
By :
What does a web adapter actually do? Let's say we want to provide a REST API for our BuckPal application. Where do the responsibilities of the web adapter start and where do they end?
A web adapter usually does these things:
First of all, a web adapter must listen to HTTP requests that match certain criteria, such as a certain URL path, HTTP method, or content type. The parameters and the content of a matching HTTP request must then be deserialized into objects we can work with.
Commonly, a web adapter then does an authentication and authorization check and returns an error if it fails.
The state of the incoming objects can then be validated. But haven't we already discussed input validation as a responsibility...
Change the font size
Change margin width
Change background colour