views:

307

answers:

11

Hi

I've been coding in .NET for several years, and more recently Actionscript. I need to get up to speed now on Java development.

I was hoping for some references to good books and blogs that will help me get up to speed in the Java gotcha's I'm likely to encounter. I'd like to know about the framework classes (collections, runtime, threading, etc.).

I'm interested in suggested resources that are suitably targetted where possible. (Ie., newcomer to Java, but not to programming itself).

I've read the post and excellent answers here : http://stackoverflow.com/questions/90578/best-way-to-really-grok-java-for-a-c-guy , and that's been extremely informative.

Also, it seems that both Spring and Hibernate are defacto standards within the Java world, so any suggestions on suitable reading for these would be great. Again, I'm familiar with the concepts of the frameworks and their purposes, but not the implementation and use.

If there are any other suggested defacto standard, common frameworks I should get to know, please let me know -- I don't know what I don't know!

I'm primarily interested in server side coding, so won't be doing any GUI development in Java.

Thanks in advance

Marty

+1  A: 

Read Effective Java and Java Concurrency in Practice. Absolute best way for someone experienced to get into Java.

If you use Resharper with Visual Studio, try use JetBrains IDEA as it will be quite familiar (at least when it comes to the things you get with Resharper).

There are things to like about Java for sure (Enums seem nice, e.g.) but if you make heavy use of lambdas prepare to be a little disappointed -- the functional style of coding is quite verbose and probably discouraged in many instances. Type erasure will be a bit frustrating for sure and I'd recommend some of Jon Skeet's writing comparing Generics in Java to Generics in C#. His blog entries on his port of the Protocol Buffers is useful as is the brief section in C# in depth.

I think a very good tip is to use the naming and style conventions of Java (as opposed to applying the usual C#/.NET way). It helps to put you in the right mind set.

dpp
They both are great, however without enough Java, Java Concurrency in Practice could be a little heavy. You can take a look at Core Java serious -- they are bulky yet an easy read
@Sasha: I can see your point though my experience (as a C# guy coding in Java) was that it was actually quite useful.
dpp
A: 

Good to know that you have decided to add Java to your programming repertoire.

As far as books on Server Side Development are concerned, I would recommend you the following that I have found to be personally helpful:

Spring in Action Hibernate in Action Headfirst JSP and Servlets

Also, your knowledge of C# will help you get up to speed with Java.

Epitaph
+1  A: 

Framework classes:

Threading:

Basic Java things:

Pitfalls:

Michael Myers
A: 

I would recommend Spring more highly than Hibernate.

And neither is 100% essential for starting with Java.

There's Java SE (Standard Edition) for the base language.

There's Java EE (Enterprise Edition) that builds on the base language to provide web functionality, messaging, etc.

For Java SE language constructs I'd recommend a race through the Sun tutorials. A good C# person won't have any problems except for the different naming conventions.

For Java EE, you can go a very long way on just Java Server Pages (JSPs) and JDBC for relational databases, deployed on a servlet/JSP engine like Tomcat. Just be sure that you write your JSPs using only JSP Standard Tag Library (JSTL). Keep them clean, free of scriptlets, and devoid of business logic.

Once those are firmly in your grasp I'd recommend taking up Spring.

duffymo
A: 

Except 'language' java books mentioned here, for Spring I can recommend Pro Spring 2.5 and Hibernate in Action/Java Persistence with Hibernate.

jozefsevcik
A: 

JAVA API
http://java.sun.com/javase/6/docs/api/ I like it much more than microsoft documentation on c#/.net.

JAVA Tutorials
http://java.sun.com/docs/books/tutorial/index.html

Bogdan Kanivets
+1  A: 

Uhm, the language specification? And yeah, well the API that's were most of your focus should be. C# and Java started out very syntactically similar but C# has diversified itself since then.

I would go so far as to say that Java can be taught of a subset of C#.

The big difference lies within the API and that you'll have to practice. The Java API documentation is actually a good start, writing Java software helps to.

John Leidegren
+2  A: 

Have a look at this article by Dare Obasanjo. It's a little old, but still worth the read. If you want a proper Java book, I hear good things about Head First Java.

EDIT: I realize that his situation was reversed from yours, but it's still a good read :-)

Stefan Thyberg
+2  A: 

What you don't need is to learn "java the language". If you are proficient in C# you will pick it up on the fly.

What you do need is to learn the new standard API, and it might take time. It is huge to try to learn it upfront, but learn parts as soon as you encounter them. Later, it will click and you'll be able to just use it.

Of course, having teammate that already knows java is invaluable, since no book or online rerource will be so helpfull.

And lastly, ask here for a concrete problems.

Dev er dev
A: 

Effective Java Second Edition by Joshua Bloch is an excellent and concise resource. Its a very highly regarded book and rightly so imho.

Dominic
A: 

The answers so far focus on APIs, but I would also recommend becoming familiar with the tooling. Particularly Eclipse and the way it works.

Cheeso