4 ms·
> 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
by 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.