AoP strikes me as one of those things where someone just invented a bunch of terminology around a really basic concept, for no good reason.
Aspect? Advice? Joinpoint? Pointcut? Really?
As far as I've been able to understand, AoP is just hooks. You can hook something before or after a function, or 'around' it which is a combination of both. Super useful, but really not that amazing or novel. Definitely does not warrant its treatment as some kind of separate type of programming.
...
Small nitpick with the article: In the example given, the call timing uses 'around', which measures the entire function as opposed to just the part of it that the initial function was measuring, right?
Yes, that's a valid perspective. But it's an incomplete one. Your reduction of AOP is highlighting the mechanism (hooks) but ignoring the purpose (the SOC separation of concerns).
It is the goal/purpose that motivates the separate umbrella label of "AOP". The hooks happen to be one implementation detail.
I'm also not a fan of creating a barrage of neologisms (e.g. see Thomas Friedman books) but the thinking behind AOP generating its own terminology seems reasonable when compared to other concepts if we mentally separate the "hooks" from the "goal":
hooks: insert instrumentation before & after lines of code
goal: performance statistics and optimization
hooks: insert code to mark memory regions with setinels
hooks: extern "C" ABI, or Win32 COM, or Wordpress plugin specification
goal: extend software functionality by heterogeneous programming languages, or 3rd party developers
With those examples, reducing "goal" concepts down to hooks such as "3rd-party software plugins are just hooks", and "performance instrumentation are just hooks" isn't adding information to why programmers are doing it and also doesn't explain why separate tools are created to support it. Therefore, unifying (reducing) a dozen disparate computer science concepts down to "hooks" isn't going to help us.
Getting past the "hooks" component and focusing on the larger concept (goal) in a systematic way may let us make advancements in its use (tooling, business ROI to implement, etc.)
The purpose of most work in programming language abstraction is separation of concerns, it's not like we weren't doing that before someone coined another name for modularization and a new mechanism (AOP) for doing that.
I'm not an AOP practitioner or apologist (Greek definition) but I think that AOP is emphasizing separation-of-concerns that are non-functional and non-core algorithm. Logging, audits, safety, etc. This is different emphasis of thinking from the abstraction/modularization of passing a custom compare() as a function pointer to quicksort().
I believe that speaking of AOP as an isolated concept is reasonable. Whether it reduces down to "hooks" or reduces even further down to assembly language "mov, add, jmp" instructions is not that interesting to me.
We have text editors that are 1-dimensional and linear. The programming code is not in "layers" like layers in Photoshop or AutoCAD drawings, and yet we're trying overlay N-dimensions of concerns throughout the code. We have some crude attempts such as text editors outlining collapse/expand of code regions (code folding). We have syntax coloring of programming language keywords but not of the higher-level concerns. Can the tools make this better?! Maybe. We (the computer scientists and programmers out in the real world) are trying to figure out how to interweave all this in a sane way. A focus on this issue of coding all the N-dimensional cross-cutting concerns will naturally lead to a umbrella concept that's researched in isolation.[1]
I don't believe in AOP as the The Next Big Thing. I also don't believe reducing it to just "hooks" adds to the research about it.
You'll get N different definitions of AOP if you ask N people for them. Separation of concerns was actually coined (aside from dijkstra's original usage) by Peri Tarr for hyperspaces, which was focusing on functional concerns (just around multiple dimensions) and not the non functional concerns of AspectJ. But for functional concerns we have lots of direct options, while for non functional concerns we also have indirect options like garbage collectors. The space is quite big and well travelled.
Regardless of all the fuzziness around terminology, we still try to advance knowledge forward, improve the tooling, possibly improve language syntax, codify and/or formalize best practices.
Just wanted to agree, kudos to better tooling support being an important enabler of AOP (beyond research prototypes, that is). It is not separation of, but cross cutting concerns what is highlighted, i18n, logging, error handling, target platform, etc., all with potential variations. While these commonalities are usually dealt with by throwing them to a library, the interactions of the alternative layers (there will be since they are going to be heavily coupled by the very definition of "cross cutting") is better dealt with, or could potentially hurt less using some version of AOP ideas (EDIT deleted FODA reference).
Right. The main question in our field is whether the term "AOP" is useful or not. The current popular thinking is that it is not very useful, but modularity, as always, is a great concept.
It really reminds me of Wordpress' hook system... And that makes me want to run away screaming, as the maintenance and testing nightmare that that entails has easily removed a decade off my lifespan.
We use a lot of AOP at work and explaining all the arcane terminology to new engineers is always a nightmare .. but it's necessary to work with basic libraries. So I totally agree.
I think a lot of the research around AOP was doing all this stuff, but with static checking. Which gets less trivial pretty quickly, and the distinctions become necessary.
So this is a fair point. With the dynamic / runtime variety it is not an issue. If you really needed the static variety (which is fair if you have a billion points hooked), I think that's a tiny subset of a more generalized problem about a language's static-analyzability, which matters in many other contexts anyway, like in-editor linting.
well, in AOP you can describe situations such as "when f is called within g". I think it's a lot more complex than just hooks.
Whether this extra descriptive capability is a positive thing is an open question (well, considering AOSD (Aspect-Oriented Software Developement) confernce changed to Modularity, maybe the question has been answered negatively)
Aspect? Advice? Joinpoint? Pointcut? Really?
As far as I've been able to understand, AoP is just hooks. You can hook something before or after a function, or 'around' it which is a combination of both. Super useful, but really not that amazing or novel. Definitely does not warrant its treatment as some kind of separate type of programming.
...
Small nitpick with the article: In the example given, the call timing uses 'around', which measures the entire function as opposed to just the part of it that the initial function was measuring, right?