jducoeur: (Default)
[personal profile] jducoeur
So in my spare moments today, I'm finally getting around to reading into AspectJ, the aspect-oriented extension language for Java.

Oh, this is so cool. I've been vaguely familiar with the concept of aspect-oriented programming, but never really dug into it to see what a proper implementation looks like. The semi-declarative nature of the language appeals quite a bit to me, even if I don't love some of their syntax choices. And it's easy to see how a disciplined use of this mechanism could result in a significantly better architecture in many systems. (I suspect that the scripting engine I wrote for my current job would have worked quite differently if I'd had these tools.)

I want. I think I need to give some thought to how one could apply these concepts to .NET/C#, and whether the key concepts could be layered on top of it. The metadata parts are easy, but I'm not sure there's any straightforward way to define pointcuts without hacking the compiler -- I don't recall any native .NET support for interception...

errrr

Date: 2004-08-06 10:46 am (UTC)
From: [identity profile] dmnsqrl.livejournal.com
don't suppose you know a helpful "what da heck is aspect-oriented code" reference?

Re: errrr

Date: 2004-08-10 06:38 am (UTC)
From: [identity profile] russkay.livejournal.com
try this explanation out:

http://www.computerworld.com/developmenttopics/development/story/0,10801,85621,00.html

Re: errrr

Date: 2004-08-10 07:57 am (UTC)
From: [identity profile] dmnsqrl.livejournal.com
hey, thanks :)

Unconvinced...

Date: 2004-08-08 04:28 pm (UTC)
From: [identity profile] metageek.livejournal.com

I've been reading the AspectJ introduction, and I'm unconvinced. I'm disturbed by the notion of altering a function by adding some declaration somewhere else; and I'm pretty sure that a lot of the benefits they tout can be had with multiple inheritance. For example:

Inter-type declarations in AspectJ are declarations that cut across classes and their hierarchies. They may declare members that cut across multiple classes, or change the inheritance relationship between classes. Unlike advice, which operates primarily dynamically, introduction operates statically, at compile-time.

Consider the problem of expressing a capability shared by some existing classes that are already part of a class hierarchy, i.e. they already extend a class. In Java, one creates an interface that captures this new capability, and then adds to each affected class a method that implements this interface.

But that's exactly what multiple inheritance is for. Java decided that multiple inheritance was too complicated, so now people have come up with something even more complicated to do the same job.

Profile

jducoeur: (Default)
jducoeur

October 2025

S M T W T F S
   12 34
567891011
12131415161718
19202122232425
262728293031 

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags