DEV Community

Discussion on: Good Bye Web APIs

 
sleeplessbyte profile image
Derk-Jan Karrenbeld

Let's be real. In practice, how many apps have multiple API versions? My guess is that 95% of the apps have only one API version that serves browsers, mobile, etc.

API versioning is a pain in the ass to implement and maintain so we usually go with a single API that supports backward-compatible changes.

We write applications for millions of daily users, with clients that can be as old as 2 years (updating them is not in our control). Maintenance of up to 5 versions of the representations of the resources of our endpoints is trivial, because we barely ever have to touch old versions. They just keep working.

I think that the reason so many APIs only have 1 version is because versioning is hard, not because they shouldn't / don't want to have them. So yes, I agree with you that many APIs only have one version, but that's probably more a consequence of tooling not allowing for it, such as this, than that people shouldn't have it.

Having backwards compatible APIs (for example by only adding fields, and never removing/changing fields, which is definitely good practice) doesn't mean you shouldn't/won't have versioning.

  • Stripe has versioning (and mostly backwards compatible changes)
  • Facebook has versioning (and mostly backwards compatible changes)
  • GitHub has versioning (and mostly backwards compatible changes)
  • Twitter has versioning (and mostly backwards compatible changes)

That said, the statement that traditional APIs are no different than Layr-enabled APIs is just false. It just doesn't hold up. I don't know why you're stating anecdotal experience or opinion as fact.

Layr is made to build web apps, not websites, so HTTP Caching is not an essential feature. It might be supported in the future, but it is not on the priority list.

Dismissing HTTP Caching because you think web apps don't need it / don't primarily benefit from it means we can't discuss this.

The author of the library (me) has more than 25 years of experience building full-stack applications.

Then your post and this library seems more out-of-place than I thought before.

Thread Thread
 
mvila profile image
Manuel Vila • Edited

I think the misunderstanding comes from the fact that we are not building the same kind of applications.

I cannot speak about building an application for millions of users. I've never done that. I build small-to-medium applications and I designed Layr for this use case.

So Layr is probably not good for Stripe, Facebook, Twitter, etc. But I believe it is great for the vast majority of developers that don't work on large-scale applications.

Thanks for pointing that out. I edited the "What's the catch?" section to make it clear that Layr is not made for large-scale applications.

Thread Thread
 
sleeplessbyte profile image
Derk-Jan Karrenbeld

It would be helpful if experienced people stopped making statements that are opinions as if they're fact. This only spreads misinformation and less experienced people are going to take it at face value and run with it.

Good luck with the endeavour.