• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

attribute oriented programming

 
Ranch Hand
Posts: 178
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Why do developers refer to XDoclet as attribute oriented programming?
What is active and passive code generation?

Thanks in advance.
 
Author
Posts: 367
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can think of AOP, in reference to XDoclet, as metadata driven code generation. That may just be trading one strange term for another, but I think the concept of metadata is easier to grasp. The basic idea is that you can add additional information to a class directly. When you create your FooBean you can declare all the meta information (from the jndi name to persistence to transaction details) using javadoc like tags around the task. You can indicate things like "this method goes on the remote interface" or "this is a JMX managed attribute" just by adding metadata. With XDoclet, you can work at this higher "attribute" level and let XDoclet handle some of the more mundane parts.
 
norman richards
Author
Posts: 367
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oh. Active/passive. XDoclet supports active code generation. This means that XDoclet owns the generated code and regenerates the code every time you build. The developer interacts with the system by changing the inputs to the generator.
Passive systems are more like code wizards. They only generate the code by some manual step taken by a developer. Tools that generate code from models or SQL DDL generation tools are usually passive.
In general, active systems are much more useful than passive code generation systems because the generated code never can get out of sync with the input source. With a passive system, you have to check your generated code into your revision control system, which invites hand editting by other developers.
 
Mcgill Smith
Ranch Hand
Posts: 178
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Norman,
I get it now.
Thanks for the detailed explanation.
 
Skool. Stay in. Smartness. Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic