by solatic · 3y ago · 0 comments
What do you get when you throw out the API layer? Easier refactoring (no wondering who all the consumers of GET /users are). No implicit contract with users who have reverse-engineered your API (and complain if you break it). Easier security (who needs API tokens?). No organizational footgun that leads to a frontend/backend team split and then requires a group manager to get new features shipped, because of course your API doesn't actually expose feature-specific data for features that Product hasn't dreamed up yet.
Sure, if you're FAANG scale, it'll be easier to work with APIs. You'll have some Staff+ Engineer architecting everything and coordinating between Product and a half-dozen teams that'll take months if not years to ship, and everyone will be happy with that. Strong fences make good neighbors, and contracts keep teams independent of each other. But in the early days? Feel free to ship things that don't scale.
Strive to find that inherent, irreducible complexity and solve at that level. Resist the urge to say “for just 20% more effort…”
I want to get a YAGNI tattoo.
Your comment reads as if someone complains people don't actually need cars because they can just show up somewhere.
I have depth of experience in a niche industry and I'm working to build solutions for that industry, but I'm still early on the learning curve of being an effective full stack developer to make those solutions.
Unless your API calls are properly abstracted into function calls. No reason you can't just have a `getUsers()` function on the frontend, and then use your favorite “find all references” tool from there.