Has anyone created a Java Bean from Dolphin Smalltalk Code?
(or any smalltalk dialect?) Is this possible? What is involved? Thanks in Advance, Steve |
Steve,
> Has anyone created a Java Bean from Dolphin Smalltalk Code? > (or any smalltalk dialect?) > > Is this possible? What is involved? In part it depends on what sort of Java Bean (stupid name!) you want to create. Many Beans are intended for use as visual components (like ActiveX controls), others do not have GUIs. If you want to use Dolphin to create an element of a Java GUI application, then I think you will have some problems. The biggest is getting Java and Dolphin to agree about who owns the window and runs the input loop ;-) It's essentially the same problem as is involved in using Dolphin to implement visual ActiveX controls -- and as far as I know there is no pre-packaged way of doing that. I know that some people have created COM components with Dolphin which have GUIs, but I've assumed that they don't /share/ the Dolphin windows with any others in the application (but maybe I'm assuming wrong). If that problem can be solved, then you have the separate problem of getting real window handles out of Java so that Dolphin can put sub-windows inside it. You can use the "AWT native interface" (an extension to JNI) to get a handle of a Windows Canvas to paint on, but I don't know whether Dolphin (or any other Smalltalk implementation) would be capable of working with just that (I think that Dolphin wouldn't, but I'm not certain). OTOH, if you can work out how to create a true visual ActiveX control in Dolphin (or another Smalltalk -- maybe ST-MT can do it) then there are ActiveX<->Java bridges which I think you could use to create the implementation of your Bean (or maybe even would do all the work for you). If your Bean doesn't share windows, or you are willing to reimplement the GUI part in Java, (or your code doesn't use a GUI at all), then I suggest looking into creating a COM object with Dolphin, and then using one of the COM<->Java bridges to create your Bean. Another possibility might be to use some sort of Web-Services-based architecture (such as SOAP), or even a roll-your-own solution built directly on TCP/IP. But that does depend on you being able to run Dolphin as a separate process, which I guess isn't what you are looking for. So, sticking with the COM/ActiveX idea, there are a number of bridges available, some commercial (J-Integra seems to be mentioned most often on comp.lang.java.programmer), and some free. Here are some commercial URLs, in no particular order. I haven't used /any/ of these things, and I haven't heard much about most of them either, so I can't comment on quality/reliability/completeness. http://j-integra.intrinsyc.com/products/com/ http://www.jniwrapper.com/ (the server is down as I write this) http://www.ezjcom.com/ http://www.alphaworks.ibm.com/tech/bridge2java http://www.jacozoom.com/en_jacoZoom.shtml And some non-commercial (which I also haven't used at all). As far as I can tell, none of them can handle visual ActiveX controls. https://com4j.dev.java.net/ http://danadler.com/jacob/ http://www.nevaobject.com/_docs/_java2com/java2com.htm http://www.nexb.org/open-source-it-asset-management/Wiki.jsp?page=Jcom Oh, one last possibility. You might be able to translate your Dolphin code into something which will run on a JVM. To the best of my knowledge there is currently no really /solid/ way of doing that, but two suggestions may be worth a little investigation. One is that Jun-for-Java http://www.sra.co.jp/people/nisinaka/Jun4Java/index_en.html appears to have been implemented primarily in VW, and then sort of hand-translated into Java using lots of Smalltalk-like support libraries. The other is Bistro http://bistro.sourceforge.net/ BTW, you may be wondering why I'm not taking the chance to push my JNIPort. The answer is simple -- JNIPort is designed to allow me to embed Java code into a Dolphin application, it doesn't work the other way around. -- chris |
Chris...
Great Help! Yes, I will investigate these COM/ActiveX -> Java Bridges. This may be what we are looking for. Thanks, Steve Chris Uppal wrote: > Steve, > > >>Has anyone created a Java Bean from Dolphin Smalltalk Code? >>(or any smalltalk dialect?) >> >>Is this possible? What is involved? > > > In part it depends on what sort of Java Bean (stupid name!) you want to create. > Many Beans are intended for use as visual components (like ActiveX controls), > others do not have GUIs. > > If you want to use Dolphin to create an element of a Java GUI application, then > I think you will have some problems. The biggest is getting Java and Dolphin > to agree about who owns the window and runs the input loop ;-) It's > essentially the same problem as is involved in using Dolphin to implement > visual ActiveX controls -- and as far as I know there is no pre-packaged way of > doing that. I know that some people have created COM components with Dolphin > which have GUIs, but I've assumed that they don't /share/ the Dolphin windows > with any others in the application (but maybe I'm assuming wrong). If that > problem can be solved, then you have the separate problem of getting real > window handles out of Java so that Dolphin can put sub-windows inside it. You > can use the "AWT native interface" (an extension to JNI) to get a handle of a > Windows Canvas to paint on, but I don't know whether Dolphin (or any other > Smalltalk implementation) would be capable of working with just that (I think > that Dolphin wouldn't, but I'm not certain). > > OTOH, if you can work out how to create a true visual ActiveX control in > Dolphin (or another Smalltalk -- maybe ST-MT can do it) then there are > ActiveX<->Java bridges which I think you could use to create the implementation > of your Bean (or maybe even would do all the work for you). > > If your Bean doesn't share windows, or you are willing to reimplement the GUI > part in Java, (or your code doesn't use a GUI at all), then I suggest looking > into creating a COM object with Dolphin, and then using one of the COM<->Java > bridges to create your Bean. > > Another possibility might be to use some sort of Web-Services-based > architecture (such as SOAP), or even a roll-your-own solution built directly on > TCP/IP. But that does depend on you being able to run Dolphin as a separate > process, which I guess isn't what you are looking for. > > So, sticking with the COM/ActiveX idea, there are a number of bridges > available, some commercial (J-Integra seems to be mentioned most often on > comp.lang.java.programmer), and some free. Here are some commercial URLs, in > no particular order. I haven't used /any/ of these things, and I haven't heard > much about most of them either, so I can't comment on > quality/reliability/completeness. > > http://j-integra.intrinsyc.com/products/com/ > http://www.jniwrapper.com/ (the server is down as I write this) > http://www.ezjcom.com/ > http://www.alphaworks.ibm.com/tech/bridge2java > http://www.jacozoom.com/en_jacoZoom.shtml > > And some non-commercial (which I also haven't used at all). As far as I can > tell, none of them can handle visual ActiveX controls. > > https://com4j.dev.java.net/ > http://danadler.com/jacob/ > http://www.nevaobject.com/_docs/_java2com/java2com.htm > http://www.nexb.org/open-source-it-asset-management/Wiki.jsp?page=Jcom > > Oh, one last possibility. You might be able to translate your Dolphin code > into something which will run on a JVM. To the best of my knowledge there is > currently no really /solid/ way of doing that, but two suggestions may be worth > a little investigation. One is that Jun-for-Java > http://www.sra.co.jp/people/nisinaka/Jun4Java/index_en.html > appears to have been implemented primarily in VW, and then sort of > hand-translated into Java using lots of Smalltalk-like support libraries. The > other is Bistro > http://bistro.sourceforge.net/ > > BTW, you may be wondering why I'm not taking the chance to push my JNIPort. > The answer is simple -- JNIPort is designed to allow me to embed Java code into > a Dolphin application, it doesn't work the other way around. > > -- chris > > |
Free forum by Nabble | Edit this page |