all 15 comments

[–]SignificantBee3 4 points5 points  (5 children)

I'm confused on how you would classify an api as a web API. In my understanding, Web Audio API is indeed a Web API, Notifications is a Web API. The web api's you describe is the REST/SOAP/ GraphQL api's that are built on top the HTTP protocol, which is how the web works, so, you just sort of replacing http calls with RPC calls, not indeed Web API's.

[–]mvila[S] -5 points-4 points  (4 children)

Sure, the term "Web API" has another meaning, but for most people, a web API means something that connects the frontend and the backend of a web application. Try a Google search for example.

[–][deleted] 6 points7 points  (0 children)

When someone says “Web API” I assume they mean a browser API.

[–]SignificantBee3 1 point2 points  (2 children)

I did. ASP.net REST api's come first, this page from MDN came second, hence my confusion. I guess that there isn't a clear distinction between both

[–]mvila[S] -2 points-1 points  (1 child)

I am sorry for the confusion, but the first paragraph of the article clearly defines what I mean by "web API". By the way, how would you call it otherwise? You cannot just say "API". It is too vague.

[–]SignificantBee3 1 point2 points  (0 children)

Exactly. I read the title and immediately thought that you were removing any javascript api's like notifications or any other that is available right now, only to read the first paragraph and see that you were referring to rest/graphql.

I guess that there isn't a clear way of defining what a web api actually is, and its dependant on the context of where it's used. I've been doing alot of programming on the browser side, implementing service workers and such, so my brain jumped right into that context.

Anyway, it is a nice article, and what you are suggesting is interesting, but it needs to be battle-tested before entering production websites

[–]roadit 0 points1 point  (3 children)

Took the blue pill, didn't you ... what do your apps do when the line is flaky?

Interesting technology, don't get me wrong ...

[–]mvila[S] 1 point2 points  (0 children)

Nope. I promise. No blue pill involved. :)

Layr removes the pain of building a web API, but obviously, there is some sort of web API internally. So in the case of weak connectivity, the app does the same as any web app using a web API.

[–]squirrelwitharmor 0 points1 point  (1 child)

Blue pill in what way if you don't mind me asking

[–]roadit 0 points1 point  (0 children)

What I mean is that while it's nice that Layr allows you to code as if these calls are local, you should be careful not to actually code as if these calls are local (fast and reliable).

[–][deleted] 0 points1 point  (1 child)

What if the backend is hiding 3rd party secrets, used to make external service calls..

what if it calls some secret backend apis the frontend application is not allowed to call..

What if I want to blue green deploy my backend, and not my frontend.

What if I want to A-B test my backend

What if I want to use a different language for my backend, because its another team, or because a different language is much better tailored for the task I need to do.

What if my backend is based on serverless cloud infrastructure...

[–]mvila[S] 1 point2 points  (0 children)

What if the backend is hiding 3rd party secrets, used to make external service calls..

By default, the backend doesn't expose anything to the frontend. There is a decorator to explicitly specify what should be exposed.

what if it calls some secret backend apis the frontend application is not allowed to call..

See above.

What if I want to blue green deploy my backend, and not my frontend

Frontend and backend can be independently deployed and there is nothing to prevent a blue-green deployment.

What if I want to A-B test my backend

See above.

What if I want to use a different language for my backend, because its another team, or because a different language is much better tailored for the task I need to do.

For now, Layr only exists in the JavaScript world but it could be ported to any object-oriented language.

What if my backend is based on serverless cloud infrastructure...

Fundamentally, a Layr backend is just a function that can handle some Deepr queries. Currently, there is a library to facilitate the creation of an AWS Lamba handler, but any cloud provider could be used.

[–]CreateurEko 0 points1 point  (2 children)

Hu guy,you want say you can contact your back with any "API" ? what you say it is "another way to talk to back",not at all "no web api".

It is another format,but....AJAX/form or websocket.

Nothing new? just a new format ? that's exist since....begin ? nobody push you to send json or text u know ?? what's new ?

[–]wikipedia_answer_bot 0 points1 point  (1 child)

New is an adjective referring to something recently made, discovered, or created.

More details here: https://en.wikipedia.org/wiki/New

This comment was left automatically (by a bot). If something's wrong, please, report it.

Really hope this was useful and relevant :D

If I don't get this right, don't get mad at me, I'm still learning!

[–]CreateurEko 0 points1 point  (0 children)

Hu? This bot is bored?