Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-users] Any useful examples

Hi Dale,

No need to shout here ;-) I understand why you do not want the
PropertyManager, I was only thinking out loud for Edward (sorry Edward).
Like I said, whether or not there is a clean OO solution is besides the
point. Arguments for going AOP are readability, understandability and
maintainability and I clearly see that we are on the same line there.

Rudi.

-----Original Message-----
From: R. Dale Asberry [mailto:lists@xxxxxxxxxxxxxxx] 
Sent: vrijdag 8 augustus 2003 13:51
To: aspectj-users@xxxxxxxxxxx
Subject: RE: [aspectj-users] Any useful examples


Why would I want to create a PropertyManager?  By doing so, I'm
unnecessarily creating a dependency.  Now instead of the brittle
dependency on properties, I'm now dependent on a PropertyManager.  In a
small example, no big deal.  With a few hundred of these "little"
dependencies, my application quickly becomes unnecessarily complex and
difficult to maintain.

Using the _simple_ AOP solution I demonstrated, my application will work
without any modification if I choose to NOT implement property defaults.
By using AOP, I make it more usable without adding any dependencies.  I
separate the property defaulting concerns COMPLETELY away from the core
logic of my application.

I would disagree and say that this is a simple example that is not
_EASILY_ solved using OO.  It also captures the essence of cross-cutting
concerns.

FYI, the original solution was to use a utility class to do all of this.
I eliminated almost 300 lines of code by using the AOP approach.

> -----Original Message-----
> From: aspectj-users-admin@xxxxxxxxxxx 
> [mailto:aspectj-users-admin@xxxxxxxxxxx]On Behalf Of Vankeirsbilck, 
> Rudi. (BE - Merelbeke)
> Sent: Friday, August 08, 2003 6:31 AM
> To: aspectj-users@xxxxxxxxxxx
> Subject: RE: [aspectj-users] Any useful examples
>
>
> I don't think this is the example Edward was looking for. There is a 
> clean way to solve your problem with plain OO and that is NOT to use 
> System.getProperty directly but introduce a PropertyManager (maybe
> singleton) that has one public method getProperty and implements it 
> pretty much in the same way as your aspect is doing. But that is 
> besides the point because there is a non-aop solution to every 
> problem.
>
> The point that needs to be made is that AOP is just another way of 
> modularizing your code and it does this in a partucular that makes it 
> easy to deal with cross cutting code. Like with any modularizing 
> technique, it makes your code more readable, understandable and 
> maintainable and that is why you would use AOP.
>
> Rudi.

_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/aspectj-users


-----------------------------------------------------------------------


This message (including any attachments) contains confidential information intended for a specific individual and purpose, and is protected by law.  If you are not the intended recipient, you should delete this message.  Any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited.




Back to the top