4 ms·
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 rea
by davesims 14y ago
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.
- untog 14y agoAgreed 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.
- davesims 14y agoI 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.
- sc0rb 14y agoSo 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).
- davesims 14y agoI 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).