AOP and the Law of Demeter
I’ve been doing a little reading on the Law of Demeter. This concept has a certain resonance with me, and I can imagine it being difficult to follow using pure oo methods. Indeed, it says on the page that the LoD is best followed using AOP tools. It also appears from this reading, although I can’t be sure, that AOP developed as an outgrowth of developers trying to conform to the LoD. So I have two questions.
1) How does AOP help one conform to the Law of Demeter?
2) Why is the Law of Demeter not mentioned by “mainstream” AOP articles? It appears that the motive for AOP has changed to “Keeping domain objects pure”. I like this motive, but I don’t believe you need AOP, or AOP tools to do it. If anything they may confuse matters.