Skip to content.

Manageability

Sections
Personal tools
You are here: Home » blog » archive » Reflection vs. Code Generation?

Reflection vs. Code Generation?

20021102072742

The author of Reflection vs. Code Generation article, Michael Rettig announces a new version of Jaxor, an open source O/R Mapping Tool.  What's different about this tool is that it uses code generation as opposed to runtime reflection.  OJB and Hibernate, both exploit reflection, JDO on the other hand uses byte code enhancement. 

O/R Mapping Tools are kind of a subset of Aspect Oriented Programming (AOP) tools, in the sense that it attempts to apply a persistence aspect to a base object model.  So, if we look at the different kinds of O/R Mapping Tools, and contrast it to what's available in the AOP world, we get a pretty nice categorization.  AspectJ uses Code Generation, Rickard's AOP and Nanning appear via Dyanamic Proxies use runtime reflection and JAC appears to be byte code enhancement (albeit at runtime). ( Actually, come to think about it, there's no equivalent to JDO's byte code enhancement in the Aspect world, could it be its a inflexible and ultimately flawed approach? ) Obviously, these categorization aren't strict, a tool may actually use both Reflection and Code Generation, the question of course is, "which to use and when to use?"..

Created by admin
Last modified 2003-07-31 07:28 AM

bytecode weaving

Posted by ceperez at 2003-08-04 06:49 PM

AspectJ can now do bytecode weaving, so the equivalent of JDO does now exist.

visitors
reading
 
 

Powered by Plone

This site conforms to the following standards: