Sunday 12 February 2017

Can/should the schemas in Node ORMs like Waterline work as your "domain classes"?

Hi,Sorry if this question is a bit vague. My background in mainly in Java. I'm trying to learn Javascript/Node; right now I'm looking at ORMs like Mongoose and Waterline.In the Java world, it is common to define your "domain objects" and derive your persistence mechanism from them, with the help of annotations. Studying Node ORMs like Waterline and Mongoose, I see that you can define schemas with rich validation logic, middleware, etc, to the point that I can see myself putting business logic in them.Is this a common practice in the Node world? Or do people still prefer keeping their domain objects separate from the ORM itself?

Submitted February 12, 2017 at 09:34AM by Faucelme

No comments:

Post a Comment