jblack1395 (36) [Avatar] Offline
It would be useful if you talked about how to unit test aspects, and if you could talk about using aspects to do better unit testing, rather than using junit, that would be great.

This article is about unit testing aspects

This one I found really interesting, about reducing pattern density using aspects.

In my own work I am using aspects to abstract out major frameworks, for example, the same class can be either a webservice or a servlet, depending on the aspect I use, since the basic functionality doesn't change.

I also abstract out portal specific function calls by using aspects.

I found it really helpful when I realized I could inject methods into interfaces, even though it violates the idea of an interface, it makes it simpler to add functions that will be used in several classes.
ramnivas (171) [Avatar] Offline
Re: planning on talking about unit testing aspects
Thanks James for your feedback and notifying typos.

I will be including discussion and examples of testing aspects in later chapters.

Indeed, implementing mixins using AspectJ is very powerful idea. I look at the possibility of adding methods with implementation to interfaces as fixing a shortcoming of Java.

jblack1395 (36) [Avatar] Offline
Re: planning on talking about unit testing aspects
Thank you for your response, I look forward to the next update to your book. smilie