Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

From zero to Java > Spring > Hibernate for web

Ok... so here's my actual status:

Been a PHP Scripter for way too long, I think I cover the basis, Good practices (structure, commenting, indenting, workplan, etc), OOP, MVC, security and a fair knowledge of PL/SQL. But never seen a single line of java code and it's time to do some kind of voodoo to "learn XYZ in 21 seconds". The goal is to write a full and complex application (I'm working for a global company) over MVC with lots of different patterns, also use of ORM, cache and persistence.

That's why I want to know which books to read for learning THE THEORY of Java then Spring and later Hibernate. Then the practice and endless debugging hours will give me more knowledge as with any other thing I've learned so far.

Any help (not jokes about being a PHPer) would be HIGHLY appreciated.

In short I want to know how to design a scalable web application with Java using (JBoss?) Spring+Hibernate

Also I don't want to star flames about what's best/worst and differences, just a few ISBN #s or links that point me in the right direction for learning... I have time, I just don't have any knowledge of where to start.

TIA!

Edit:

Ok, first at all thanks for the answers. Second I think I wasn't clear, I don't want to learn in 21 seconds (that was just reference for those "lear XYZ in 21 days"), I know is a lenghty process. I started programming back in 1998 with basic and pascal, then I learned C++, then came HTML/Javascript and PHP since 2003 I write only in PHP. That's why I want to move on maybe 1.5/2 years to Java and in here is Spring and Hibernate are the norm, so I was thinking:

1) Try XXXX to learn how CORRECTLY set up YYYY to start running Java 2) Read AAAA, BBBB, CCCC to embrace Java 3) XXXX, YYYY and ZZZZ are good for spring 4) Maybe AAAA, BBBB and CCCC could help in Hibernate

Also I know that I have to stay in front of you monitor like 8..12 hour daily PRACTICING and you'll be able to say "Hello world" in "n" langs pulled from the database abstracted in an object in the view called from a template in memory stored by the front controller using a couple of extended models.

And one more thing, I ask this because I love to program... it gives back a lot. I'm not a professional and I have the luck to earn some money and work with real professionals, but they are jealous of me because I'm an administrative guy who earns a couple of bucks in his extra time. That's why I'm asking in here and not to them.

Thanks again.

like image 984
Jhon Doe Avatar asked Sep 23 '10 19:09

Jhon Doe


2 Answers

"learn XYZ in 21 seconds"

Better read this.

You might be trying to bite off more than you can chew here.

You need Java - that's fundamental.

But you can go a long way with just servlets, JSPs written using JSTL, and JDBC.

You don't need Spring right away, but it will help you structure your apps in a good way. I would recommend Spring as an excellent example of well-designed, well-implemented, well-tested code looks like.

Hibernate should be at the end of the line. You may not need or want dynamically generated SQL.

I agree with the Grails recommendation because it'll ease your entry, but if anything goes wrong you'll be dead in the water. Grails is based on Java, Spring, Hibernate, and Groovy. If you don't know anything about its underpinnings you'll be at its mercy if it fails.

UPDATE:

Since you've provided more information, I'll add another thought.

The goal is to write a full and complex application (I'm working for a global company) over MVC with lots of different patterns, also use of ORM, cache and persistence.

Now that we've established that this is a long process, you need to make sure that the global company you'll (hopefully) be invoicing for this work is ready to support it. Do they have the infrastructure, the staff, the knowledge to follow you down this Java EE path? If not, you won't be doing them a service. Prepare them for what you have planned at the same time that you're preparing yourself.

Good luck. Maybe we can help you climb that mountain.

like image 76
duffymo Avatar answered Oct 03 '22 00:10

duffymo


Java will take a little time, but one of the reasons Java is so popular is that the language is easy to learn. The framework APIs take a little longer. That being said once you are somewhat happy with doing Java. You should jump into Spring MVC to learn web development. Spring MVC is very easy to pick up IMHO, and the concept of Spring is so deceptively simple that I think newbies can learn it without a lot of back story. Plus using Spring gives you the ability to use Spring JDBC templates which makes JDBC a snap. And they are easier to learn than any ORM mapping tool. With your background in SQL/PHP this will be the most natural way of working for you.

Hibernate takes months to get productive at a professional level. It's frustrating, there's a high learning curve, and you'll just get frustrated because it forces you to do things a particular way that can be unnatural to someone familiar with SQL. I would not recommend someone start there. You will quit Java trying to learn it. And really you don't need it.

Grails sits on top of Hibernate so using it will force you to deal with it, and I think it'd be unrealistic for you to expect Grails to "just take care of" hibernate. I know some people love it, but mostly I hear that from seasoned developers with history of Java not newbies.

I wish you luck with your new venture.

like image 22
chubbsondubs Avatar answered Oct 03 '22 00:10

chubbsondubs