Wednesday 23 October 2019

What techonolgies/ORMs do you use for production/enterprise any why?

The title should say "and", not "any".I want to be able to build production-grade applications that have a clear separation between a domain model and a database entity. That is, I should be able to migrate ORMs, databases, etc., without having to touch domain logic. Thus, I want to utilize the Data Mapper pattern, not Active Record, as well as Repositories.TypeORM seems to sprinkle RBMS specific decorators across your entities, meaning you can't easily separate a domain model/entity from a database model/entity. I could build my own Repository around Mongoose, but then schema is being duplicated and validation logic has to be synced across the schema and any other models.These are my current issues, and maybe a basic query builder like Knex is a better option, but I'm sure that production-grade applications must be able to leverage MongoDB and still have a clear separation of concerns as well.So, what methods have used to get around the problems I'm facing? What are your preferred database systems and ORMs (if any) in production? How do you ensure a clear separation between the domain layer and persistence layer, etc., for your production applications?I'm working in TypeScript, personally, which is probably a better option for this kind of work anyway.Thank you.

Submitted October 23, 2019 at 06:20PM by JamieCorkhill

No comments:

Post a Comment