Random thought #2

54 views
Skip to first unread message

James Coplien

unread,
Mar 11, 2012, 10:25:51 AM3/11/12
to dci-ev...@googlegroups.com
A random thought:

AOP is about syntax: the form of local expression. DCI is about semantics: the meaning of system execution.

Critique and discuss.

Jeremy Pullen

unread,
Mar 14, 2012, 6:39:11 PM3/14/12
to dci-ev...@googlegroups.com
>> AOP is about syntax: the form of local expression

Ok, since no one else has....I'll bite.

Is that really fair to the original intent of AOP?  I haven't dusted off my AOP reading in a few years, but if my memory serves me correctly AOP had (among other things) goals related to controlling things like memory management, system logging, and other "aspects" that seem very closely related to things represented by "context"s.  That sure sounds like system execution to me.

ant.ku...@gmail.com

unread,
Mar 14, 2012, 6:58:09 PM3/14/12
to dci-ev...@googlegroups.com
Ill bite some more. I might learn something in the process.

AOP is (in my book) about decoupling (technical) concerns like security and transactions and concurrency from business logic.

So if you read that sentence *with* the word "technical", you'd favour AOP being about syntax.  At the same time, those concerns may very well interest the business, and be part of the semantics. Imagine the horror on the face of some accountant when their back office delivery was only partially written, by Joe, who works in marketing...

James Coplien

unread,
Mar 15, 2012, 3:16:11 AM3/15/12
to dci-ev...@googlegroups.com

On Mar 14, 2012, at 11:58 , ant.ku...@gmail.com wrote:

Is that really fair to the original intent of AOP? 


I had a discussion with Gregor many years ago. He told me that he had spent hears trying to woo people to the world of reflection and to Lisp. They wouldn't bite because curly-braced languages were all the rage. So he decided to show them how awful it would look in a curly-placed language, and together with Christa Lopes, created AspectJ. I don't think people got the joke and, well, apparently Gregor and Christa said: When life gives you lemons, make lemonande.

Do you think I am really fair to the original intent of AOP?

ant.ku...@gmail.com

unread,
Mar 15, 2012, 3:24:44 AM3/15/12
to dci-ev...@googlegroups.com
A) Jeremy wrote that, not me,
B) interesting bit of history,
C) I'm not sure original intended uses matter but rather actual uses.  For example, the internet was originally conceived for transferring technical documents. Today its used for porn, gambling, marketing and interacting with "friends" who you've never met, for example, this message.



----- Reply message -----
From: "James Coplien" <jcop...@gmail.com>
To: <dci-ev...@googlegroups.com>
Subject: Random thought #2

Jeremy Pullen

unread,
Mar 15, 2012, 9:41:27 AM3/15/12
to dci-ev...@googlegroups.com
>> >> >> AOP is about syntax: the form of local expression. DCI is about semantics: the meaning of system execution.
>> >> related to controlling things like memory management, system logging, and other "aspects" that seem very closely related to things represented by "context"s.  That sure sounds like system execution to me.
>> C) I'm not sure original intended uses matter but rather actual uses.  For example, the internet was originally conceived for transferring technical documents. Today its used for porn, gambling, marketing and interacting with "friends" who you've never met, for example, this message.

The history lesson was indeed interesting, but to reiterate point (C), my intended emphasis was on the "sounds like system execution" part of my response.  I'd be curious to hear an answer to that aspect (pun intended :-)  ).

Rune Funch Søltoft

unread,
Mar 15, 2012, 9:58:41 AM3/15/12
to dci-ev...@googlegroups.com
I see it as AOP and DCI using different building blocks. In DCI we keep the interaction in one place where as AOP is more class-centric (at least in the versions I've seen them, never really don easy AOP). In the tools I've seen for C# you declare that at some point you wish to use some shared aspect  Compared to DCI that does not help me grasp the meaning of the execution it only tells me from which blocks it's build. In an interaction I can see the entire flow and from that get to the meaning of the system execution

-Rune

2012/3/15 Jeremy Pullen <jeremy...@gmail.com>

James Coplien

unread,
Mar 15, 2012, 10:12:20 AM3/15/12
to dci-ev...@googlegroups.com

On Mar 15, 2012, at 2:58 , Rune Funch Søltoft wrote:

I see it as AOP and DCI using different building blocks. In DCI we keep the interaction in one place where as AOP is more class-centric (at least in the versions I've seen them, never really don easy AOP). In the tools I've seen for C# you declare that at some point you wish to use some shared aspect  Compared to DCI that does not help me grasp the meaning of the execution it only tells me from which blocks it's build. In an interaction I can see the entire flow and from that get to the meaning of the system execution

"meaning" == "semantics"

hence, my argument that AOP is about syntax rather than semantics.

Wenig, Stefan

unread,
Mar 15, 2012, 12:54:38 PM3/15/12
to dci-ev...@googlegroups.com

Hi guys,

 

despite having zero time on my hands right now, I just randomly stumbled over this thread and thought the following story might interest you.

 

The late 90s saw some intense but short-lived interest in a thing called multi-dimensional separation of concerns[1]. I’ve talked about it before, the short story is that it is a more complete mechanism for assembling classes than single inheritance and it’s supposed to solve a number of problems in programming. Despite technical similarities, it’s a very different idea from DCI, but stay with me for a second.

 

The inventors of MDSoC worked for IBM, and they developed a Java-based language called Hyper/J. Soon after that, it seems it was decided that AOP could do all this just as well, it was the hype of these days after all, and work on MDSoC and Hyper/J was discontinued. (Similar ideas like mixin slices in Feature-oriented Programming are still vaguely alive, but they all missed their chance to become mainstream.)

 

Unfortunately it turned out that AOP was interesting enough to suck all the attention away from this concept, but nobody wanted to actually build applications using it. AOP is now widely used for infrastructure-level code, but that’s about it. Ivar Jacobson offered a similar semantic approach to AOP using “use case slices” (same thing once more) in 2005 [2].

 

MDSoC, mixin slices and Jacobson’s book had semantic advice. Hyper/J vs. AOP was more about syntax. But AOP itself had no semantic guidance, and it had very bad syntax for anything but cross-cutting code. Eventually, all semantic concepts whose proponents made a bet on AOP went down with it. These days, AOP is all about transactions, logging and security.

 

(My personal opinion is that if you use generic AOP without any further guiding ideas, tools and/or constraints for anything beyond infrastructure code, you’re turning your code into a guessing game. That will feel much worse than anything bad syntax can do, so here might be a hint that AOP is about semantics too ;-))

 

Cheers,

Stefan

 

[1] http://en.wikipedia.org/wiki/Subject-oriented_programming#Multi-dimensional_separation_of_concerns.2C_Hyper.2FJ.2C_and_the_Concern_Manipulation_Environment

[2] http://books.google.at/books/about/Aspect_oriented_software_development_wit.html?id=AqlQAAAAMAAJ&redir_esc=y

 

From: dci-ev...@googlegroups.com [mailto:dci-ev...@googlegroups.com] On Behalf Of Rune Funch Søltoft
Sent: Thursday, March 15, 2012 2:59 PM
To: dci-ev...@googlegroups.com
Subject: Re: Random thought #2

 

I see it as AOP and DCI using different building blocks. In DCI we keep the interaction in one place where as AOP is more class-centric (at least in the versions I've seen them, never really don easy AOP). In the tools I've seen for C# you declare that at some point you wish to use some shared aspect  Compared to DCI that does not help me grasp the meaning of the execution it only tells me from which blocks it's build. In an interaction I can see the entire flow and from that get to the meaning of the system execution

 

-Rune

2012/3/15 Jeremy Pullen <jeremy...@gmail.com>

>> >> >> AOP is about syntax: the form of local expression. DCI is about semantics: the meaning of system execution.

>> >> related to controlling things like memory management, system logging, and other "aspects" that seem very closely related to things represented by "context"s.  That sure sounds like system execution to me.

>> C) I'm not sure original intended uses matter but rather actual uses.  For example, the internet was originally conceived for transferring technical documents. Today its used for porn, gambling, marketing and interacting with "friends" who you've never met, for example, this message.

The history lesson was indeed interesting, but to reiterate point (C), my intended emphasis was on the "sounds like system execution" part of my response.  I'd be curious to hear an answer to that aspect (pun intended :-)  ).

rune funch

unread,
Mar 15, 2012, 3:11:15 PM3/15/12
to dci-ev...@googlegroups.com
Den 15/03/2012 kl. 17.54 skrev "Wenig, Stefan" <stefan...@rubicon.eu>:

> (My personal opinion is that if you use generic AOP without any further guiding ideas, tools and/or constraints for anything beyond infrastructure code, you’re turning your code into a guessing game. That will feel much worse than anything bad syntax can do, so here might be a hint that AOP is about semantics too ;-))

That seems to me as an oxymoron, first stating that AOP takes away
meaning (making it a guessing game) and then sayings it about that
meaning. What did I miss?

Wenig, Stefan

unread,
Mar 15, 2012, 4:48:57 PM3/15/12
to dci-ev...@googlegroups.com
Life is full of contradictions... but that's not necessarily one.

Pointcuts and Joinpoints are semantic concepts, independent from the syntax that specific languages apply to them. (Note that I'm now talking about language semantics, not the semantics of your code.) These concepts do affect the structure of your code, and the structure guides how the code's meaning is expressed. So I'd disagree: AOP is not just about local syntax.

But I agree that AOP has little to say about how to create meaningful structures. Applying common sense to AOP doesn't take you far beyond logging etc.

Higher level concepts like DCI and MDSoC are more about structuring your code to better express meaning, and AOP languages might be used to implement them in way that other languages cannot. I said that Hyper/J vs. AOP languages is a more of a syntactical question (not that AOP is only syntax), but even that might be an exaggeration.

Does that make more sense to you?

Reply all
Reply to author
Forward
0 new messages