3 ms·
What would having symmetrical code accomplish?
by jimbob45 7y ago
What would having symmetrical code accomplish?
- amelius 7y agoYou could speculatively run stuff on the client and run it on the server, to achieve a speedup. But there are many more usecases. For example, decoding and encoding of messages between client and server. Hashing stuff. The list is endless. I think that once you have experienced programming in the same language on client and server, you simply don't want to go back to the "split brain" kind of programming.
- traes 7y agoI think they are referring to running the same applications on client and server, not just the same language.
- realharo 7y ago>decoding and encoding of messages between client and server You can generate the message types and communication functions from a shared schema, e.g. gRPC/GraphQL/Swagger and many others, which will also lead to looser coupling and hopefully proper API version/change management. I feel like unless you're using JavaScript/TypeScript on the server, most of the benefits of a shared language and framework will be negated by the lack of easy access to the web frontend ecosystem. (This may not be true for isolated shared modules that are oblivious to the UI, e.g. validation logic, where the surface area between it and the rest of the client code is maybe one or two functions.)
- api 7y agoSignificant reduction in cognitive load for maintaining an application.