Ashik Uzzaman
Director of Engineering, Twin Health, Mountain View, CA, USA
Originally posted by norman richards:
Sometimes these secondary concerns show up over and over in the code base. Maybe you have a number of places where you have to think about security checks or logging or other secondary concerns. This is what is meant by "cross cutting" concerns. You can visualize this by imagining your methods as vertical bars. Then imagine a horizontal bar (labelled "logging" cutting across all of them. The secondary concern of logging cuts across all of your primary concerns. (like reading data from the database)
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
----------------<br />Brian Kapellusch
Originally posted by Brian Kapellusch:
Using a Dynamic Proxy assumes that the client is calling a method on an interface. I was not so fortunate as to "think ahead" when I was designing my first application at my current employer.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
----------------<br />Brian Kapellusch
Originally posted by Stan James:
A neat part of AOP is the little language they use to identify the intercept points. You can identify a spot like the beginning of every method, or the beginning of methods that start with "get" or methods that have int,int parameters or other points in the middle or just prior to return, to an extremely fine grained level of detail.
It won't be sufficient to read a method to know what it does; you must also somehow discover and understand all the AOP intercepts that might affect the method. Yikes![/QB]
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Originally posted by Hung Tang:
Currently AspectJ is the leading framework for AOP implementation for Java. But there are others such as AspectWerkz and Nanning, albeit not as feature rich as AspectJ.
AspectJ is built on top of Java adding a few new concepts to the language such as introductions, joinpoints, pointcuts, and advices. An Aspect brings all these together to enable AOP implementations in your design.
For me in explaining AOP to someone, I would just tell them to think of "interceptors" and that each interceptor picks out a specific execution point (whether it'll be at class level, method level, constructor level, exception level, etc) and do something useful at those points.
Originally posted by Pradeep Bhat:
What is cross-cutting concerns?
Originally posted by Ilja Preuss:
Interestingly, I have just implemented something similar (logging RMI access) without AOP by using a Dynamic Proxy. It was quite straight forward...
Originally posted by Ilja Preuss:
That's actually what I am most sceptic about regarding AspectJ defining join points based on method *names*.
Originally posted by Ilja Preuss:
I find it to be somewhat dangerous being able to change the behaviour of a method *by renaming it*!
Originally posted by Pradeep Bhat:
Does application performance go down in AOP when compared to plain OOP? Isn't there an overhead in AOP because the calls are intercepted?
Originally posted by Ali Pope:
It is highly dependent on the way you are implementing the aspects and also on the complexity of required information in joinpoints. It is indeed a possible problem of the solutions using interception, but some of the most advanced AOP implementation (AspectJ, AspectWerkz) are far away from this.
./pope
Originally posted by Ali Pope:
Who is saying this is not a form of AOP? . It depends on what do you think AOP is.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
It wasn't my idea to go to some crazy nightclub in the middle of nowhere. I just wanted to stay home and cuddle with this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
|