AOP/Partial classes/code generation?

Jimmy writes a post that just happens to nick something I’ve been working on myself. Yes the problems that AOP tries to solve are worth solving and are really hard to solve using traditional techniques. This is especially true if you take “traditional techniques” to mean ordinary approaches to OO development where code sharing is only possible via inheritance or to a lesser degree via composition if anybody actually taught that sort of thing. I recently noticed that a completely new way of doing AOP in .net was being done by the AspectDNG group much more similar to how some of the java approaches have worked. Still, even though ripping apart assemblies and piecing them back together again could only be described as cool, as Chad who I work with pointed out, debugging would have to be really hard even if the framework were really solid. Maybe not, but only some real experimentation would answer that. Somewhere though, I keep thinking that there are approaches possible with the existing codebase.

This week and last I have been experimenting with code generation. Jimmy refers to the partial class technology that is supposed to be part of 2005. Basically as I understand it it just allows you to inject source from multiple places into a single compilation unit. It may be very elegantly done and the approaches I have been working with fall somewhat short of elegant. Still, the idea that source can be assembled at compile time is OLD stuff even if the tools have not advanced as far as we would like. It makes me


Comments are closed.