tags:

views:

416

answers:

5

Because of the nature of new project we are about to start, I need to get into Java world rather quickly.

I have about 8 years of PHP experience, and about 3 year in Javascript. (CI, Kohana and my own MVC framework)

I have solid knowledge of OOP (as much as you can get from PHP/JS and little ActionScript & python here and there)

So instead of learning from scratch, i was thinking to grab some web framework (at the end, project will be web based) and learn java along the way. Java code it self don't seam too strange, and i have solid experience with MVC in php so the whole concept makes sense to me.

So I'm looking a list of instructions on how should I learn Java.

(and not to spend too much time on things that are not so important)

Also you can suggest framework, from what i seen, struts looks nice, spring too, but it seam that it have too much XML configuration...

+1  A: 

None of them required extensive XML configuration anymore, those were the old days.

I will suggest you to grab Java concepts, anyway. Grab a good Java book to learn it along the way, as you said. Thinking in Java is good to go, but its just about core java and concepts. For java web you might want to look into Servlet and JSP basic, which you can learn using official J2EE Tutorial from Sun.

For Java web framework, there are plenty. But I would suggest you something you are already familiar with. You are right MVC based Java framework. Struts and Spring both are MVC frameworks and give you are clear separation of layers. Spring is a giant in itself, it has the answer for almost everything, that might confuse you in the start. Struts 1 is already outdated, and Struts 2 has a very tough competition.

I would suggest you to look into Wicket. It just a web framework, unlike Spring, and a very well written and easy to grasp.

Its a tough task, I must say. Lets see what other has to recommend.

Adeel Ansari
If you hire people for a new project, chances are very low they have ever heard of Wicket. Thats why I came up with Seam, Richfaces. Easier to find people.
I do agree. But my concern was a better easier framework. I myself found Seam+JSF a very nice framework, but I would suggest this to someone already have a good knowledge of Java web tier and working experience.
Adeel Ansari
+4  A: 

Start with a good book. I always found Thinking in Java pretty good, besides there is a free online version available. Skip the things you already know. Well you probably know what an object is and so on...

Next thing learn to use a good IDE. Have a look at Netbeans, IntelliJ IDEA or Eclipse. Java without a proper IDE is useless.

If you transit from PhP you are probably going to develop some Web applications? This is a steep learning curve. JavaEE is big, complex and it takes a while to dig into all those frameworks. Propably you end up saying "Why is this so complicated, I can do it much easier in PhP". You will be right about that.

Can't give you a good recommendation about the frameworks that are suited best for you. We use Seam + Richfaces. Not that hard.

for the "complicated" web development there is JSP that is in a way near to PHP
Vinze
Don't ever name Seam and Richfaces to a newbie. My experience is not good in getting them going with these frameworks
Adeel Ansari
+1  A: 

Good point, nooomi. I would suggest Netbeans, its much more intuitive, and sleek.

IntelliJ is amazing, but commercial and not free.

Eclipse is not my type, lot of other folks are quite happy with that. You might find it good too.

Adeel Ansari
A: 

So I'm looking a list of instructions on how should I learn Java. (and not to spend too much time on things that are not so important)

I liked Head First Java, but I know some find the format offputting, and experienced programmers probably find it a bit simplistic, the SJCP Study Guide by same author (Kathy Sierra) goes more in-depth while keeping playful tone. There is of course the Java Tutorial online where you can get a quick overview of the main parts of the platform. Effective Java is a good "best practices" book once you have gotten the hang of the basics.

Also you can suggest framework, from what i seen, struts looks nice, spring too, but it seam that it have too much XML configuration...

Another vote from me for Wicket as web framework. For persistence/db part, I recommend you look into iBatis before trying Hibernate. This is a "sql query" oriented framework rather than object-relational mapping, so it will probably feel more familiar to you. I haven't used it yet myself, but from what I have heard it probably has fewer "gotchas" (with regards to caching, performance etc) than Hibernate too.

Lars Westergren
+2  A: 
Bill the Lizard
+1 (I'd give more if I could) This is great advice, this book is really one of the best for anyone starting with JEE.
altCognito