4 ms·
> Yeah. This is the problem: we've abandoned the hypermedia architecture of the web for a dumb-data, RPC model. I'm not sure that's the issue at all. The arti
by rualca 5y ago
> Yeah. This is the problem: we've abandoned the hypermedia architecture of the web for a dumb-data, RPC model.
I'm not sure that's the issue at all.
The article complains about boilerplate code used to convert results to JSON. To me those complains make absolutely no sense at all, because that boilerplate is used for two things: validate data, and ensure that an interface adheres to it's contract.
It makes absolutely no sense at allto just dump JSON from the outside world into a db without validating or mapping. And vice-versa. That's what the so called boilerplate does.
What's more astonishing is that nowadays the so called boilerplate is pretty close to zero, thanks to the popularity of mapping and validation frameworks. Take .NET Core for example, and modules like AutoMapper and FluentValidation. They map and project and validate all the DTOs with barely any noticeable code. Why is this a problem?