Wednesday, October 11, 2006 

Origins of AOP

Most literature on AOP points back to a seminal paper by David Parnas ("On the Criteria To Be Used in Decomposing Systems into Modules", Communications of the ACM, Vol. 15, No. 12, December 1972). Curiously enough, the same paper was frequently cited in early works about OOP, which confirms my idea that Parnas has been one of the most influential software engineers ever (in fact, I highly recommend that you read all of his works). Anyway, that paper is not really about AOP or OOP: it is about criteria and principles, like Information Hiding and Separation of Concerns. Early references to AOP-like techniques usually points to Kiczales, or to Subject-Oriented Programming, but that's in the nineties.
Recently, I've been reading a book from Ivar Jacobson and Pan-Wei Ng ("Aspect-Oriented Software Development with Use Cases", Addison-Wesley). I didn't much like the book, but anyway, in the preface Jacobson claims to have invented AOP-like concepts in 1986, maybe in 1981. I didn't read the papers, as the links in Jacobson's site are broken, so there isn't much I can say (right now). However, it strikes me that nobody is giving the proper credit to what was probably the first real programming environment (can't call it a language) supporting AOP-like concepts. It was called WEB, and then became known as CWEB for its C-based instantiation, and was created by Donald Knuth (famous for TeX and for the monumental :-> "The Art of Computer Programming" series) back in 1984 (or so I remember).
CWEB implements Knuth's vision of literate programming, where programs are fragmented, fragments are interleaved with explanations (text, charts) and possibly hyperlinked. In a sense, CWEB starts with a paper explaining the program, and you can use a tool to get the program code. You actually use two tools: CTANGLE, which produces compilable C code from the paper-like description, and CWEAVE, which produces TeX documentation. Guess what, even [en]tangle and weave are now recurring terms in all the AOP literature and languages. A nice feature is that you can show code evolution (e.g. from a simple but inefficient implementation to a complex but highly optimized version) and choose the version you want to merge in the main program.
CWEB never reached a critical mass of adopters, but it's still relatively well-known, having been popularized by Knuth himself on several books. So, in a sense, it's rather weird nobody has seen the root of AOP in there. This is not so unusual, however. I remember, back in the "design pattern" frenzy, how I wondered about the fact that nobody could see (or cared to mention) the strong relationships with the concepts in "The Programmer's Apprentice" by Rich and Waters. Especially those interested in building pattern-based tools. Oh, well... :-).
Comments:
Sadly Jacobson is not new to this kind of things. He often jumps onto new stuff and after a while claims he was there before everyone else....
 
Post a Comment

<< Home