DEV Community

Discussion on: I'm tired of building APIs

Collapse
mhd profile image
Michael Dingler

I feel your pain. I remember when it wasn't even about writing APIs, but web sites. When it was mostly about delivering content and users weren't that spoiled by better web apps - you never had a chance of being as good as a native desktop app, so basic form handling and tabular output was often enough for a surprising amount of applications.

Then we were working together, across applications, platforms and companies, and APIs became more plentiful. But we had the Great Thesis of REST to guide us, at least. And then pretty much as you said...

But I'd like to point to one sentence in the beginning "we're shifting to microservices and JWT". Well, most of the time the we is the programmers, not even the customers, and often not even the security auditors (you can mess up JWT/oathkeeper/etc. worse than basic HTTP auth).

We don't have to say yes to every shine paradigm and piece of code. I think that's where a large part of my personal dissatisfaction comes from - I feel like I'm failing to build this gleaming city on the hill, but know that this isn't even needed.

Collapse
tillsanders profile image
Till Sanders Author

Oh, one more thought about the days where web development was more about websites than APIs: many projects need an API these days, but there are some that could very well be built using this modern monolith approach of Insertia or Laravel LiveWire. For example, I'm thinking about starting a small SaaS project that wouldn't need an API because it would really just be a web app. Will definitely give these approaches a try.

Collapse
tillsanders profile image
Till Sanders Author

I know exactly what you mean! I'm expanding the concept of a FOSS project I'm working on and I thought I would use the opportunity to learn something new. So although I knew it wasn't strictly necessary for the project, I started out building an API with both MongoDB and GraphQL, based in Nest.js, for the first time. And while I got to the point where I had a proof-of-concept, in the end, I threw it away. And I returned to the "classic" PHP (Laravel) + MySQL stack because the benefits (while amazing) didn't outweigh the added complexity. You could say I returned to an inferior solution to keep the project manageable in my free time. I would like to think that not adopting new technologies early on is a sign of programming maturity ;)