3 ms·
Isn't this what, for example, Django models are? Or even js simpleschema?
by foobarbecue 8y ago
Isn't this what, for example, Django models are? Or even js simpleschema?
- thecatspaw 8y agoBasically every ORM does it. Django models, hibernate (java) as well for just 2 examples.
- chatmasta 8y agoDjango models only work insofar as all clients are interacting with the database through django. If even one other path to the database exists, the django models become unreliable as a source of truth. With the profliferation of microservices written in different languages, it would be nice to have a cross-language, shared-service solution as simple as django models. Something like protobufs or JSON might work well, but ultimately you still need to write a messaging and persistence layer for them, so it's not as simple as just writing a few model files.
- smt88 8y agoAs far as I know, those only check at runtime (or when generating code), not at compile time.
- foobarbecue 8y agoWhat you mean by compile time, when we're talking Django and nodejs?
- smt88 8y agoYeah, that's part of my point. JS and Python can't even do what we're talking about here.