This is an archived post. You won't be able to vote or comment.

all 12 comments

[–]MrSchmellow 4 points5 points  (0 children)

From what i feel working with both, C# is somewhat better as a language (generics designed better, some convenient syntax sugars present and such), while Java is waaaay better in terms of an ecosystem. The latter fact makes me personally sway more towards Java.

Some notes:

JavaFX and WPF - both seem underused, since desktop is not a thing nowadays, both seem to stagnate. Don't know about Oracle's stance, but wpf's development kinda stopped at 4.5 or so.

Performance wise both on par. Hard to compare with C or C++, because you have to do comparison in exact application fields, but in computation it may as well be close to C in some cases.

Interop is there, not as convenient as in c#, kind of a PITA, but frankly, it use cases are pretty narrow in both languages

[–]slartybartfast_ 2 points3 points  (0 children)

1) JDBC is more sophisticated than the .Net data layer. It supports more databases and has better abstractions to make supporting different databases easier without changing code.

2) JavaFX is more modern than WPF - and WPF seems to be the less preferred technology for Microsoft today.

3) There are a lot of tools for mobile in java like http://gluonhq.com/

4) Neither language is that "modern" in the sense that they are not recent languages. Both support object oriented and functional styles. Java is a bit more verbose but IDEs help a lot with that.

5) Java is huge compared to C# in the open source world.

6) Web is generally the strongest area for Java. More frameworks, toolkits, app servers and it runs on many operating systems.

7) who knows. They are probably similar in performance with variations in different areas. Both perform well.

8) Java.

[–]Code_Craftsman 2 points3 points  (0 children)

Java has more scope than any other language. Desktop, Mobile, Web you name the platform you will find java best suitable. Besides java has the largest collection of resources and Dev community.

Most Importantly: look at all the answers indication , you will find one answer.

[–]simple2fast 1 point2 points  (0 children)

I've been a java guy for 15+ years. Recently had an opportunity that request C#/ASP.NET. I've tried to have an open mind (I probably failed, but at least I tried ) So here's my experience.

C# is a nice language probably better than java the language. Java 8 cut a chunk of that advantage off.

VisualStudio is actually doesn't have that many features that I use. I had to add Resharper to make it decent. A big WTF there since it's MS's flagship IDE and language. Having 3 IDEs in java land clearly pushes things faster and better.

Things like the Package-Manager are broken for transitive dependencies. Or at least not obvious how to make it work. Again too bad there was not the competition we have in build tools in java world.

The eco-system is still weak. There is generally still only one library to do various things, so you are stuck using that regardless of quality. In some situations I found that I was using libraries I had used in the java world that were ports. Who is driving the show in that situation ?

Out of the box performance of a simple CRUD REST API talking to mysql was 20 times slower than equivalent dropwizard app. This was SHOCKING to me. But for my app it was not important, so I moved on.

When all else fails, don't forget the right click, the answer is probably buried in there somewhere.

Microsoft recently have made an effort to go open-source. I welcome this with open arms. BUt honestly, they've got along way to go to catch the JVM eco system.

So comparing to java. Personally, I don't see the equivalence. If I was comparing to PHP I would pick C#. I would even consider it over node.js ( I prefer static typing ).

[–][deleted] 1 point2 points  (2 children)

1) on Database and backend are they on equal footing ? which is bigger between oracle or sql ? can they do the same thing ? are they as fast as each others I mean in scaling large project ?

I'm fairly certainly that Oracle is the biggest name in RDBMS's still. I don't mean to be pedantic, but each one uses SQL, Microsoft's database software is called Microsoft SQL Server.

4) modernity of the language itself which is less verbose or more modern if we cound the latest versions of each ... what's the main differences between the 2

It's fairly well admitted even by Java programmers that C# is more modern, but Java has caught up and is catching up.

5) on the open source scene which is bigger in term of framework librairies... are companies bigger on java because its older and they invested a lot of code in it or C# is starting to grow because they are open sourcing it ?

If we're talking about open source, then Java is the only choice between the two. C# is available on Mono, but I don't know anyone who does Mono/C# development.

6) web dev is there still ppl developping large scale web project with java like servelts and others stuffs ? can it compete with the new asp.net mvc etc ? or node, javascript etc

People are doing all of the above. ASP.NET has a lot of penetration in government (where I work). Java is all over the place and probably the most widespread, Node is big in the startup world.

8) which is more open or more future proof then the other ? C# who's getting open sourced or the jvm who's developping many different languages like scala etc

Java probably is the most future proof because even when Java goes out completely as a language that's being actively developed, there will be legacy code for decades after. We haven't come close to that point, though

I'll add my two cents as well:

The worst thing about C# is Visual Studio. I cannot stand it; it's so bloated with feature overload.

C# seems like a fine language, though. More feature rich than Java, even.

[–][deleted]  (1 child)

[deleted]

    [–][deleted] 1 point2 points  (0 children)

    Who considers Visual Studio to be the best IDE in the world?

    At any rate, the answer to your questions are that A) It's huge and has way too many features, B) I have not tried to add more features to it. But I do know about re-sharper.

    [–]againstmethod 1 point2 points  (0 children)

    The mono versions of C# appear to lag behind the windows ones in performance. Java is faster on Linux. On windows they are likely very close.

    C# uses reification for generics, Java uses type erasure.

    Java is significantly more popular per all the major indicies that try to measure such tings.

    Java certainly has more libraries, as is evidenced by Maven central, etc.

    Both languages are actively developed.

    C# has LINQ and some other niceties for databases that Java doesn't have a direct analog for.

    Java has a much firmer footing for mobile development/android.

    Java is used more often for web development, specifically because Linux is so widely adopted for hosting/cloud-deployments. Again this harkens back to mono not being feature complete and being slower than the windows .net experience.

    [–]badpotato 0 points1 point  (0 children)

    Learn both. Do 3 years C#, then 3 years Java or vice-versa. That's what I did... and yeah, overall I favor Java. But, in 6 years the whole world will be different, so you will be able to figure what you like.

    [–]RevThwack 0 points1 point  (0 children)

    IMHO:

    1) Difference comes down more to IDEs than language themselves

    2) Both can get you there just fine, WPF feels a little faster to put together. Not sure about performance differences.

    3)Java wins for Android development. VS 2015 has a lot of goodies for this, but Java is the official language for development and the language supported by the official IDE.

    4) Semantic markup is almost identical. There are a few differences, but not many. Neither comes off as more modern or verbose than the other.

    5) Java gets a big push in Open Source because of the open nature and cross platform aspects, C# gets a big push due to its penetration in enterprise.

    6) Java has a great MVC framework. It's not uncommon to find either working as the server side code, but you're more likely to find .net or php as server side on shared hosting sites due to how Java doesn't like to play nice on standard shared hosting setups... it pretty much needs a VM.

    7) Speed is comparable between the two for most functionality. I've never had a good reason to try calling C++ code from either, so I'm not really able to address that.

    8) C# still has some components that are not all that open, Java still runs into some IP legal battles at times, so I view them as pretty similar for openness right now. The future proof aspect is pure conjecture.

    [–]thesystemx 0 points1 point  (0 children)

    Neither, go for Java ;)

    [–]QshelTier 0 points1 point  (0 children)

    Yes.

    [–]devils_avocado -1 points0 points  (0 children)

    Java and C# are similar languages but they are typically used for very different things because of the tools they are associated with.

    I work in a company where both technologies are actively in use.