Guice vs AspectJ

I worked with GUice a few months ago, and now, when I return to it, I believe that I need to re-read the Guice documentation and examples to understand what I did with my code.

However, when I look at AspectJ, this is too intuitive. This is an intuitive extension of the Java language. I feel like I can sit down and write AspectJ code right away.

Therefore, I am tempted to give up my desire for Geese and go with AspectJ. Especially the fact that Spring generates AspectJ code.

What features of Guice exist over AspectJ that should prevent me from abandoning Guice?

Why not Google abandon Guice and use AspectJ instead?

Vice Versa, What are the features of AspectJ that would encourage me to abandon Guice, in addition to its intuitiveness?

If I can be allowed to “weave” in the question here, what prevents the Java language from being integrated with AspectJ or providing similar “aspects” in a future version of Java?

Note : to run happy delete-azillas, I understand that this question may be too general, but if I knew what else needed to be clarified, then I would not even need to ask, but just google / bing for what I know , what I do not know. As you can see, my Guice knowledge has deteriorated so much that I did not even recognize my own handwriting.

+5
source share
3 answers

, Guice AspectJ - . Guice , factory, , . AOP ( , , DSL). , , .

AspectJ Java... , , . , . , , , , , .

+19

AspectJ Guice .

Guice , AspectJ .

spring, Guice , , Spring/AspectJ - .

, < spring , .

+7

Spring is built on dependency injection and aspect-oriented programming.

Guice is a dependency injection engine.

AspectJ is an aspect-oriented engine.

See the difference? Guice and AspectJ will complement each other; Spring already has both.

It should be noted that Spring supports its own interceptor-based AOP, which does not require manipulation of byte code, in addition to AspectJ.

+2
source

All Articles