Imagine my shock when I read Ted's post explaining that my recent XLSTO work meant I was embracing aspect-oriented programming, something I walked away from after spending years with COM+. He argues that:
But the brutal truth is, what he's done--the execution of code in response to what amounts to a pointcut (through an XML document instead of through a programming model)--is quintessentially an AOP concept.
I'm not up on my aspect terminology, so I don't know if it's me unknowingly adopting aspects or Ted knowingly adapting aspects to make them more useful. In any case, I built XSLTO because I had an XML language for scripting SQL server. I was taking XML input documents, transforming them to this XML language and then doing a stream based parse that updated my database. I didn't want to go through the steps of generating and reparsing the intermediate XML document, so I went to a model that had XSLT's data-driven parsing -- which I needed because the shape of the input varied -- but allowed me to execute CLR statements. I think of XSLTO as just another way to build a parser for an XML language, without having to write all the control statements directly because they're implicit in the XSLT recursive descent parsing model.
So back to whether this is really aspect-oriented. Ted goes on to note that:
As to the oft-quoted "killing blow" regarding AOP systems, that being that aspects cannot be ordered or stateful, it's interesting to note that people refuse to make similar accusations about XSLT, yet it (a) fundamentally presents much the same kind of programming model as an AOP-based system would, and (b) has similar problems with ordering and state, yet nobody's calling for XSLT to die....
I agree that there is criticism of the ordering problem in AOP systems (and rightly so). I also agree that there is no criticism of the same thing in XSLT. I think that's because in XSLT ordering is driven by the input, not the transform, where in the AOP systems I've seen it's driven by the code itself. To me that makes XSLT and the AOP systems I've seen completely different. Among other things, exactly one of them is really useful.
Posted
Apr 05 2005, 11:54 AM
by
tim-ewald