I don't think there is any way I could agree more with this post Cliff. Well
said. Often when new technologies come around we find ourselves thinking about
all the cool ways we can apply them, which is perfectly natural, and part of
the learning process, but unfortunately forget about simpler constructs that
already exist.
-------------- Original message ----------------------
From: "Cliff Meyers" <[EMAIL PROTECTED]>
> I also think it's important to think about where and how AOP is
> commonly applied to understand what sorts of uses are appropriate.
> Most commonly you see containers like Spring/ColdSpring managing
> stateless infrastructure components like DAOs or Services using the
> Singleton pattern. It is less common for such a container to manage
> elements of the Domain Model (a.k.a. "Business Objects') because (1)
> this can lead to coupling the business logic to the container, and (2)
> these objects aren't stateless and have to be created every time a
> request is made to container (the "prototype" approach instead of
> "singleton"). This in and out itself probably isn't a big performance
> hit, but if you start to employ AOP in the domain model suddenly
> creation of these objects becomes a lot more expensive. I'm not
> saying that it can't be done, but I'd tread cautiously down that road.
> Instead of using AOP ("dynamic inheritance") you might be better off
> using composition to achieve the flexibility you need in the domain
> model. The general rule of thumb in OO modeling is "prefer
> composition to inheritance" so hopefully that argument/comparison is
> of merit.
>
> -Cliff
>
>
> ----------------------------------------------------------
> You are subscribed to cfcdev. To unsubscribe, send an email to
> [email protected] with the words 'unsubscribe cfcdev' as the subject of the
> email.
>
> CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting
> (www.cfxhosting.com).
>
> An archive of the CFCDev list is available at
> www.mail-archive.com/[email protected]
>
>
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to
[email protected] with the words 'unsubscribe cfcdev' as the subject of the
email.
CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting
(www.cfxhosting.com).
An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]