views:

1294

answers:

6

We are thinking about combining .NET technology with Java technology (WCF, JBoss/ESB, MOM, WPF, WF) and I need to have a high-level idea of what are the apples and oranges in the .NET 3.5 and Java worlds.

Does anyone know of a good, clear article or better yet a simple chart which answers questions such as:

  • WCF in the Java world is __
  • the equivalent of WPF in the Java world is _
  • the closes thing to JBoss in the .NET world is _
  • the JVM and CLR are essentially the same except for these differences: ....
  • in the Java world you don't have the concept of WF/WCF/WPF, instead you have ....
  • there is no "LINQ" in the Java world yet, but you can use ___
  • the closest you get to ADO.NET Data Services in the Java world is ....

I'm not looking to debate this so I'm not looking for "fighting points", I just need a neutral what-is-what chart comparing the two worlds.

+3  A: 

It´s really difficult to find good information about this, even more difficult finding up to date information. Most of it is about .NET 1.1 or 2.0.

Anyway, I will provide here some links that might be of your interest:

Hope it helps! I will keep updating this whenever I stop by some useful info.

Ricardo Nolde
Great links, thanks for posting them.
duffymo
+4  A: 

I don't know of a good, clear chart, but I'll venture some answers to your questions. (Warning -- I'm a J2EE developer, and the last time I did Microsoft programming it was with classic ASP and VB 6. I won't be able to evaluate the MS technologies, but I do have a good sense of a lot of the Java equivalents.)

  • WCF: WCF seems to be about simplifying Web Services. The J2EE equivalent would be Apache CXF, which uses annotations available in the JAX-WS 2.0 spec to simplify the creation of Web Services.
  • WPF: This one's easy. Microsoft's technology looks like a straight-up rip-off of JavaServer Faces. I can't tell you which one is better, but they resemble each other a lot. EDIT: I was too quick off the mark with this one -- JSF doesn't work on the desktop, like WPF is supposed to. The underlying technologies are similar, but JavaFX may be the better comparison.
  • JBoss in .NET: Someone else might want to set me straight, but I feel fairly safe saying this doesn't exist. Think about it. You're asking for a free, open-source product to run a proprietary, non-free specification. If you go with Microsoft, you're stuck with IIS just as much as you're stuck with Windows.
  • JVM vs. CLR: I found a paper, available here, that suggests there is little or no difference between the two. A lot of the argument between the two that I've seen centers on the weaknesses (real or perceived) of Windows as a server technology.
  • What the Java world has instead of WF/WPF/WCF: Now here's where, to my mind, the Java world has real benefits over MS. There are countless frameworks out there, so you're bound to find something that suits your needs (for free!). You can use Spring MVC or Struts 2.0 or Wicket. For your database layer, you have a choice of Hibernate or Ibatis. Look at this list of Web Services frameworks. Java has a total of nine frameworks listed. Microsoft has one: WCF.
  • LINQ's Java Equivalent: Again, someone can correct me, but I'm not sure there is an equivalent. Advantage Microsoft.
  • ADO.NET Data Services: This is doable in Java through JPA and RESTful Web Services, but I imagine it's a little easier in the MS world to implement.

There's another area where I perceive Microsoft to be creeping ahead of the Java community: they're making some smart investments in functional programming, while Java folks are bickering pointlessly about the best way to add closures to Java. There are likewise some emerging technologies -- OSGi, namely -- to handle the overwhelming complexity involved in the sheer number of Java frameworks out there. Since MS has tighter control over their domain, it's easier for them to deal with their various components.

And then there are the human considerations: who you can find to work what technologies and how much hiring for X will cost versus hiring for Y. But that's true no matter what you choose.

Hope this helps!

rtperson
enlightening answer, the WPF / JavaServer Faces comparison was a surprise, what is then XAML in the Java World? Also, is there a product(s) that solves the designer/developer dichotomy as well as Blend / Visual Studio?
Edward Tanguay
There are definitely a few things that WPF brings to the table that JSF lacks. JSF can't do desktop apps very well -- not surprising, considering Java has to support all desktop platforms. And support for designer tools has always been very poor in JSF. MyEclipse has some tools, (continued)
rtperson
... but they're not particularly useful. But the core of the two technologies seems very similar: an XML-based, component/widget toolkit. You may want to take a look at JavaFX, a direct competitor to Silverlight, and probably a better comparison.
rtperson
(continued) And from what little I've seen of XAML, I'm underwhelmed. JSF and IceFaces have been using XML Namespace extensions in this way for a while now, just without the cute rhymes-with-YAML name.
rtperson
"What the Java world has instead of WF/WPF/WCF"None of this three technologies are directly related with web frameworks or database layers. WF is a workflow framework and execution engine for long-running, persistent transactional bussiness processes; WPF is a desktop UI framework; and WCF is a communications framewrk and infraestructure not only for web services, also includes REST services, .Net remoting, named pipes, message queues, and a provider model for custom extensions.
Rafa Castaneda
A: 

IMO there are too many frameworks for Java. Same problem with the dozens of Linux Distributions...

Sure can say the same for .NET but it's just clearer. that is my .02

Funny, I get frustrated with the .NET/MS philosophy of "this is how it's done, do it our way or go away!".
Joachim Sauer
I agree. There's a very definite downside to having a large central entity decide what works for you. When I was an MS developer, one of my biggest frustrations was that if MS wanted you to use it, you had no alternatives, even if the technology was bad, buggy, or just plain didn't work.
rtperson
As a .Net dev, I think choice is good. I'm surprised how often MS stuff is a re-invention of an existing tool which has been around forever and is often ported from Java.
danswain
Sure, MS is always happy to push some of it's solutions over you, but you always have choices. They do not hinder any attemps in creating software and different solutions based in the .NET infrastructure. I have used many different tools and frameworks so far as a C# dev, without any drawbacks.
Ricardo Nolde
A: 

On rtperson's post:

.NET has NHibernate and iBatis.NET. Not as good as their Java counterparts, it seems, but good enough.

In fact, there are plenty of open-source projects on the .NET side: Castle Project (MVC, IoC), NUnit, Spring.NET... And let's not forget Mono as a open-source implementation of the core .NET framework.

A: 

I am a programmer who has done C++, Java and now C# development.

Here is my answer to the initial question:

WCF = EJBS/J2EE server (e.g. JBoss)

WPF = Swing (JavaFX)

JBoss = I don't think WCF needs a server, just runs in the .net runtime. Not sure about this though, still learning. JVM vs CLR: CLR can do everything JVM can, but CLR can also: run unmanaged code, separate one process into multiple logical ones (AppDomains). Has very good C++ intergration compared to java, CLR is just better. Language c# is also better than java (Lambda's, delegetes, Expression trees, references, structs, extension methods, partial classes, generic without boxing. They did a very good job here!) but only runs on windows.

WF=don't know if it exist, might

Linq = Currently cannot be implemented in Java because you need: Lambda's, Expression trees and extension methods

ADO.net dataservices: I don't know of something simular in java but this could be easily implemented. Probably exists in some opensourse project.

Having done both this is my conclusion about how they relate:

.net is easier to learn, very much so, yet equally powerful. The reason for this is because there naming of methods in api's is more consistent, there solutions are better integerated and some api's are designed much better (WPF is an example of this, can't say this for other api's, still learning). Because of this .net programmers will cost less.

Developing an app in c# will be 1.5 to 2 times faster than in Java. There IDE (visual studio) feels better. You can extend it in 20 minutes, no shit! Trying to understand the eclypse extension mechanisms is not an easy task! Eclipse code refactoring functionality win's one leg. Visual studio win's on many others. (Commercial plugins may be available?)

When using .Net you may have to pay licences, for the operating system, and for IIS. For the database you could get away with MySQL.

For java you will not have to pay licences. However in reality you mays still have to. Serious applications run an Redhad or some other none free OS. The web server may be completely free. Also these systems are harder to manage, so your administrator will probably cost more.

I am a java certified developer (92%), also webservices certified (JSP, servlets, 87%) and web component developer certified (EJB's, 82%). I am also a microsoft certified developer (90%) and a certified WPF developer (90%). Java exams are harder than microsoft exams. This is because java exams ask many childish irrelevant question's. Like what is the correct method name to persist an object: SaveChanges(), PersistChanges(), EmitChanges() or SendChangesToDatabase(). Anybody knows that knowing the method name is not usefull. You IDE will provide you with the correct name. And if you truly had methodnames so simular to each other, than you have a very bad and confusing api! What matters is that you know why you call it! Microsoft exams focus more on the why that the how. In my opinion microsoft exams really help you to be a better programmer. Java exams are also usefull, but more like studying a phone book; it's very hard but useless.

In summary I believe C# is technicaly superieur (would be logical since they learned a lot from java and bought the smartest people in the world to write it). You will pay more on licenses but probably less on people.

It's late, i'm tired and don't feel like rereading. I should, I know. But won't. I don't have a spellchecker here so there may be many typo's. My first is language is Dutch, my second French and my third is English (I live in Belgium, we are complicated), so I guess I'm allowed some typo's right? :)

Hope this provides some clarity for you.

NIck