tags:

views:

306

answers:

2

Hi,

I would like to ask for some ideas regarding a scenario like this:

1) we need to build up a real time application that runs on a client. Some sort of stock trading functionality, updates pushed to few clients in different geo locations every 25 secs. 2) the data is collected and pre-processed on the server side (Glassfish/Java)

We have been discussing options and narrowed down 2 options: 1) WPF on the client 2) Swing (we previously evaluated JavaFX)

What are your thoughts on:

1) easiness/speed of development of an "medium" complex client application in Swing vs. WPF 2) communication between WPF and an app server. If we would have a monolithic solution (Java), there are more options for hight throughput data exchange like Java Messaging, without going through some .NET to Java bridges or sending data across via XML, webservices etc.

Any thoughts welcome.

Thank you

A: 

Regarding communication between WPF and an application server, you can use all of .NET's messaging facilities, specifically including Windows Communication Foundation. However, WCF does not have out-of-the-box support for binary messaging to Java (see http://stackoverflow.com/questions/107076/does-wcf-play-well-with-java for discouraging info) so you would need to use XML, a custom transport that could be supported on both ends (such as MQ) or a bridge.

(Can't help with the comparison of WPF vs. Swing, as I have no experience of Swing.)

itowlson
+3  A: 

Swing vs WPF

I've done extensive work using both Swing and WPF. Swing is at least a whole generation behind WPF. There really is no comparison. WPF's data binding and templates make all the difference. You will save a lot of time and money, and end up with a much better user experience if you use WPF.

NET Framework connection to Java back end

Regarding using NET Framework on the front end against a Java back end: It is extremely easy to do and will generally perform as well as a pure Java solution. The exception would be if your main bottleneck is network bandwidth and you are serializing complex trees of objects.

As itowlson noted, WCF doesn't talk Java's proprietary binary protocols, but there are still a lot of choices that can be used to talk to Java: XML, JSON, text (REST). I generally recommend good old-fashioned XML Web Services. It takes about two minutes to set up WCF to talk to a simple Java web service.

XML Serialization typically only adds 5-10% to network bandwidth over binary, so unless you have a lot of complex data and your pipe is very tight, I would just use WPF/WCF talking directly to Java on the back end. If you do have lots of data and a tiny pipe, you still want the WPF front end because it is so much better than Swing, but you might consider using the WCF binary formatter over the wire and doing the conversion on the server.

Ray Burns