4 ms·
Nice! I believe this is a really good approach for making web apps. Best part is probably that you save time by not having to implement some sort of JSON API fo
by quechimba 3y ago
Nice! I believe this is a really good approach for making web apps. Best part is probably that you save time by not having to implement some sort of JSON API for your frontend to communicate with your backend.
I've been working on a similar thing in Ruby. https://github.com/mayu-live/framework https://github.com/mayu-live/framework
- revskill 3y agoNowdays, with automatic api generation for your API, there's no difference in backend/frontend communication in type-safe way.
- taeric 3y agoCurious what automatic generation you have in mind?
- deleted 3y ago[deleted]
- revskill 3y agoSay you have a function in the backend, for example in typescript: function handler(a: A, b: B) {} With a suitable tooling, you can generate the type for frontend to call handler(a, b) in a type-safe way, which could be validated on the backend and frontend. So you're just a "generation" step away from bluring BE/FE communication.
- taeric 3y agoApologies, I know what generation is. But the ABI that is the wire between the front and the back is notorious for not being stable. Such that I was asking if you have experience with a generation stack that is favorable. Most folks I know do not have favorable experience in this realm. Best I know of, are those that drop down to something like protobuff to describe the messages.