3 ms·
> In any sufficiently complex application, something like a query builder that allows different parts of the application to work together to lazily compose quer
by lll-o-lll 3y ago
> In any sufficiently complex application, something like a query builder that allows different parts of the application to work together to lazily compose queries (vs combining/filtering/sorting the data in memory) will be created at some point.
Right, but is an ORM a good way to achieve this? I would posit no. The problem, correct me if I’m wrong, is one of an in memory representation of working data and a data access layer (how to get/update the data). An ORM provides a framework for both of these, but in my opinion it’s very inefficient to build, maintain, and optimise. You don’t need to turn to raw SQL as the alternative data access layer, but having one that is easier to customise is better in my opinion.
Not at all an expert, probably nonsense, please correct me.
- jupp0r 3y agoIt depends on what exactly the ORM offers as a feature set. ActiveRecord scopes in Ruby for example do exactly that.