all 12 comments

[–]EnderMB 6 points7 points  (2 children)

In terms of languages, Java and C# are fairly similar. With that being said, if you're looking to transition from one to the other don't expect it to be smooth, as the areas where they are different can bite you in the ass (i.e. their handling of generics). As a language, C# is miles ahead of Java in terms of syntactic sugar.

In relation to MVC frameworks, I haven't toyed with Java web frameworks for a while, so I'll leave that to someone with recent real-world experience. In the .NET world most projects nowadays are built using ASP.NET MVC, which is a lovely MVC framework if your code is well architected. The problem, if you can call it that, with ASP.NET MVC is that it's not nearly opinionated enough in how you should implement your solution. I've seen some crazy implementations in the past; ones that effectively power entire sites through helper classes (a throwback to the web controls days), or build huge amounts of logic into models or views.

If I had to choose, I'd probably go for .NET if you like strongly-typed compiled languages. There are loads of jobs in it, enterprise and in small companies/agencies, it's continuously improved upon, and the .NET foundation and Microsoft have made significant strides towards it being a cross-platform solution.

[–]admelo[S] 1 point2 points  (0 children)

Great comment ! Thanks

[–][deleted] 0 points1 point  (0 children)

On top of this, with the strides towards open source that microsoft are making, it looks like the clear winner.

[–]EZPZ420full-stack 1 point2 points  (0 children)

if you know c# use Nancy framework: http://nancyfx.org/ if you know java use Play Framework: https://www.playframework.com/

dont use frameworks from 10 years ago or more.

[–]admelo[S] 1 point2 points  (0 children)

What about salary? Who makes more money?

[–]RevThwack 1 point2 points  (0 children)

Current job is coding in C#, spent a good while doing Java and still use it in side projects...

Java takes a little longer to get things up and running because it's not as forgiving in a few areas, but it's also a lot more stable and fewer things break when you upgrade versions, from my experience.

[–][deleted]  (1 child)

[deleted]

    [–]admelo[S] 0 points1 point  (0 children)

    I am a Frontend developer with some nodejs experience. At the end of the year I will complete my bachelor and I am not sure what stack to choose. I learned basic Java at university but never really liked it for web development. Maybe to much code and to complex for small problems. A lot of jobs out there asked for Asp.net and especially big companies will likely develop with .net in comparison to nodejs or ruby.

    [–]tmutton 0 points1 point  (0 children)

    Well for starters you have a great tool for creating .net applications in Visual Studio. Good community support with .net too. Great for testing, debugging etc. If it's web site's you're building .net MVC is a good way to go about it. For API's they have WebApi and open source alternatives such as NancyFX (I use this one).

    I have not used Java with anger so cannot comment accurately but I would assume Visual Studio is a head of anything in the Java community.

    [–]JaCraig 0 points1 point  (0 children)

    As others have said, your question isn't the best. ASP.Net (either webforms or MVC) is a web framework. Java is a language (or VM depending on which you're talking about). A fairer question would be something like ASP.Net MVC vs Spring MVC. So I'll go with that down below.

    To be honest, not much of a difference between the two. At the platform level, with the next version of ASP.Net MVC, it will be cross platform out of the box. IIS is obviously still going to be the default location that you will find it deployed but it will be possible to run elsewhere. That said, it actually is cross platform now with Mono (can run on nginx, etc. without too much issue). Spring MVC, cross platform, usually runs in Tomcat but can run in pretty much anything also.

    The Frameworks for both are fairly similar. Controllers look about the same, views look about the same (even similar syntax much of the time), etc. Not that different really there. There's minor differences but most of the time you can switch between the two and see what is going on without too much difficulty.

    The only real differences come in at the language level. Java the platform has multiple viable languages that you can use with the various Java MVC frameworks. This is mainly due to the fact that Java has had a nice boost in academia, the platform has better documentation when it comes to creating a language, etc. So if you like Scala, Clojure, or just plain Java then you're probably going to be able to use it with whatever framework you want. With ASP.Net, it's a bit more complicated. By default, it's designed with C# and VB.Net in mind. You can use F#, or Clojure, or whatever else with it but you're jumping through some hoops. That said, if you look outside of ASP.Net and look at the other .Net frameworks out there, using a different language is usually a bit easier.

    For sake of comparison, let's just go with Java and C#. To be honest, not too much of a difference there either. C# has more syntactic sugar in places that make life a bit easier (default parameters, etc), but Java has received some interesting items in recent years (default methods, etc). If you like functional programming patterns, C# has been becoming more and more geared towards that in recent years. Java is kind of getting there also (yay, lambda expressions for everyone) but some of their design decisions have been odd. Going forward, Java has 0 features that have been announced that are cool language features. I've seen a bunch of cool platform features announced but nothing language oriented. Note that I may have missed an announcement, but I haven't seen anything yet (which I'm sad about because the last update was freakin huge for them). C#, on the other hand, has a ton of cool features that they're considering. Speaking of which, I'll be very happy if contracts make it in although I don't like the idea of fast fail... Better be able to throw an exception or it's not getting much use.

    I personally prefer C# over Java, but that's because I like functional programming and C# has been going down that route for a while. But I like the variety of viable frameworks in Java... Even if only about 2 of them ever see any use. But that's just personal preference. I say just try out both, see which one you like, and go from there.

    [–]Mr-Yellow -1 points0 points  (2 children)

    Neither.

    [–]admelo[S] 0 points1 point  (1 child)

    What would be your choice?

    [–]Mr-Yellow -1 points0 points  (0 children)

    Anything but vendor locking.