Java Binding
John Moeller <[email protected]>
| Newsgroups | gmane.comp.lib.boost.langbinding |
|---|---|
| Message-ID | <[email protected]> |
OK, here goes. I never did find out if this is still the proper place to submit stuff like this, so I'll assume it is. I guess I'll give it a couple weeks and repost on devel if it doesn't get any traction here. As the subject states, I'm interested in a Java language binding. I've read up as much as I can follow on this list (in particular, the Java/JNI sub-thread off of the Ruby discussions), and I've read the following documents: http://www.boost-consulting.com/writing/oopsla04.html http://www.boost-consulting.com/writing/langbinding.ppt Extreme_Object_Models_Using_Boost.Python.pdf (from BoostCon) The last one got me really excited. This is *exactly* how I like to use JNI currently (at my workplace), but I basically do this by hand, along with a wrapper library that I created to help with the process. So I'll get to the point. I would love to see a Boost.Java, but I know that Dave and Daniel have been drawn away from the project by other (very important) concerns. I would like to help in any way that I can. I have a good amount of JNI experience, and I think I'm qualified to at least do some of the grunt work. Now, I understand that doing a langbinding-related binding for Java may not be in the cards. I wasn't even able to find any langbinding source; it's been deleted from the Sourceforge tree, and it's not in the SVN tree or the Boost File Vault. Does it exist anywhere? I'd love to at least play with it. Even if this isn't possible at this time, I think that a Java binding would be beneficial to the community. JNI is notoriously difficult to wrangle, and a high-class C++ binding would be appreciated by quite a few, especially if it were to come from Boost. There are other bindings out there, but I like the style of interface offered by Boost.Python and Luabind, and having something similar (that is, would have a similar interface to these others) I view as advantageous. So, to sum up, I have a few (ok, many) questions: 1. Is Langbinding something that will return in the near future? That is, is there still interest in pursuing the project? (I understand that this is a hard question to answer.) 2. If so, I know that it wouldn't be as dynamic as the Python or Lua bindings, but is a generated Java source file something that could be accepted, at least in the near term? I know that there were discussions about special class loaders and such, but doing that would probably be out of my depth (at least right now; Java bytecode is something that I intend to study in the future). However, I envision an interface whereby you could query a module for its Java source, or you could maybe adapt it to generate a class file on the fly, or maybe even something more sophisticated. It should be possible to abstract something like this. In fact, now that I think about it, there are methods to define a class file from a byte stream in ClassLoader (it's called defineClass, in fact). You could maybe have a native method for a class that's always available, temporarily rebind it to an implementation defined in the module, and that module calls something that produces the byte array full of bytecode necessary for calling the class-definition method. I'm probably getting way ahead of myself, though, and I don't even know if that would work. 3. If Langbinding is more of a long-term return goal, or it has been shelved permanently, would creating a Java binding be a worthy effort? There are many such efforts out there; does it have a place in Boost? If so, should it look like Boost.Python or Luabind? Should it have its own identity? Would it be advantageous to try to code it to the Langbinding interface, so that it could be adapted were Langbinding to be revived? Regardless of the answers to these questions, I think that I'll try to at least invent something that aspires to be a Boost.Java, even if I don't ever submit it. :) Thanks for giving me your attention, I'm looking forward to your replies. -- John Moeller [email protected] ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/