[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [aspectj-users] AOP strategy
|
The listeners are actually bound to the panel with the
shapes. It is a Swing key listener or mouse listener.
It is just that instead of declaring listener
classes all over the code I wanted to keep the
listener template code standard and change behavior
depending on the originator.
For example, if a rectangle was clicked than I will
do something. Eventhough a mouse listener is actually
bound to the panel, the behavior can change depending
on what was clicked.
Thanks
Mohan
--- Eric Bodden <eric@xxxxxxxxx> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> > Is this a good use case for AOP ?
> No, I would not think so. Since you wanna do
> *different* thing for
> every instance your concern is not really
> crosscutting. Actually I
> think it would be bad design anyway - also using
> standard OOP. If the
> listeners do different things for different shapes
> they should be
> related to them. The implementation you propose
> reminds me of
> "simulated OOP" in ANSI C passing parameters and
> using a lot of
> switch statements...
>
> Eric
>
> - --
> Eric Bodden
> Chair I2 for Programming Languages and Program
> Analysis
> RWTH Aachen University
>
> -----BEGIN PGP SIGNATURE-----
> Version: PGP 8.0.3
>
>
iQA/AwUBQd5/rMwiFCm7RlWCEQJmbQCdG+nD8sjsYXxDkV2Bnhe61nvtZHsAoIkh
> vYvsGBtLkf+m7mtOqYkFW6b/
> =Y1f2
> -----END PGP SIGNATURE-----
>
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
>
http://dev.eclipse.org/mailman/listinfo/aspectj-users
>
__________________________________
Do you Yahoo!?
Yahoo! Mail - 250MB free storage. Do more. Manage less.
http://info.mail.yahoo.com/mail_250