Hacker News new | past | comments | ask | show | jobs | submit login

Can someone comment on how .NET platform + tools compare?

As someone who is not invested in either camp, between the two, .NET seems like a much better place to be invested in right now.

Edit: Thanks a lot for the replies, I'm much better informed.




I had about a decade in both, and really they're two very different worlds. From a code standpoint I'd much rather be in C#. It's one thing that MS has done really, really well over the last 10 years. They've taken a pretty aggressive stance towards adopting new features and although it's become fairly complex as of 4.0 and on, it really has some great features, some functional-inspired things like closures and collections api stuff that reminds me of Ruby in a lot of ways, and a great web framework in MVC that is honestly almost as fun to code for as any of the open source web frameworks out there. If you had to choose between one of the big J2EE stacks and MVC, no question, MVC is far, far better. The infrastructure is still a big 'ol MS GUI world, and I'd rather do <badPainfulThing> than spend a lot of time configuring and deploying IIS apps, but then TomCat and WAR files et. al. ain't exactly fun either.

Java's JVM/bytecode infrastructure on the other hand has undergone a renaissance as a VM platform for a lot of very cool languages: Scala and Clojure being the two big examples there. But that's Really not the same thing as Java, obviously. And there's Android -- a completely different ecosystem, and somewhat truncated as a Java dialect, but still basically the Java language and able to employ most of the libs you're used to having: Guava, Guice and so on. No dynamic code gen, which stinks, but I know why they did it. So if you have Java under your belt and want to get into mobile stuff, that's a huge plus.

So, as a general-purpose language skill, Java is still really, really important to know and will have legs for a long time to come. ASP MVC is a great framework, and if you can't work in something like Django or Rails or the like, it comes in nice 3rd or 4th place in terms of making for general coder happiness. C# is a far more progressive and interesting language than Java, but that's a philosophical difference between the gatekeepers of the two languages: Java intentionally moves slow for the sake of stability and continuity, C#'s minders have apparently embraced a little of the 'move fast break things' attitude of some parts of the open source world. I prefer the latter, but understand the rationale of the former.

Me, I'm a Rails coder these days but also get to hop back into Java for Android dev and the rare foray into ASP work and they all have strengths and tradeoffs and they'll all be around a long time. The only thing I think I would avoid on principle, for my own sanity, is any enterprisey J2EE framework. That truly does feel like a massive leap backwards.


Agreed with this. I used to code C# for a living but have moved on- however, I'm now playing around with MonoTouch in my spare time and I'm loving using C# again.

MonoDevelop is a poor man's Visual Studio, but it's a lot less demanding and runs on OSX. Backend frameworks like Nancy.fx are really great for being even simpler versions of MVC, too.


I was shocked how well MonoDevelop worked out when I used it briefly a couple of years ago. But my expectations were pretty low -- I was expecting a compatibility quotient something close to Wine circa 2001, and got instead a basically functioning C# environment on my Mac, which was pretty dang cool.


So how do you propose we do enterprise stuff?

What's wrong with the latest version of Spring or JEE (please remember this is NOT J2EE).


I never used Spring as a framework, although I did use it as a general purpose IOC tool, so I can't really speak to that. I much prefer Guice these days if I need IOC for Java. XML config is clunky and heavy and although was a good choice at the time for Spring, has not aged well.

I'm sure Spring would make dealing with beans a lot less painful. I know there's more to J2EE these days than Beans and WebSphere and the whole early-2000s debacle that frankly gave Java a bad name and enabled the rise of php and Rails and the like.

Struts is Struts and never really appealed to me. Wicket looks more lightweight but still seems config-heavy. I think that's the one thing, from a coding standpoint, that makes even contemporary Java still feel 15 years behind: configuration hell. It's just part of the whole Java mindset, that it's never really shaken (even in Android!), that a major part of my coding life should be spent configuring the framework. C# and .NET has moved away from that more and more and to me it's a much better environment for it. This is all subjective tho. YMMV.

So what do you use? What makes you happy in the Java world these days (I'd really like to hear).


It appears you haven't really done enterprise Java for a long time.

For a start, J2EE is history, anything using J2EE is a legacy project. JEE6 is the latest Java Enterprise Spec and it's fairly lightweight, you have to use almost zero xml configuration (everything is annotations) and you and you can turn a plain old java object into a bean with just one annotation (@Stateless) and you can even inject beans anywhere with just one annotation.

The same is true for the newer versions of Spring, pretty much no XML config required anymore.

I use JEE6 and Spring, these are as powerful as ever but with less and less actual implementation nightmares with every release. They have looked at the other frameworks and stolen all the best ideas in their latest form.

Play! for java is also a great framework although it doesn't have much adoption by anyone I care about.


Awesome, thanks for that -- and no, I haven't done enterprise Java in a while. If one could swap out Spring with Guice (annotation-driven as well), sounds like a framework I could live with. I do appreciate the move away from configuration files to annotations that a lot of Java frameworks seem to be embracing.


+1 for Spring not aging well

The only thing that makes me happy in the Java world lately is Scala. It has it's flaws but is much more pleasant that old school Java.


> XML config is clunky and heavy and although was a good choice at the time for Spring, has not aged well.

You don't need to use XML its just an option now. Annotations work well.


Stop using the word J2EE please :)

J2EE is horrible.

JEE is awesome.

Comparing J2EE with ASP.NET MVC is not fair just as I would compare ASP.NET with JEE or Spring MVC :)


Fair enough. I was pleasantly surprised how much ASP MVC had cribbed from Rails, and it sounds like I'd likely be similarly enthused about new JEE developments. I have noticed the trend towards annotation-driven development and moving away from configuration in Java frameworks and heartily approve.


Sinatra -> JAX-RS (of JEE 6)

Rails -> Spring MVC (albeit we still don't have a mature ActiveRecord but I concur that the Java world prefers the Repository pattern a'la DataMapper/Merb)

The whole Rails ecosystems is pretty much:

1) Spring MVC

2) ORM (Hibernate/JPA2 or one of the newest tool is Spring-Data)

3) Maven == bundler + rake + gem

4) JUnit

5) Some sane folder structure


I've been a professional Java developer for just over 2 years now. Let me give you a simple example.

The three leading Ecommerce platforms (Oracle ATG, Hybris and IBM WebSphere) are all done in Java.

There is huge demands for Java developers working on Web and Enterprise systems the world over. The average Salary for Java developers is pretty high in most places (london and Sydney) and the day rates you can charge as a contractor are very good.

There also seems to be more open source and technical community in Java.

I am glad that I went down the Java route.

also, Most Java development jobs nowadays focus on the web and server side stuff, this is followed by mobile (such as android) and embedded (such as TIVO boxes).


I went from writing client-server code in Java to writing similar things in .NET.

After two months of C#, I remember thinking to myself, quite clearly, "Oh, thank God, the nightmare is over."

Debuggers that worked. Native calling systems that actually interoperated well. A set of classes that weren't horribly overdesigned and under-implemented.

Best of all, no culture that insisted on factories that made factories that made factories.

Writing Java on phone platforms is fine. But the enterprisey stuff is death on roller skates.

Hey, if you can stand it (my cousin does), then you might make a bunch of money. My cousin spends six months hacking Java for a bank, then six months vacationing. I prefer to do stuff that doesn't make me contemplate washing dishes for a living again.

.NET has its warts, but it's not cancerous the way Java turned out to be in the hands of the architecture astronauts.


Interesting experience you have.

I have spend most of my career doing Java6 JEE6 and modern Spring and it all feels quite modern. I did a lot of C# at University and it is a good language and platform but I don't think it's better than Java. New / modern Java is fine, it's old java that you want to avoid.


If you ever try any of the modern stuff (django, rails, play, grails, any node.js framework) in depth, j2ee / Spring and java just feels old and ancient. Spring has gotten better over the years, but there's still just too much work and too much unnecessary complexity and cruft with Spring. It's really telling when even Spring's creator jumped ship to work with TypeSafe and jvm7 has huge improvements designed for other languages.

imo C# is an improved java, but C# open source ecosystem is just anemic compared to java.


I actually like old and ancient. That means all bugs have been fixed already. Systems become complex quickly enough and you need to use the most boring bricks imaginable if you want to build something sturdy.


> I actually like old and ancient. That means all bugs have been fixed already.

By that logic everyone would still be using Cobol or Fortran for new development. Moreover neither Rails, Django, or Grails are brand spanking new anymore. Those projects are mature. If you don't want to stray too far away from the jvm comfort zone, Grails is actually built on top of Spring and Hibernate and it's still maintained by the Spring team.


I'm not sure which debugger you use to debug Java code but I can do local _and_ remote java debugging via Eclipse.

IntelliJ supports JavaScript and JSP debugging as well.

Client-server development using EJB 3.x is way much better, cleaner, and simpler than .NET, sorry, this is something that I don't think you can argue elegantly.

.NET culture when it comes to open source is sub-par while Java is very rich. Spring, Tomcat, Jetty, Hadoop, HBase, Eclipse, NetBeans, Maven, Ant, the list goes on. These are mature and high profiled open source projects wherein .NET I have never seen an open source project reached that level of acceptance.

While Java has this sub-culture of factories that made of factories. .NET has this culture of fighting with the latest and grandest libraries that Microsoft launched once every 6 - 12 months.

Enterprise .NET is not at the level of Java yet (compare Message Queue, remoting, security, and other capabilities .NET are still lagging).

.NET has its cancer in its own way.

I honestly believe that you have not used Java that deep professionally.


"Oh, thank God, the nightmare is over."

The nightmare for me has been over in the mid-nineties, when I discovered Unix through Linux.

There's no way I'll ever be going back to working on Windows. I'd rather go work as a plumber or a truck driver (not that there's anything wrong with that) then have to work on Windows ever again.

C# / F# might be interesting, but using any Windows as my OS is a big no-no. Never this nightmare again.

And, nearly 20 years later, the great thing is that a lot of devs previously working on Windows are now working on OS X (anybody disputing that trend is a fool).

Major win for Unix with both Linux and OS X. Not to mention all the devices running either iOS or Linux / Android.

The nightmare is over: Windows shall never be the OS powering all these servers and devices out there and hence .Net shall never be the dominant platform.

It's not that .NET has its warts (it does), it's that Windows has its ugly warts and I'll never ever be using that inferior OS ever again and I'll never ever again will be forced to deploy on an Microsoft stack.

In the mid-nineties I considered quitting IT. And Linux saved me. And now OS X. Thanks.


I wouldn't go this far myself, but I deeply sympathize. I developed an inordinate level of familiarity with the Windows ecosystem for 10 years. I could tell you which registry keys did what for which COM components <shudder/>. Then I rebooted my technical self into Mac/Linux/Ruby and would have to scream into a pillow for 20 minutes before I'd be able to open up a windows command line again. Although I did do a bit of PowerShell when it came out and -- wait for it -- it was actually pretty nice. But still, the overall OS is such an odd beast in retrospect.


In other news, the mid-nineties were a long time ago.


Well, you can write C# without having to develop on windows through the Mono framework, and Xamarin's products - http://xamarin.com/

These days, you can be a C# developer without having to do an ounce of "Microsoft Stack" programming if you didn't want to.


Java isn't what it used to be. The products written in Java are slow, bad looking and less secure. The days of Java are anyways numbered.


That's an incredibly ignorant response and you have no idea what you're talking about.

Java looks bad? You're probably talking about certain swing applications which are now very rare on the desktop.

Java is slow? You clearly have no idea how fast the JVM can interpret and JIT java nowadays.

Java is insecure? You're mainly talking about applets which are an ancient technology on their way out (slowly). In terms of actual JVM security. Every product has its security issues.

You seem very ignorant, your java experience is probably from the past e.g. J2EE1.4 and old swing apps.

Modern Java is an good language on a great platform. There's a reason why it runs some of the worlds biggest ecommerce sites and worlds fastest trading desks.


While I think the parent was overplaying it, I do find most of the Java applications on my mac are slow and irritating to run.

Pycharm is an example of one of the apps I am talking about. It just feels like it struggles at times, eventhough I have a fairly new machine.

Java was the first language I learned while going through college but I find the verbosity to be irritating.


Desktop java is dead. Actually desktop anything that's not web is going to end up dying. The server is where the languages will duke it out next and Java is fine there. C# is also fine on the server. The nice thing about Java is it easily runs on linux and has many OSS libraries to help quickly standup server applications.


The best way I can think to phrase it is "in-browser VMs are dead". This covers Java, Flash, that one Microsoft had for a while, and anything else that uses the browser plug-in mechanism to load heavy frameworks.


Your experience is not necessarily because Java is slow. It could just be the applications you are running that are slow for reason that have nothing to do with the language.

Swing is probably going to be slower (maybe?) than some native windowing framework.

But Java as a language running on the JVM is certainly not slow.

I've just been looking up pycharm and it seems that the slowness issues are to do with things like opening files and doing parsing. These things are likely to be slow for anything but the language they are written in.


Most people are exposed to Java via enterprise monstrosities.

It depends on your POV. I've had to deal with an enterprise Java crapware app that was essentially a terminal emulator for an old mainframe... except that it required more than 4GB of memory on the desktop to work appropriately.

The mainframe itself has 2GB of RAM.


Although you are taking heat for saying they are less secure, this is mostly true. Specifically, it is the JVM that has major security problems, not the apps themselves. This is not so much a fault in Java but in Oracle's implementation and their longstanding failure with security.

Fun fact, several Windows versions have included a security mitigation technology called ASLR (Address Space Layout Randomization) that breaks a large majority of exploits and raises the bar significantly. Exploit developers and penetration testers love Java, because any machine that has it installed (most of them) breaks ASLR, re-enabling all of those exploits that Microsoft had otherwise mitigated.


I hate to say it, but you have absolutely no idea what you are talking about.


Most applications written in Java these days don't have UIs.


> Java isn't what it used to be. The products written in Java are slow, bad looking and less secure. The days of Java are anyways numbered.

Shorter: "I only know anything about client-side programming."


You got a lot of replies already, but let me join the crowd.

Disclaimer: Was a Java guy, working with C# exclusively now by day (F# and Clojure - not Clojure-Clr - are my pet languages at night).

In my opinion the languages (specifically Java vs. C# now, ignoring other languages for now) started out really, really close when C# was new. C# gained a lot of nice features, while Java was - euphemistically - 'stable'.

Thinks that made my day and made every sporadic try to get back to Java (or work on Android) a chore: .Net events, properties (later automatic properties), usable generics, delegates, yield based generators/enumerators and the reason they were added: LINQ. Type inference aka 'var'. Basically every release brought half a dozen interesting features (and new technology, WCF/WPF/Silverlight/Workflow), while Java was sleeping as far as I could tell.

I understand the latest release of Java now came closer again, but C# is still quite ahead in my opinion.

Tooling: Visual Studio. Now, I'm not a total fan and some releases are better (2008, 2012) than others (2003, 2005, 2010), but it's a decent tool for most all your developing needs and ranges from free to 'includes the kitchen sink and costs $$$'. It supports three languages out of the box (F# is very interesting and a fully supported language!).

I like IntelliJ and sympathize with the Eclipse project, but for me the VS experience is more streamlined, simple and nicer in general.

Libraries: If it's _really_ popular in the Java world, you'll find a port (think nhibernate, log4net) or something equivalent.

I wouldn't want to go back (C# -> Java), but I DO have the jdk around for Clojure (and I'm still watching Scala from a distance).


Eclipse has rich plugins that even Visual Studio can't touch.

(Maven) m2clipse alone is a very good reason to learn Eclipse.

You can't download 3rd-party library with Documentation _and_ Source Code _and_ Navigate to the code without having to setup anything _and_ included in your build like you would have in.NET.

It's a big plus for incorporating and debugging code when you need to do so.

I've done C# and now fully Java (and JavaScript) and I wouldn't go back to a more locked and dumbed-down ecosystem.

C# the language may well be better than Java but that alone is not enough of productivity boost.

Eclipse, Maven, FindBugs, CheckStyle, Jenkins, Tomcat, Jetty, rich 3rd-party ecosystems are the key of my productivity boost.

VS.NET, NuGET and having to write either MSBuild or NAnt plus IIS (express or not) aren't cut it. Not enough to be agile.


Okay, I love Eclipse (technically). It's just a dog, most of the time and tries to be everything at once. Still, it _is_ a great project.

Maven: I .. never got that one. I guess the parts that make sense to me are covered by nuget. But I might be totally ignorant here.

CheckStyle -> StyleCop ? Jenkins supports .Net Tomcat makes no sense in this list for me. IIS? Jetty: See above? Maybe the ASP.Net dev server, depending on why you'd list jetty?

I rarely feel the need to do a lot in msbuild files. I might add build tasks (StyleCop?), but that's about it. Deploying is not in scope here (and for that I'd probably go for WiX. Not a huge fan of MSI, but that's what the platform uses and what other tools can manage).

I appreciate your opinion and read your sibling post, but I guess we're both a bit ingorant of the other guy's platform?

Jenkins: https://wiki.jenkins-ci.org/display/JENKINS/MSBuild+Plugin Sonar (mentioned in your sibling post): http://www.sonarsource.com/products/plugins/languages/c-shar...

Incidentally the Sonar page for C# lists a couple decent code quality tools for the .Net side of things.

But in the end if will remain a matter of taste & experience and I'm very certainly biased.


Won't argue about Eclipse performance. Sometime it depends on the characteristic of the project.

Some of the projects that I worked on, albeit huge, Eclipse still performs pretty nice. While in other instances I do notice issues with the performance.

Tomcat and Jetty make a lot of sense if you use it with Maven. The ability to compile, deploy and bring up your App Server is something that you don't get for free in .NET

http://mojo.codehaus.org/tomcat-maven-plugin/deployment.html

mvn clean install && mvn tomcat:deploy <-- win

NuGET only deals with dependencies but doesn't deal with packaging, running unit-tests, running integration-tests, running PMD/CheckStyle/FindBugs as part of your build.

All of these things are important for CI/Continuous Delivery.

Oh almost forgot this one: JavaFX 2 may be way behind of .NET WPF but JavaFX 2 comes with a tool that can generate installer for OSX App Store (will bundle JRE automagically), Windows, and other platforms. WiX can't do that.

I may be ignorant of some of the .NET stuff but as of 2010 - 2012, the last time I used .NET, .NET is still lagging behind Java when it comes to tooling.


> Tooling: Visual Studio.

It's a decent tool but I think the alternatives for other platforms are either equal or better. imo MS is typically playing catchup in this area now.

> Libraries: If it's _really_ popular in the Java world, you'll find a port (think nhibernate, log4net) or something equivalent.

This is what truly makes .NET a no go for me. There's just too few non-paid and open library equivalents compared to almost any other platform. Not mention the libraries in other platforms tend to have more features. The .NET open source community is still pretty small and weak, and I just don't see that changing (even with CodePlex it hasn't really had any drastic changes).


For the newest versions of Windows (Server 2012, Windows 8) .NET comes installed -- I forget if it's installed by default or installs as a Windows component. If it's the latter you install it from the same screens you install IIS or the SMTP server from.

After you install it updates to the .NET framework show up in the "optional" windows updates.

There are certainly standalone installers as well: http://www.microsoft.com/net/download

But if you're producing client-side software that's dependent on the .NET framework then you most certainly will make your installer "bootstrap" the installation of the correct framework for your OS language and hardware.


You never have to worry about drive-by installers with .NET updates - security updates just come down with Windows Updates.

.NET is seeing a small renaissance with ASP.NET MVC and what the Server teams are putting out, but Java is also gaining popularity again as a way of running Rails apps quickly and with Scala.

Both platforms have enough legacy apps out there for a lifetime of maintenance work, if that's your sort of thing. Cleaning up after outsourcing companies is lucrative.


In terms of just the languages themselves, .NET is very solid. C# is definitely a better version of Java, and the rest of the # languages in general are decent or good.

However, the .NET open source ecosystem (while greatly improved from years back) still really really sucks. Historically, this is directly MS's fault (codeplex helped but it still will never be able to undo the damage MS did early on). I just think it's a waste of time having to reinvent wheels that pretty much every other major platform (Java, PHP, Ruby, Python, etc...) has plenty of. I always hate having to do extra work that I feel is entirely unnecessary, which happens a lot on .NET.


I used to intern at MS and have used .NET platform for a while (on and off, including not too long ago doing a bit of ASP.NET, ASP.NET MVC, and Sharepoint for one-week project). I've used VS.NET 2005, 2008, and 2010.

I've also used Java for a while, the whole Spring MVC, JEE6, Eclipse, IntelliJ.

If you're willing to live in Windows OS platform, you should go with .NET, no question asked. Forget about tooling and everything else.

If you want more flexibility, more choices, etc, Java is your choice. (There's also Python, Ruby, and the rest but let's scope it to Java).

.NET culture is heavily influenced by the culture of Microsoft which means:

1) Less Open Source, More mISV (more "pay" products)

2) Windows/GUI, less command-line (has changed a bit but still not there)

3) Fire and Motion http://www.joelonsoftware.com/articles/fog0000000339.html

#3 is important because MS makes money from tooling as well. When I was there, the internal chatter was "tool will be out of date every 2-3 years". Please make your own conclusion.

Some people said Java had this period of "sleeping" which was true. But during that time frame, we've seen TONS of open source projects that are very mature, battle-tested, and probably everlasting.

We've also learned a better way to write Java code (HN made such a big deal of Factories yet HN never acknowledge the best breed of Java code out there, it's a typical of a community like this anyway).

Thus that "sleeping" period is being used efficiently to stabilize things.

When it comes to tooling, Java beats .NET by miles. Java deployment packaging (JAR for library and WAR for web-app) is one of the best out there and it's been stable for many many years. (http://dirtsimple.org/2004/12/java-is-not-python-either.html)

Java build and dependency management tool is also far ahead of what the .NET has. Maven is far beyond NuGET and MSBuild (shrudder).

Integrating Java build with popular Continuous Integration server like Jenkins, TeamCity is waaaay easier than .NET.

Eclipse foster a good community of open source and free tools/plugins which put VS.NET to shame BUT BUT BUT experience may vary when using Eclipse. Eclipse is like black magic and moody: if somehow you're in the position that your Eclipse is stable, it's one of the best IDE out there.

Eclipse has its own built-in "app-store" that makes installing plugins sooo much easier, seamlessly, and faster.

m2clipse, a Maven plugin for Eclipse can perform the following steps:

1) Download dependencies

2) Download the dependencies javadoc (auto-complete will show the code documentation)

3) Download the dependencies source code (#1 only download the compiled code) if you ever wanted to "navigate to the implementation of a method"

It does this seamlessly without you breaking a sweat.

Tools like FindBugs and CheckStyle helped to improve your code hygine/style and EclEmma can tell your Code Coverage. All of these are free.

Java has rich and mature tools and libraries:

1) Sonar => http://www.sonarsource.org/

2) Jenkins => http://jenkins-ci.org/

To put it simply, the Java community has a very strong Software Engineering discipline and continue to find better ways to develop whereas the .NET/C# community is either following Java lead or serving its own master: Microsoft.

I'm glad I'm out the .NET world because it was soo much limiting and "capping" your day-to-day productivity.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: