Lazy loading seems to me a kludge trying to fix poor SQL querying.
I very much agree with you, lazy loading should not be used as substitute for only querying and/or filtering the data you actually need.
However, there's always going to be a minimum; eventually, the data needs to be processed or displayed! Why load all of it immediately into memory (and potentially pass that around), rather than when it's actually needed?
I think of it a bit like using pointers; passing around the location of the data, rather than the data itself, makes life good for all concerned.
I don't use Cake, so don't read this is a defence of Cake.
Thanks for the disclaimer, as I'm guessing you've experienced before, it's all too easy to get into accidental flamewars about this stuff :)
I very much agree with you, lazy loading should not be used as substitute for only querying and/or filtering the data you actually need.
However, there's always going to be a minimum; eventually, the data needs to be processed or displayed! Why load all of it immediately into memory (and potentially pass that around), rather than when it's actually needed?
I think of it a bit like using pointers; passing around the location of the data, rather than the data itself, makes life good for all concerned.
I don't use Cake, so don't read this is a defence of Cake.
Thanks for the disclaimer, as I'm guessing you've experienced before, it's all too easy to get into accidental flamewars about this stuff :)