views:

2564

answers:

7

I've been a web developer for almost a decade. I've mostly used classic ASP/JavaScript and I'd like to move into Java based apps.

I have a decent understanding of Java itself (enough to know how to lookup what I don't know) and I spent some time doing minor work on a JSF/Spring/Hibernate app, but from what a trusted coworker told me, this application is the example of what not to do.

I want to learn the really hardcore stuff (EJBs, HA Clustering, etc), but I know I have to walk before I can run. Is the Sun Tutorial the best place to start? Or is there an definitive book (like K&R for C or Gang of Four for design patterns) that I should buy?

A: 

SUN Java EE tutorial would get you a place to start but probably you will need a couple more books afterwards. For Java Beans I find the following books good: - Enterprise JavaBeans 3.0 (5th Edition) by Bill Burke and Richard Monson-Haefel - Head First EJB (Brain-Friendly Study Guides; Enterprise JavaBeans) by Kathy Sierra and Bert Bates

You would need to pick a container and read a little bit about it. So this really depends on you.

+3  A: 

Unfortunately, the Java EE space is so freaking astronomically huge that I think any one place isn't going to get you very far. I attempted to learn the Java EE stack via the Sun tutorial and I found that by the end of it I suffered from information overload. It's an incredibly complex space, of course, but at the same time I found that the tutorial was needlessly obtuse.

That said, I'm a fairly green developer with no real experience in the web app world (and honestly very little experience in the desktop world either) so I may have just not had quite enough brain power to grok. If you're more experienced, it is a great place to learn about the Sun technology stack (which, of course, is the other problem with the Java Web Space, there are way to many options).

A perhaps better approach might be to wait till you have an actual project, and then learn Java web development by doing. And the most important thing to remember is to not become afflicted by analysis paralysis. As the Java Posse said in a recent episode, you can really get away with Googling for a toolset or framework for your problem, go with the top 3, spend five minutes analyzing them, and then pick one and be reasonably sure that you've picked something that will meet your needs.

All that being said, I'll throw a +1 in for Enterprise JavaBeans 3.0 as an intro to EJB Session and Message Beans as well as the JPA. I have briefly looked at Core Java Server Faces, 2nd Ed. and was impressed by what I saw. However, again, also be aware that things like Hibernate are available for your persistence layer and have garnered, in some cases, much higher reviews than the JPA. Patterns of Enterprise Application Architecture did more for my understanding of actual Enterprise architecture than any other book I've read, although when you're using a tool-set, most of the patterns have been implemented for you already (but it might help your understanding of how to use them properly).

Tim Visher
A: 

Since the other answers had already mentioned some resources on EJB and stopsineman also mentioned Enterprise Application Architecture. Those are a good start.

But if you want to learn more about HA and clustering, usually those resources cover the basic idea and theory. In JEE environment, usually those are highly tied to the container that you use. So you'll have to look up container specific resources. For IBM, the redbooks is good place to start.

DJ
A: 

JEE space is enormously complex and huge. Some might argue that's a vice. Others point out that it's necessary to solve enterpisey problems.

I would start with a specific server that supports a web container, and an EJB container. Learn everything you need to develop a Java web application that presents a rudimentary UI, puts its business logic in an EJB, which consumes a DAO to talk to the database. I would recommend using the simplest Java web framework that you can get away with. Perhaps that means Struts or Spring MVC. You'll also need to understand how JDBC works for your persistence layer, though you could get away with using a framework like Hibernate. FWIW, the industry standard way that a JEE web application consumes the database has mostly been spelled out by the Core J2EE Patterns.

That said, don't settle for the "standard" way of doing things. So be sure to keep up with how the enterprise space is evolving. I would heartily agree that the Fowler's PoEAA is a much more insightful though more difficult read.

Alan
A: 

I would recommend you to read the bible of Entrerprise Applications: Patterns of Enterprise Application Architecture, by Martin Fowler.

There is also more information here. It gives you a basic view on which is the interaction between the components and Fowler explains the differente layers of the model.

lurks
+1  A: 

Shortly to learn;

  1. Download Eclipse based MyEclipseIDE,
  2. Study Myeclipse Educational Materials.
  3. Check technologies in tutorials by learning.

After that you can rise to the ocean.

javaloper
+3  A: 

The Sun Java EE tutorial is in my opinion too much tight coupled with Sun Glassfish and Sun Netbeans. The tutorial doesn't seem to explain that Java EE is just an abstract API for which Glassfish is one of the concrete implementations and that Netbeans is just one of the available tools (IDE's) to ease Java EE development.

The tutorial gives a bit too much the impression that you need Glassfish/Netbeans to be able to develop/run Java EE even though when you initially want to go for Eclipse or IntelliJ as IDE and JBossAS, Weblogic, WebSphere or even Tomcat as (application) server. The Java EE download basically just contains Glassfish and optionally also Netbeans. Most of the starters doesn't even know that you can also go ahead with just the Java SE JDK and for example JBoss AS and Eclipse without the need to download the whole Java EE pack on top of that.

Regardless, if you keep this all back in the mind, then the tutorial is quite good. It's only a bit too boring and tedious tutorial. If you want a pleasant read, then I can strongly recommend any of the related books of Bert Bates and Kathy Sierra in the Head First series, like Head First Servlets & JSP. Or if you want to go in the professional Java EE 6 direction, then check this book (yes, it concerns Glassfish, but that's as of the moment the only production-stable full Java EE 6 implementation).

BalusC
"this book" has come out in a second edition and JSF 2.0 is mentioned this time. http://www.amazon.com/Beginning-Java-EE-GlassFish-Second/dp/143022889X/ref=dp_ob_title_bk
Thorbjørn Ravn Andersen