4 ms·
> Due to its single-threaded nature, Node.js was never a good choice for compute-heavy workloads, though, and now that capable nonblocking frameworks also exist
by zaro 6y ago
> Due to its single-threaded nature, Node.js was never a good choice for compute-heavy workloads, though, and now that capable nonblocking frameworks also exist on other platforms — some with elegant, modern APIs — performance is no longer a reason to choose Node.js.
But do these other frameworks give you the simplicity of sharing code and using the same language in for fe and be ?
For me the performance of Node BE applications is just a nice bonus, for having consistent development environment with huge library of radily available packages.
- Kuinox 6y agoA lot of langage have work in progress and or working GUI framework compiling to webassembly. So yes. And you know what ? You shouldn't share too much code between backend and frontend. The packages are node disavantage. You depends on too much packages it's a security risk.
- zaro 6y ago> And you know what ? You shouldn't share too much code between backend and frontend. Yeah right :) I'll tell you what I like about it. I defined my database models in Typescript[1], work with them in the backend, send them to the frontend, and deserialize them back to the same Typescipt model classes in the browser and continue working with them ( w/o the actual database part) as data structures. Are you trying to convince me this is bad ? Because I definitely don't believe you :) [1] https://typeorm.io/ https://typeorm.io/
- Kuinox 6y agoThat exactly what you shouldn't do, database models should not be the same models than the one sent to the client.
- zumachase 6y agoAny examples? Given that WASM can't manipulate the DOM, I'm suspicious of this claim.
- Kuinox 6y agoThere is blazor that does this in C#.