Member-only story
REST API BEST PRACTICES #5
Why Smart Engineers Build Dumb APIs (And Why It’s a Good Thing)
Over-Engineering kills your APIs
Early in my career, I thought I was smart.
I wanted to build APIs that never break. I tried to make them future-proof.
I thought,
“If I plan for every future change now, I won’t need to update my API later.”
I was wrong ❌❌❌❌❌❌❌❌❌
If you are not a medium member, Read it here.
Dear Folks, Your 50 claps 👏👏 help the discussion reach more developers 👀 on Medium, and your comments 💬 make me keep writing. Don’t forget to check out the responses💬 from other developers.
Future-Proofing Sounds Smart, But It’s a Trap
Think today, we need to save a user’s phone. A simple API UserDto would look like this:
public class UserDTO {
private String phone;
}
✅ Works today.
✅ Easy to understand.
✅ No confusion.
Ohh Nope, Let me rethink.
But I thought,
“What if users can have multiple phones in the future?”