Live data from Hacker News

Do we need a web API?

liaison.dev

101–107 of 107 posts

Re: Do we need a web API?

#102
post #83

RPC - this isn't anything new. When I started doing web development in the late 90s for about ~5 years I was the designer, front-end, and backend developer all in one. Then over time things changed to allow for specializations and we now have many different functions, and that's a good thing. RPC has a place, and it's not for web apps, at least most of the time. I've noticed over the years that JavaScript developers…

For now, Liaison is JS-focused. So both the frontend and the backend have to be implemented in JS. But the communication protocol ( https://deepr.io ) in between is language agnostic. So it is possible to imagine Liaison being ported to different languages in the future.

I've been thinking about language agnostic RPC as well. That would be so neat!

gRPC can already do that but gRPC's design is unnecessary bloated. The nice thing about RPC is its potential of zero-config setup. gRPC totally fails on that and it's painful to setup gRPC.

The RoR/python server could be used to automatically serve the RPC API. For a zero-config setup.

Re: Do we need a web API?

#103
post #97
post #84

Earlier quoted context omitted.

As someone coming from web dev to back-end JS I take with me the love for instant feedback, which allows for extensive manual testing during development. And I also use automatic regression tests before pushing to prod. Node.js is infamously known to use small modules, it however gives you battle tested code run by thousand in production. I usually take a front-end first aproach, but there are also lots of people tak…

Is there anything you said that is specific to JS? > the love for instant feedback What languages can you not get this with? > And I also use automatic regression tests before pushing to prod. That's 100% language agnostic... > Node.js is infamously known to use small modules, it however gives you battle tested code run by thousand in production Many other languages have extensive packages pulled in, but that says no…

In the past when people have asked me questions like those they usually knew the answers. So may I ask, Why you are asking?

Re: Do we need a web API?

#105
post #90
post #88

Earlier quoted context omitted.

I'd still say the established routine of publishing a public API and any shared code can go into NPM or whatever is the better approach. Liaison and tools like it essentially create a monolith exactly where something is screaming to be two separate services. You want to be able to deploy versions of server side and client side code independently. You want to be able to ensure you don't break clients that have web pag…

About API versioning, the problem is the same as any web API. It's possible to add backward-compatible changes, otherwise, you need to fork the backend into a new endpoint. About interoperability with non-JS environments, I wrote an article about that: https://liaison.dev/blog/articles/How-about-interoperability...

I don't mean to knock it. It's a cool project and obvious you've done some good work on it. But, I wouldn't expect it to lead anywhere beyond a couple sample POC apps. It's been tried before and never quite seems to work out (I did something similar with VB6 forms way back when. It didn't work out. Meteor.js is one that probably came the closest to real-world success. It didn't work out.). There was a bit more interest in this approach back when SPAs were just coming onto the scene, but in the time since, the programming community seems to have converged around the idea of well-defined boundaries and interfaces, allowing use of the best tool for the job in each individual service, and abstracting out the distributed communication layer with a metaprogramming tunneling approach has somewhat fallen out of favor.

If your goal is just a brain workout then by all means keep going with it. But if you're looking to do something that gets some larger adoption, then I'd probably wrap this up and move on to the next thing.

(Not that you asked my advice, or that I'm in any way qualified to give it)

Re: Do we need a web API?

#107
post #103
post #97

Earlier quoted context omitted.

Is there anything you said that is specific to JS? > the love for instant feedback What languages can you not get this with? > And I also use automatic regression tests before pushing to prod. That's 100% language agnostic... > Node.js is infamously known to use small modules, it however gives you battle tested code run by thousand in production Many other languages have extensive packages pulled in, but that says no…

In the past when people have asked me questions like those they usually knew the answers. So may I ask, Why you are asking?

He's calling you out on the wild claims in your post that are not particularly nuanced or unbiased.

You shouldn't try to pull a fast one on HN readers, it won't work most of the time.

Post reply on HN