[jVizFramework] Java Visualization Annotation Framework

Project name: Java Visualization Annotation Framework

Linkshttp://code.google.com/p/jvaf/

License:  LGPL

Contactguruqu@gmail.com

Status:  Active



Abstract:

This is one idea i come up with recently. The ultimate goal for this framework is to allow developers to build the view by describing how they want to visualize their program on the screen and let the framework do the rest for you instead of  implementing "View" code themselves   :D. 



For now the framework did this by using Java Annotation to describe the mapping between the objects and function calls inside logic code with the corresponding representation inside the visualization module. The user code can run by itself as ordinary Java code with no visualization, or can run through the framework and the Annotation embedded inside the code will be used to guide the framework to translate the execution of the code into the visual representation.



Needless to say the visualization part of this framework is using JME2. For now this framework is in concept proving phase. So i really need to hear some constructive or non-constructive :wink: ideas from you.  If you are interested please visit the project homepage for more information:

http://code.google.com/p/jvaf/



I also write a very simple code that use this framework to illustrate the idea.  :wink:

http://code.google.com/p/jvaf/wiki/simpleexample



Thanks.





Used API:

:smiley: JMonkey Engine 2

:smiley: JME Context

:smiley: JME Ogre XML Reader

:smiley: JavaAssist



Active Member:

Only me myself so far.




I think it could be a good idea, injection frameworks are the new trend and for good reasons.



A thing that worries me and surely everyone else is performance. How do plan on doing it? Rewriting classes during runtime could be expensive specially during game play. Maybe it's not that expensive and it's not being done all the time so it would just add a little extra time when loading?



Anyway, an alternative not quite known is to do some bytecode engineering, that would be changing the bytecode of an already compiled .class file. Through reflection one could find the annotations and add or edit code in there. It would be like doing a second pass of the compiler and could be added to the ant build script used to compile your code once the framework becomes usable. This approach leaves us with no runtime penalties and the satisfaction of happy coding (unless there was some dynamic stuff going on that you were planning to do).



Another idea I would like to share would be to add resource injection, that would remove a lot of clutter from the code and allows resources to be managed in one place making it much easier to handle. Check out Fuse project: https://fuse.dev.java.net/ to get the idea.



Adopting this idea would require changing the project's name I guess, I would suggest an expression we use here in Uruguay, the translation would be "Monkey with syringe", used when someone is given something or is in charge of something and is probably not a good idea to entrust it to that person, I think it would be really funny even though some people will think twice about using the framework :stuck_out_tongue: (remember that we are talking about Serious Monkeys so it's not that dangerous).

hey,

i've added your project to the Projects Overview.

Would u mind to change your codename a bit, because just [Framework] is maye a bit too general.

I mean sth like [jVizFramework] for example. i chose this for the ProjectOverview



And sorry, that this post has no "constructive or non-constructive ideas"…

One last information request… are u recruiting dev's?

Tomygun said:

I think it could be a good idea, injection frameworks are the new trend and for good reasons.

Glad to hear somebody is with me.

Tomygun said:

A thing that worries me and surely everyone else is performance. How do plan on doing it? Rewriting classes during runtime could be expensive specially during game play. Maybe it's not that expensive and it's not being done all the time so it would just add a little extra time when loading?

Okay, the binary code is modified somehow in order to get wired with the animation system. But injecting itself won't be too much overhead at this point. The framework inject code into the target class through a modified classloader ( Provided by JavaAssist) which means the modification/injection is done on the fly during class load time.  Talking about the overhead of the injected code at runtime, true that some call back functions are injected at certain locations, but those functions are simple, it won't hinder the execution of the main code.

Tomygun said:

Anyway, an alternative not quite known is to do some bytecode engineering, that would be changing the bytecode of an already compiled .class file. Through reflection one could find the annotations and add or edit code in there. It would be like doing a second pass of the compiler and could be added to the ant build script used to compile your code once the framework becomes usable. This approach leaves us with no runtime penalties and the satisfaction of happy coding (unless there was some dynamic stuff going on that you were planning to do).

Yes, i actually thought about this. But the drawback for this would be that the system is wired at compile time instead of runtime.  The advantage of wiring system at runtime would be the same bytecode can be executed either with or without the visualization. It would be helpful for those headless applications (like servers.) And runtime wiring allows our system to be completely transparent to the client code ( except for some little annotations which doesn't participate into execution).  And since the injection is only done once by class loader, the runtime penalty is negligible. The other advantage wiring the code at runtime is that if we refactor the system, recompile of target code is not needed.

Tomygun said:

Another idea I would like to share would be to add resource injection, that would remove a lot of clutter from the code and allows resources to be managed in one place making it much easier to handle. Check out Fuse project: https://fuse.dev.java.net/ to get the idea.

Good point, we can implement this and use it in the Visual Element Resource library to specify the resource used in scene object instead of hard coding the resources name needed.


Tomygun said:

Adopting this idea would require changing the project's name I guess, I would suggest an expression we use here in Uruguay, the translation would be "Monkey with syringe", used when someone is given something or is in charge of something and is probably not a good idea to entrust it to that person, I think it would be really funny even though some people will think twice about using the framework :P (remember that we are talking about Serious Monkeys so it's not that dangerous).

Haha, nice bloody name. Will think about it .
Thanks for all those nice suggestions.  :lol:

.:emp...imm0|82:. said:

hey,
i've added your project to the Projects Overview.
Would u mind to change your codename a bit, because just [Framework] is maye a bit too general.
I mean sth like [jVizFramework] for example. *i chose this for the ProjectOverview*

And sorry, that this post has no "constructive or non-constructive ideas"..
One last information request.. are u recruiting dev's?


Sure, jVizFramework works for me. Though I need to think a name which better fits this framework. 
About recruiting, it would be no at this phase since this project is still at idea collecting and concept proving phase. But if anyone is having any suggestions or ideas on the future roadmap for this framework, you are warmly welcomed to participate.  :)