On Mon, Mar 30, 2009 at 8:33 PM, Josh Suereth <[email protected]> wrote:
> I think AspectJ compiler currently pukes on scala classes anyway (or at
> least it did when Miles set up aspectj as a workaround the Eclipse JDT).

That was certainly the case quite recently ... I filed a bug against
AspectJ which as far as I know hasn't been fixed yet.

> So... no dice for AspectJ + Scala without using a Java "glue" class.

Yup, AspectJ can only advise Java classes. Seeing as it's Aspect*J*
the advice itself is essentially written in Java. But advice can call
Scala code, so it's possible to do most of any heavy lifting in Scala.

FWIW, my attitude to AOP used to be the same as David's: I thought it
was evil because ... it represents a gross violation of encapsulation
and modularity and is the moral equivalent of INTERCAL's COME FROM
(http://en.wikipedia.org/wiki/COME_FROM).

I've now seen the light and realize that AOP is wonderful because ...
it gives me all that tools I need to grossly violate the encapsulation
and modularity of the JDT ;-)

I would say that you should consider AOP when all of the following
conditions are met,

* You need to change the interface/behaviour of a third party component.

* You can't persuade the third party to accomodate you.

* You have access to the source code of the component.

* Forking, replicating or replacing the component would be too painful.

* You are able to commit to tracking changes in the component to
accommodate the inevitable breakage of time as it evolve
independently.

This happens surprisingly often (except maybe the last), both wrt open
source and internal enterprise projects, which goes a long way to
explaining the success of AOP as a model.

Cheers,


Miles

-- 
Miles Sabin
tel:    +44 (0)1273 720 779
mobile: +44 (0)7813 944 528
skype:  milessabin

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to