On Tue, Dec 29, 2009 at 9:40 AM, [email protected] 
<[email protected]>wrote:
...

> Regarding Aspects, there is only one general advice I can give, based on
> my experience: You should be reluctant to do implementation-level stuff
> from Advice. It is always better to invoke an API or an existing service.
> (And following this reasoning, locking and managing the state would be
> the service's job, not the job of the aspect).
>
> Cheers,
> Hermann V.


That is indeed a good advice (no pun intended). In general, it is best if
aspects do minimal work by themselves. Essentially, I like aspects to act as
controllers and forward implementation details to normal objects (often
injected dependencies). Besides taking care of issues such as concurrency
(essentially, by making them nothing special than in the OO-only world),
such an arrangement facilitates better testing of the overall implemenation.

-Ramnivas
_______________________________________________
aspectj-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Reply via email to