Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • paul wheaton
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Ron McLeod
  • Tim Moores
  • salvin francis
  • Carey Brown
  • Tim Holloway
  • Frits Walraven
  • Vijitha Kumara

SpringAOP doubt  RSS feed

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi..i am refering the Spring In Action book for Spring. I am having problems understanding the Introduction(mix-in) topic under Spring AOP. Can sum1 pls suggest a better tutorial on same or explain wat it exactly is.

Ranch Hand
Posts: 775
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm assuming your question is "what does this feature do for me?" instead of "I understand what it does, but how do I make it work?"

If you have never used reflection, you probably won't care about introductions quite yet. Not saying that there aren't things you can't get out of introductions without reflection, more I'm just thinking of the learning curve. The reflection API is kind of the other half of what is going on; it tells you what is available in a class or object; handy for creating generic tools and frameworks. Introductions on the other help you make new stuff available that wasn't in the original java code for a class. Could be handy for adapting existing code to some tool or framework environment.

In the book they have an immutable mix-in as an example. If you compare that approach to the source of Struts you'll see Struts has a lot of objects to represent the struts-config files. Once those files are read the Java objects are "frozen" to make them immutable. Imagine ripping out that code for the cross-cutting concern and using the mix-in instead. That way all the config objects could be "frozen" but wouldn't have all those copies of source dealing with "frozenness". Their java source would just have the setters and getters necessary for the values populated by Digester.
Not so fast naughty spawn! I want you to know about
global solutions you can do in your home or backyard
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!