77

I work in a shop that is a mix of mostly Java and .NET technologists. When discussing new solutions and architectures we often encounter impedance in trying to compare the various technologies, frameworks, APIs etc. in use between the two camps. It seems that each camp knows little about the other and we end up comparing apples to oranges and forgetting about the bushels.

While researching the topic I found this: Java --> .Net rough equivalents

It's a nice list but it's not quite exhaustive and is missing the key .NET 3.0 technologies and a few other tidbits. To complete that list: what are the near/rough equivalents (or a combination of technologies) in Java to the following in .NET?

  • WCF ~=
  • WPF ~=
  • Silverlight ~=
  • WF ~=
  • Generics ~=
  • Extension Methods ~=
  • Lambda expressions ~=
  • Linq (not Linq-to-SQL) ~=
  • TPL ~=
  • F# ~=
  • IronPython ~=
  • IronRuby ~=
  • ...have i missed anything else?

Java Technologies (are there .NET equivalents?):

  • ~= EJB
  • ~= WebSphere
  • ~= GlassFish
  • ~= JBoss App Server
  • ~= Tomcat?

Note that I omitted technologies that are already covered in the linked article. I would also like to hear feedback on whether the linked article is accurate.

Note: This seems to be turning into a wiki-type article so i marked it as such.

Paul Sasik
  • 79,492
  • 20
  • 149
  • 189
  • 1
    +1: great question, well asked... and it put you at 5555 rep. How could I not? – Matt Ball Mar 26 '10 at 19:18
  • +1: agreed, great question and one I've love to learn the answer to. – elduff Mar 26 '10 at 19:21
  • +1, suggestion: what is the equivalent of EJB, WebSphere, GlassFish or JBoss Application Server on the .NET platform? – mjn Mar 27 '10 at 18:56
  • 1
    @mjustin: great addition. i'm also thinking Tomcat. Is that a valid addition comparable to .NET? Is it still in use? – Paul Sasik Mar 29 '10 at 13:38
  • Tomcat is a Servlet container. A very 'lightweight' IIS running ASP would be its .Net counterpart – mjn Mar 29 '10 at 18:27
  • 1
    Damn! Presentation matters a lot. I asked the same question 1 year back when I newly joined SO. But my question was closed saying its not a real question. Out of humiliation, I've deleted that question. – claws Aug 04 '10 at 23:09

7 Answers7

48

.NET --> Java

Java --> .NET

  • EJB ~= MTS/COM+
  • WebSphere AS, GlassFish, JBoss AS are all concrete Java EE API implementations. The .NET equivalent would be IIS with at least MTS/COM+ support (is there by the way competition for IIS?).
  • Tomcat is a webcontainer aka servletcontainer, it only implements the Web Component part of the huge Java EE API (basically only the javax.el and javax.servlet parts, the JSP/EL and Servlet API). The .NET equivalent would be still IIS, but then without support for MTS/COM+, mail, message queue, persistence and more. I.e. only a simple web server for pure "Classic ASP".
Eng.Fouad
  • 115,165
  • 71
  • 313
  • 417
BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
  • 1
    i like this answer but i'm not sure about the WPF ~= Swing comparison. Those are the two frameworks i've actually touched between .Net and Java and i'm not sure that they're all that similar. Could you expand on that comparison? (Thanks for all the links btw. i'll be following up on them over the next few hours. This answer is definitely a candidate for acceptance. Adn once i follow up i'll fold the answers into the body of the original question.) – Paul Sasik Mar 26 '10 at 20:21
  • 7
    I'm not sure to what extent the comparison WPF ~= Swing is true. I know it's not meant to be an exact comparison, but the greatest part of WPF is its declarative nature, so I would consider WinForms ~= Swing a better comparison. – Rafa Castaneda Mar 26 '10 at 20:39
  • Agreeing with Rafa. Though Swing does seem force some patterns whereas WinForms is pretty wide open. – Paul Sasik Mar 26 '10 at 20:51
  • Little inaccuracy: the RI of JAX-WS is JAX-WS RI, not Metro. Metro = JAX-WS RI + WSIT. – Pascal Thivent Mar 26 '10 at 22:40
  • @Paul and @Rafa: WPF is indeed more than just UI. I've expanded the answer. @Pascal: I removed Metro van the answer. – BalusC Mar 27 '10 at 03:57
  • ja ik zie dat :) Nice answer BTW. – Pascal Thivent Mar 27 '10 at 07:37
  • @BalusC: You're right, so for the sake of precision you should add Java RMI to the WCF comparison as you can use .Net Remoting bindings. – Rafa Castaneda Mar 27 '10 at 19:54
  • @Pascal: hey, I accidently inserted a Dutch word in my comment! For others: `van` should have been `from`. @Rafa: valid point, added as well. – BalusC Mar 28 '10 at 00:24
  • I would say SWING is more like WINFORMs than WPF – jle Mar 29 '10 at 14:07
  • Isn't JavaFX closer to WPF than Swing? The programming paradigms encouraged by WPF and Swing are far apart. For one, Swing isn't declarative. – Sayo Oladeji Nov 26 '15 at 23:56
14

Here is a list from my own research and follow up on BalusC's, Rafa's (et al.) answers:

(Slowly updating this list. Will also provide links back to .NET technologies for Java folks who may be interested.)

Paul Sasik
  • 79,492
  • 20
  • 149
  • 189
  • I'd be interested in .NET equivalents for GWT, Maven2/Nexus/Sonatype, JMX – David J. Liszewski Mar 29 '10 at 14:55
  • Nice. i'll add them to the list. – Paul Sasik Mar 29 '10 at 15:18
  • @DavidJ.Liszewski GWT ~= WebSharper (but this is quite a rough analogy, historically Microsoft didn't have any tools that would cross-compile to JavaScript); Maven2 ~= MSBuild + NuGet; Sonatype = Sonatype Nexus or a number of other NuGet server implementations * JMX ~= WMI (Windows Management Instrumentation) – DmytroL Jul 13 '16 at 20:01
6

JavaFX is the rough equivalent of Silverlight. That's all I know from that list...

Dave Swersky
  • 34,502
  • 9
  • 78
  • 118
3

The main technologies are already covered, so a few peripheral technologies:

  • TPL ~= java.concurrent package
  • F# ~= Scala
  • IronPython/IronRuby ~= Jython/JRuby
  • .Net Remoting ~= RMI
  • MEF/System.AddIn ~= OSGi/Jigsaw
Rafa Castaneda
  • 812
  • 1
  • 7
  • 13
3

To the growing list I submit:

David J. Liszewski
  • 10,959
  • 6
  • 44
  • 57
2

The Linq equiv in the Java world is Quaere - http://quaere.codehaus.org/

Jonathan Holloway
  • 62,090
  • 32
  • 125
  • 150
1

If I've understood correctly, Lambda expressions in C# are "loaned" from functional languages and as such there's no direct equivalent in Java (at least for now), however LambdaJ gives you something similar in the meanwhile.

Esko
  • 29,022
  • 11
  • 55
  • 82
  • Nice find. It's a 3rd party plug in of sorts (correct?) but seems to provide the similar functionality to .NET lambdas. – Paul Sasik Mar 26 '10 at 20:34
  • It's a library, not a plugin. ...well, I guess the semantics are quite the same but anyways. And yes, Java has been around for a long while, a lot of useful thing are in 3rd party libraries and frameworks instead of Java itself. – Esko Mar 26 '10 at 21:03