Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] AspectJ + Groovy?

Hi Ron,
Thanks so much for the reply.  I haven't had a chance to use Groovy
any, but wanted to see about what other people have done and if it
would be worth persuing.   I guess I might go ahead and try a little
bit down the road (once I learn Groovy) and see what I can do.  If I
have any epiphanies, I'd be happy to add them to the docs and best
practices if you'd like.

Yours truly,
Jim


On Thu, 24 Feb 2005 13:11:32 -0800, Ron Bodkin <rbodkin@xxxxxxxxxxxxxx> wrote:
> Hi Jim,
> 
> I used AspectJ with Groovy for unit testing about 6 months ago and generally
> was able to get aspects to apply to compiled Groovy code, and the Groovy
> code could call on ITD's. I don't believe there was a way to implement
> aspects in Groovy, and trying to weave into interpreted Groovy seemed to be
> challenging (I think you'd have to weave the Groovy library and then you'd
> have something like trying to weave into reflective calls in Java).
> 
> Sam Pullara also wrote a nice blog entry on an interesting use case for
> combining AspectJ with Groovy for coverage tracking:
> http://homepage.mac.com/spullara/rants/C1464297901/E158600668/
> 
> I think it would be great to have AOP support for Groovy, but my $.02 is
> that the right level to work at is the Groovy language level, not in the
> underlying compiled Java code. In particular, I think you'd want to have
> pointcuts that work well for closures and dynamically defined methods. There
> have been "pointcuts"(*) defined in AspectWerkz and JBoss AOP that do
> something similar, like hasfield and hasmethod. In Groovy, it would be
> really natural to match instances that have a given method or field...
> 
> Ron
> 
> (*) I don't think hasfield/hasmethod should be defined as pointcuts since it
> breaks orthogonality. Instead, these ought to be type patterns, just like
> Foo+ or annotation matching for type patterns.
> 
> -----Original Message-----
> From: aspectj-users-admin@xxxxxxxxxxx
> [mailto:aspectj-users-admin@xxxxxxxxxxx] On Behalf Of Jim Bethancourt
> Sent: Thursday, February 24, 2005 7:01 AM
> To: aspectj-users@xxxxxxxxxxx
> Subject: [aspectj-users] AspectJ + Groovy?
> 
> Hello All,
> I'm just wondering if anyone has tried to use AspectJ and Groovy together in
> any sort of combination.  I'm sure it's possible, but mostly I'd like to
> start a discussion both on how the two can be used together.  Additionally,
> maybe we can start a set (or subset) of documentation for the AspectJ docs
> on the topic too.
> 
> A few discussion topics to consider (this list is by no means exhaustive):
> 1.How to write aspects in Groovy
> 2. How to attach aspects to Groovy code
> 3. The possibility of the AspctJ toolkit and AJDT supporting Groovy 4. The
> possible uses / advantages the two working together might have over
> traditional Java + AspectJ development
> 
> If any of these topics should be moved to the aspectj-dev mailing list,
> please don't hesitate to move them there.
> 
> Cheers,
> Jim
> 
> P.S. Although I've been following the AspectJ mailing lists for a while, I
> think I'd like to get involved now, most likely with documentation.  Any
> guidance would be helpful in this matter too.  You can just email me
> directly about that if you'd like.  Thanks! :-)
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/aspectj-users
> 
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/aspectj-users
>


Back to the top