tags:

views:

407

answers:

5

I am not sure exactly what I am asking....The guys that do the software development for the company I work for write everything in VB. I am currently the Web developer for this company and I specialize in Flex apps. I am thinking about expanding into their area. But I do not want to do VB, I don't mean to bash on VB but the coding syntax is not for me. So I am wondering if Java can integrate with VB? Also not sure if it matters but I think everything they do is procedural, and I will be doing OOP.

Thanks.

A: 

Not really. Java uses CORBA for interop, and VB uses COM for interop. You may be able to make a bridge using JNI, but I understand that can be quite the pain.

C. Ross
Please comment to tell me what's wrong.
C. Ross
+2  A: 

Potentially they could expose a service layer via soap or something simpler? Also you could always work against the same database with different languages however unless most of the logic is in stored procedures (not necessarily recommending this approach) then you end up with repeated code.

yieldvs
+2  A: 

There are lots of integration opportunities, but before examining them, if I were you I would re-examine the question itself.

It should be exceptional to introduce a new language into an established project. The desires or aesthetic preference or skillset of a single developer is not a good enough justification to do so. Introducing a new language into a project should be a strategic decision for the project, not a backhanded one.

If you do choose to expand the core languages used to develop the system,

  • COM interop
    is possible with JACOB. I believe IBM has a bridge as well.(Check alphaworks)
  • Java-.NET bridging
    is possible via JNBridge and other bridges. This makes sense only if VB.NET is in use.
  • SOAP, XML document exchange, REST
    suitable over a services boundary. It requires TCP or HTTP or some network protocol.
  • common data stores
    can serve as a rendezvous point. Both Java and VB can read and update data in SQL Server, Oracle, MSMQ, MQSeries, and so on. Even a filesystem can be an integration point.

Think of data format as related to, but ideally independent of, the integration mechanism. What I mean is: You can use an XML document for integration, whether it is stored in a database, or sent over a REST interface, or stored in a filesystem, or put/get on a queue. You can use a comma-separated file over any of those mechanisms as well.

Cheeso
A: 

You could bridge the two using a C/C++ adapter to map JNI calls with COM. But that would be horrible. I hope there is a better solution, but my understanding is that it is pretty hard to integrate .NET code and Java as both vendors (Sun and Microsoft) don't have any incentive to streamline that kind of development.

Decapsuleur
Sun and Microsoft have had a long-running joint initiative working on Java+.NET interop. There are people working fulltime on this in both companies. As part of the interop cooperation, Microsoft delivered the keynote at J1 in 2009.
Cheeso
I didn't know about that. Sorry.
Decapsuleur
A: 

I haven't done this by I believe you have the following options:

  • Use the Java-COM bridge, as VB uses COM. This library was already mentioned here several times
  • If you are using VB.net, you probably use hessian, As it has both Java and C# implementations.
David Rabinowitz
The web page for Hessian describes it as a protocol; it is more/different. Hessian implies a data serialization format, as well as a library and API set. It does not appear to have a VB6 binding. Hessian seems to me to be a very nichey answer to a problem that has already been answered in more general, accessible ways. Web services or REST, for example.
Cheeso
I agree, but it has the advantage of simplicity, relative to Web Services. We use in a combined PHP/Java application
David Rabinowitz
Regarding VB6, this is why I mentioned JACOB
David Rabinowitz