|
|
|
|
|
by Tainnor
911 days ago
|
|
> the reality is that 99% of work is basic CRUD making with sprinkle of business logic/validation People always say this and it doesn't match my experience at all. I must be left to conclude that different people live in very different realities. |
|
For instance, in ASP.NET, without trying it out tell me what is the exact HTTP response if I have a route registered like GET /foo/bar and someone makes a HTTP POST /foo/bar/ ???
Will it be a 404, a method not allowed? How is the trailing slash dealt with? Does it count as a different route a to the HTTP spec or does ASP.NET trim it when routing? Will the response be in text/html, text/plain or maybe application/json? I bet 99.999% of .NET devs can’t answer this without trying it out and might actually find out that their own APIs don’t quite react to how they would like to if they could choose. So that’s a framework issue, because you have business logic running there giving your end users a response which you don’t even know about or understand. So now you need to alter this to be consistent with the rest of your API and now you go off the beaten path, configuring some toggles and functions in some layers just to deal with a simple error case. Of course, if you’re a mediocre developer who doesn’t take pride and just goes with whatever the framework does out of the box (hint, it won’t be nice because that default behaviour has to be so generic that it works for websites and rest apis use cases equally ok enough) then sure a framework is the right tool for you, but everyone else is probably better off just using a library approach which gives them 100% control in an obvious and consistent way.