Sunday, May 08, 2005

Java vs. C# series: Productivity, pt. 1

Advantage: C# .NET

I want to start my series with the main reason why I was ever exposed to C# .NET in the first place - frustration with how long it took to implement J2EE solutions. The interesting thing to note here is that we as developers weren't necessarily frustrated but our managers and President were. I'd also like to add that I was very skeptical that we would be more productive in C# .NET and actually a little resentful that our managers considered the technology to be the main barrier to shorter cycles and not the very complex problem domain. Frankly, going in I was looking for reasons why it was worse to work with C# .NET than Java.

Productivity can be such a nuanced term. We didn't come up with a way to truly measure our productivity after a year - more like I know it when I see it... And after a full year working with another critical thinking Java developer on the project, I think we're both surprised at how quick we are to say that we are indeed more productive in C# .NET.

Interestingly, Rod Johnson discusses this very issue in his new book
Expert One-on-One J2EE Development without EJB. However, our case was subtly different than the architecture issues that he discusses. In fact, we've implemented areas of our application to utilize Spring, message driven beans, web services, etc. In our case we were specifically looking for more bang on the client-side.

It may not be completely fair to compare C# WinForms to working with JSP. There are so many obvious issues ("our clients run Linux", etc.) that I won't go into them - I will say that we are afforded some solid assumptions with our customers' systems and policies. I came from JSP where I spent *years* bending over backwards with dynamic HTML and JavaScript to bring our UIs to just within "tolerable" by our customers' standards. And I think we've done some pretty amazing things. But it was sooo nice writing object oriented client-side code that actually runs very nicely on our customers' machines.

Productivity gains with client-side C#:
  1. Extremely rapid application design, feedback, and turnaround time on the UI.
  2. Able to create extremely rich user interfaces.
  3. Object oriented client-side code that runs optimally on Windows.
  4. Unit Testable client-side code.
  5. Good WYSIWYG IDE with solid debugger and auto-code-completion.
  6. Excellent integration with xml and web services.
  7. Easy to transition from Java to C#.
  8. Quicker, more confident code cycles (1. & 4.) meant more focus on the problem domain.
There are caveats to some of this that I'll get into more. But again, it really surprised me how nice it was to work with C#.

No comments: