Do we need a web API?
101–107 of 107 posts
Re: Do we need a web API?
#102RPC - 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.
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?
#103Earlier 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…
Re: Do we need a web API?
#104Re: Do we need a web API?
#105Earlier 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...
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?
#106Postgraphile is an example of reducing the number of layers: directly expose PostgreSQL schema (with row-level security) via GraphQL.
Re: Do we need a web API?
#107Earlier 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?
You shouldn't try to pull a fast one on HN readers, it won't work most of the time.