The Artima Developer Community
Sponsored Link

Java Buzz Forum
Generation vs Reflection

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Wolf Paulus

Posts: 692
Nickname: wolfpaulus
Registered: Jan, 2004

Wolf Paulus is an experienced software developer focusing on Java, XML, Mac OS X, wireless/mobile ..
Generation vs Reflection Posted: Jul 20, 2004 5:02 PM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Wolf Paulus.
Original Post: Generation vs Reflection
Feed Title: Wolf's Web Journal
Feed URL: http://wolfpaulus.com/feed/
Feed Description: Journal - dedicated to excellence, and motivated by enthusiasm to trying new things
Latest Java Buzz Posts
Latest Java Buzz Posts by Wolf Paulus
Latest Posts From Wolf's Web Journal

Advertisement
The country seems to be sharply divided more than ever. There is the current leadership, favoring preemptive wars, to pro-actively generate and compile before the fact - on the other side there are the two almost equally named challengers preferring to reflect over what has happened in recent history and trying to respond dynamically with never seen before flexibility.

No, this is not about the upcoming election of the 44th President of the United States. I am taking about two different sides chosen by Software Developers, trying to find solution for some of today's most interesting problems.

The big gorillas a.k.a. Microsoft and IBM are still trying to promote code generation, demoting software engineers to "assistant to the generator": the pure slaves that need to work with generated code know all too well the generated ToDo comments and the infamous comments that read like this: /* .. automatically generated. Do not edit! .. */

Microsoft was even granted a patent (US Patent No. 6,748,582), covering the technology that integrates certain comments left in the source code of an application under development.

IBM is probably the other most dominate proponent of code generation. Its developerWorks site features countless code generating projects:
- Data binding: Code generation approaches - JAXB
- Using XML and XSL for code generation
- Code generation using XSLT
- UML, XMI, and code generation
- Java programming dynamics: Replacing reflection with code generation
- XML and Java technologies: Data Binding JiBX Usage
- etc.,
Don't be surprised to find Dennis M. Sosnoski behind several of those projects and articles, he seems to be the hero in code generation space.

Microsoft, with its long C and C++ heritage, doesn't seem to have have much of a choice. Neither the information left in the compiled code nor the runtime information available to the currently executing code come close to what's available in Java byte code and information provide by the Java Virtual Machine at Runtime.
IBM's push in this direction on the other hand still remains a mistery to me, but so was their move dividing the already weakened Java community by introducing and pushing SWT.

Reflection (the process of looking at an object at runtime to understand its features and properties) and Introspection (the process that discovers a class' features and properties) are two of the most powerful features provided by the Java language and runtime.
For instance, when used in the Web Services - SOAP problem space, Java Reflection and Introspection can help creating highly dynamic and robust solutions. Code generators can perform their tricks only at compile/build time while Reflection 1000 works its magic at runtime. Make use of it.



Read: Generation vs Reflection

Topic: "Commodity" in the Tech World Previous Topic   Next Topic Topic: Java Technologies Switching on Layers with Scripts

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use