[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] AspectJ 1.x language and AspectJ 5 annotations: which style should I use
|
> should I use Aspject 5
> annotations or use AspectJ 1.x. styled pointcut syntax in
> the project?.
(my .02)
By annotations I understand putting the aspects in
annotations
(like AspectWerkz) rather than directly in source files.
(Either way, Java 5 annotations can be picked out in
pointcuts, declared in inter-type declarations, etc.)
Annotation-style is just starting to be supported, so I'd
imagine that you would start with code-style, to avoid any
wrinkles in the initial support, unless you preferred the
way annotation-style programs are built.
Whether you use annotation-style or code-style, the
syntax of the program is the same.
-- annotation style aspects
- can compile using javac,
but have to post-process with ajc
- not supported until AspectJ 5 release,
and even then not tested as much as code-style
- not clear when IDE support for writing annotation-style
aspects will be available
-- code-style aspects
- must compile with ajc, though you can write
aspect libraries and weave with javac-compiled code
- two+ years of support
- Good IDE support for code completion,
viewing structure, etc.
hth - Wes
On Mon, 28 Feb 2005 11:24:31 +0800
"Guofeng Zhang" <guofeng@xxxxxxxxxxxxx> wrote:
> Hi,
>
>
>
> If our new project is run on JVM 5 and the project might
> start after
> April when the AspjectJ 5 is official released, should I
> use Aspject 5
> annotations or use AspectJ 1.x. styled pointcut syntax in
> the project?.
> This is our first project that uses AspectJ in its core
> component.
>
>
>
> As the developers of AspectJ 5, what do you recommend?
>
>
>
> We want to use consistent AspectJ sytanx in the future
> projects, your
> advice is appreciated.
>
>
>
> Thanks
>
>
>
> Guofeng
>
>
>