Cross language C # and Java development

Can you give me some advice on how best to ensure that two applications (one in C #, the other in Java) are shared and when exchanged? Are there any problems you are experiencing?

The scenario is point to point, one host is the service provider and the other is the service consumer.

+2


source to share


9 replies


Have a look at protobuf data interchange format. NET implementation is also available .



+3


source


JSON for descriptive data and XML for generic data types. If that's not efficient enough for you, you need to flip your own codecs to handle the byte difference between C # and Java .



+3


source


Rather than focusing on a specific technology, the best advice I can give is the time it takes to interface between the two (be it a web service, a database, or something else entirely). If it's a web service, for example, focus on creating a clear WDSL document. Interface, interface, interface. For the most part, try to ignore the specific technologies at each end, outside of some prototypes, to ensure that both languages ​​support your choice.

Also, outside of large checkpoints, don't focus on efficiency. Focus on clarity. You will likely have two teams (i.e. different people) working from both ends of this interface. Making sure they use it correctly is much more important than doing things a little faster.

+2


source


If you have Java as your webserver you can use Jax-WS ( https://jax-ws.dev.java.net/ ) to create webservices and WCF for .Net to connect to Java webserver ...

+2


source


You can use something like XML (which is not always that efficient), or you need to come up with your own custom binary format (efficient but much more efficient). I would start with XML and if bandwidth becomes an issue, you can always switch to native binary.

Something like SOAP (Wikipedia) is supported by both C # and Java.

+1


source


We use C # / VB.Net for our web interfaces and Java for our fat client. We use XML and web services to exchange data between database and application servers. It works really well.

+1


source


Make sure you use a well-defined protocol for transferring data and recording tests to ensure that applications respond as contracted.

0


source


This is such a broad question, but I would recommend focusing on the standards that apply to both platforms; XML or some other standard form of serialization using REST for services if they need to interoperate.

0


source


If you are using XML, you can actually supplant your data access as XPath statements, which can be stored in a shared resource used by both applications. This is the beginning.

0


source







All Articles