3 ms·
I definitely am in the same camp on the "sharing code" argument, but could see careful structuring make models sort-of work. Obviously the basic persistence beh
by awj 15y ago
I definitely am in the same camp on the "sharing code" argument, but could see careful structuring make models sort-of work. Obviously the basic persistence behavior needs to change, but if you reduce validation and some of the business logic to something more composable/interchangeable you could share it between the two.
Obviously then you'd need some way of distinguishing validation that is only important to one of the two ends from that which is meaningful to both, but I can see it being possible.
That said, I'm still not convinced it's worth it. Especially when you look at the state of libraries in node compared to something like Python/Ruby.