DEV Community


Discussion on: Good Bye Web APIs

mvila profile image
Manuel Vila Author

As long as they are implemented in JavaScript (single-page application, React Native, Electron, etc.), you can have multiple frontends connected to one (or several) backends.

If your frontend cannot be implemented in JavaScript, it can speak to the backend by sending Deepr queries with simple HTTP POSTs.

Finally, if you need a REST or GraphQL API to expose your application to external developers in a more standard way, it is possible to add it to the backend while keeping the "API-less" approach for all your internal needs.

jfbrennan profile image
Jordan Brennan

Well of course you can do that (you can do anything), but should you? Should I decouple existing front-ends from ubiquitous standards-based API designs and couple them to a proprietary JavaScript-only library effectively maintaining two systems instead of one? If the answer is yes, and it may be, the article needs to tell a compelling story. Other than for one monolithic web app, Layr is implicitly asking for a huge commitment. Help your readers understand why such a commitment is worth it, and Layr just might take off๐Ÿ˜ƒ

Thread Thread
mvila profile image
Manuel Vila Author • Edited

Layr removes the pain of building a web API but this doesn't mean that the frontend is magically connected to the backend. Under the hood, there is a web API using the Deepr specification.

So if you want to implement a frontend in another language than JavaScript, you can send Deepr requests with an HTTP POST. The same applies to the backend, you can build an HTTP server that receives Deepr requests.

Also, Layr starts in the JavaScript world but it can be ported to any object-oriented language. So, it is possible to dream of a future where we have Layr for Ruby, Python, PHP, Swift, Kotlin, etc. ๐Ÿ˜‡