Reputation: 1216
I have seen a few examples where the architecture is that there is java on the server side and c# on the client - what makes this combination so good? why would .net on both sides not be a better choice (or in fact, java on both sides?)
added later: in lots of cases, the java is hosted on a windows server itself, i think via tomcat (not 100% sure) - what's the motivation here?
Upvotes: 8
Views: 5958
Reputation: 75376
On the server side Java has proven to be robust and scalable and it is available on platforms that .NET can only dream about. Hence if you want the most choices in hardware Java is an excellent choice - this includes very large machines with many CPU's as well as lots of clustered cheap x86 boxes.
If you have .NET on the server side you must use Windows, and Windows simply doesn't scale well hardware wise.
Upvotes: 1
Reputation:
Fortyrunner, I haven't seen a single benchmark where a hotspot JVM will beat MS CLR.
Upvotes: 0
Reputation: 12782
As far as Java is concerned two things
Upvotes: 0
Reputation: 1062945
Most servers are either Windows or *nix based. So at the server, either Java or .NET/C# (via mono on *nix) would be perfectly good.
Java has better support for different client devices, but in many ways that requirement is being replaces by the much better HTML support at most clients - at least for online devices.
For a installed client application, then arguably Java has the better portability - but with things like Compact Framework, Micro Framework, Silverlight, etc .NET is catching up.
Personally (due to job role), I care mainly what is at the server; .NET/C# has never let me down - but I'm not a Java developer, so I can't contrast directly. From work on open source projects I know there is a good community of people out there using mono on the server.
At the client, tools like WPF offer a first rate GUI experience, with .NET's support for winforms being useful for regular windows apps. But since a lot of the WPF architectureis common with Silverlight (with Moonlight as the mono twin for *nix etc), this allows the experience to be used on non-Windows clients too.
Upvotes: 0
Reputation: 533530
Java is considered more mature, which is a good attribute for a server, whereas C# has better integration with/similar look and feel to windows and office (which the clients like)
Upvotes: 2
Reputation: 4543
Java is frequently used on the back-end (and has become the de-facto standard) for a number of reasons:
C# has great tools and libraries for designing UIs in Windows. Java's operating system (OS)-independent nature provides fewer tools for the particular quirks of an OS's UI, whereas C# is designed and maintained by Microsoft, for the purpose of writing Windows applications.
Upvotes: 19
Reputation: 74802
Well, there are a lot of cases where .NET is used at both ends (and I would guess ditto for Java). But my guess for the motivation behind Java-server/.NET-client architectures is that the application is targeting Unix as the server OS, either for cost or reliability reasons, or because it needs to fit into an existing Unix server environment (e.g. working closely with existing Unix apps), but is targeting Windows as the client platform. (I think Java is probably much less common where Windows is also being used as the server platform; no figures to back this up though.)
If a Unix server OS is assumed, then Java is a very productive choice, well supported with lots of libraries but with a larger developer base (at least in "enterprisey" environments), and more "management" recognition, than alternatives such as Perl, Ruby or Python.
Conversely, .NET is the better fit for the Windows client, because it has much better support for building Windows GUIs. It's not just the tooling: the Java GUI APIs themselves (e.g. Swing) tend to prefer cross-platform similarity over a native look and feel, and therefore tend to result in apps that don't look or behave like Windows applications. (I am generalising a bit here -- sorry!)
Upvotes: 5
Reputation: 11306
Data interchange formats like JSON make it far less important that the systems on either side of the connection are the same low level technology.
Java is a very well tested and supported language for servers, whilst C# has great tools for building GUI's.
Upvotes: 3