tags:

views:

291

answers:

5
+5  Q: 

From Java to .Net

These are some questions for any developer whose made the jump from Java to .Net:

If you could go back to the start of your switched, what would you do to make the transition easier?

Any books you would recommend?

How is .Net compared to JEE? Anything that totally bugs you?

And the most important, do you regret making the jump?

+1  A: 

Don't think of it as a switch. If you learn a new language like C#, you're not trading in all the knowledge you have in Java. It takes several months until you skills in other languages start to degrade. Try it out and see if it's for you. Java will be there for several more years if you change your mind. :)

I would recommend (and repeatedly have recommended) Head First C# as your first .NET book. The whole series is really beyond compare, IMHO.

Bill the Lizard
I'm not a big fan of HFC# on the grounds that it's all GUI-based - which means you're always working with a large code base you barely understand. However, that's a style preference thing. But you *must* get the most recent edition. Earlier editions had loads of errors, most of which have been fixed
Jon Skeet
"You" being a beginner, of course. Anyone with .NET experience won't find the examples too problematic.
Jon Skeet
Yes, definitely get the latest edition.
Bill the Lizard
+3  A: 

Get a decent refactoring plugin for VS, because you will miss all the nice refactorings of your Java-IDE.

EricSchaefer
+1  A: 

As a Java-C# developer, I'm not sure there's anything I'd do different.

As for books to read, I used the C# Pocket Reference from O'Reilly. I really like these books as they're small so you can have them at your side and easily flick through them when you have a problem.

The other reference I'd recommend isn't a book, it's the .NET Framework Class Library on MSDN. The MSDN is most useful for learning the framework, rather than the language.

Cameron MacFarland
+3  A: 

I did several years of C/C++ development in between Java and .NET, so my experience may be a bit different.

I found the move from Java to C# very easy. The languages are very similar and much of the framework works in similar ways. I loved Java, but I don't think I will be going back. I think the biggest differences for me are the tools. Visual Studio is a great product on makes coding a pleasure. Add in a refactoring addon for VS like Resharper and you probably won't look back.

Depending on the type of development you do, I would avoid WPF at first and stick to WinForms (or WebForms vs Silverlight) as you will be more at home there coming from Java. Move to WPF or Silverlight once you start feeling comfortable as there is a lot to learn with these frameworks.

You will also find that many of the OpenSource libraries you may have used in the past have been ported to .NET, so that may help you hit the ground running.

The best book in my opinion is Professional C# 2008 by Wrox Press. As a Java programmer, you won't have too many problems with the language, you will need the most help with the framework. This book will be very helpful there.

Rob Prouse
When did you make the move, out of interest? I did when Java was at 1.4 and C# was at 1.0 - at which point the languages were indeed very similar. They've diverged considerably since then...
Jon Skeet
+1  A: 

I note that you said .Net rather than any specific .Net language. I switch back and forth between Java and VB.Net, C#.Net and a smattering of C++.Net.

The main thing to bear in mind is that most languages share common roots and are to some degree similiar, therefore the first thing to do is to identify the differences. Keep them in mind and you'll be off to a good start in being able to port your existing knowledge to the new environment. The next thing to do is to check that your existing knowledge isn't overidden by some language feature you haven't come across previously eg. closures, special builtin classes/functions etc.

I also try to make sure that the IDE I'm using has:

  • Common/configurable shortcuts.
  • refactoring tools (either builtin or third party).
  • Appropriate plugins for the toolset I'm using.

This serves mainly to reduce the time I spend "fighting" the IDE because I use shortcuts a lot, and I prefer not to leave the IDE to run things like Maven for example.

I would recommend books on the spefic APIs you'll be using, and make sure you have a good internet connection as Google is your friend :-)

There is always a few things that bug me about most languages (none of them are perfect) but none are killers. The little things include that VB declarations are opposite most other languages I commonally use nowadays, though having said that 15 years ago when I was using PL-1/PL-X a lot I would have been annoyed about Java/C* being opposite of my usual style.

I jump back and forth, and generally I try to use the most appropriate tool(s) for the job. The only disappointment I would have is if I used the wrong tool.

Michael Rutherfurd