What are some great JavaEE tutorials

What do you need to learn to build Java web applications in Java EE 6? [closed]


This question currently does not fit our Q&A format. We expect the answers to be supported by fact, testimony, or expertise, but this question is likely to lead to debate, argument, polls, or expanded discussion. If you think this question can be improved and possibly reopened, contact the help center.
Closed 7 years ago.

My goal is to create web applications!

I have read the books "Headfirst - Java" and "Headfirst - Servlets and JSP".

Since this topic (web applications) is so extensive and complicated, I would like to ask what I should learn next. I feel overwhelmed when I read keywords like Java EE, EJB, JSF, JPA, Glassfish ... but I won't give up.

Can someone please tell me how to continue studying? Should I grab a book like this: Java EE 6 Platform Starting With GlassFish 3: From Beginner to Pro, or should I just do a few online tutorials?

Many Thanks!






Reply:


Even knowing this is going to be controversial, I would advise just starting with Java EE 6. So get GlassFish v3 and either get the book Beginning Java EE 6 Platform with GlassFish 3: From Beginner to Pro or follow the Java EE 6 tutorial. In my opinion, the book (which I started reading so I know what I'm talking about) provides additional guides that are preferable if you are new to "everything" (it covers both the Java EE platform and its APIs and the environment for creating and deploying your applications).

Now, as I said, I can already hear voices, things like "Java EE is hard, use Spring instead, learn Struts or Wicket or Stripes for the presentation layer, learn Hibernate for persistence or not because I don't like ORM." Use iBatis or Straight JDBC instead (you'll see it's cool with Spring, Spring is so cool) and use Tomcat (and why not Jetty) or JBoss, or just forget everything and go for Grails and blah blah blah ... " .

But I don't think this will really help you, and without mentoring or guidance (and you won't find a non-outdated, unique resource that covers all combinations) this must sound very confusing to a beginner.

So, because I think Java EE 6 is a huge improvement over previous versions of Java EE, because it really is nice Standard APIs for all your needs (Servlet 3.0, JSF 2.0, JPA 2.0, EJB 3.1 Lite, Bean Validation 1.0, CDI), etc) because these APIs are all more than decent because there is nothing really wrong with them learn, because this is already a big task, because you have to start somewhere , I would just focus on Java EE 6 and forget about other frameworks for now. More specifically, I would start with the Java EE 6 web profile (and then add things if you want to go further).

That way, you can 1) get started and learn brand new things, and 2) give any other framework and / or tool time to adjust and prove that they are still needed. And if so, there will still be time to experiment the survivors and you will be able to understand a lot better why they exist.







My advice 1 is to stop reading books and start implementing. In my experience, learning from books is a poor substitute for the knowledge you get from actually doing things.


1 - Context: This is advice to someone who has just read two books on the subject and is looking for more books to read. In practice, you need to balance reading and doing. Especially when you have a specific problem that you want to solve.





Java EE 6 is really amazing. The only problem is that it is around 2 weeks old and there is currently only 1 container that does its job - Glassfish.

I have nothing against Glassfish, I use it everywhere, multiple production instances, I love the product and the project.

However, the details of Java EE 6 cannot be rolled back to Java EE 5. Some do, many do, but the web profile, Servlet 3.0, the new bean types, JPA 2, and so on. These don't exist.

So if you're learning Java EE 6 first, just limit yourself to a single container. More are coming, but they're not here yet.

Tomcat, JBoss, OpenEJB, Glassfish, Jetty, Resin, Geronimo, etc. all work well with the Java EE 5 specification (at least the parts of the specification that support them, Tomcat for example doesn't have an EJB).

I can't imagine anything in Java EE 5 that wasn't carried over to Java EE 6. Java EE 6 made some very old aspects optional, and the ones you just wouldn't learn today. Java EE 6 made some Java EE 5 content even easier (especially packaging EJB Lite).

Instead of learning Java EE 6 now and discovering that you may not be able to use much of what you are learning, learn Java EE 5 now so that you can apply what you have learned in a variety of environments.

Not a single book teaches you what you need to know. Servlets, for example, are a good foundation, but for anything larger than a few pages or an endpoint, you should be using one of the many third-party frameworks or JSF, and no book covers the core and then a framework about it.

The Java EE 5 tutorial is good at improving the basics. My main complaint is that they don't show you the source code. Rather, they expect you to just download and run it. It is not discussed in the tutorial. I've found the Head First books to be pretty good.

For web programming, raw servlets are important enough to understand the request / response cycle, but you don't need a deep understanding to get to a third-party framework.

I'm a big fan of Stripes for an Action Framework (versus a Component Framework), and the single Stripes book available is excellent (which makes it easy to choose).

I cannot suggest a component framework book, and I would not recommend one right away. The component frameworks really bury the core HTTP request / response structures. They bury them for a reason and add value by burying them, but I believe that to be effective, one needs to have a good understanding of these concepts early on. Because of this, I don't recommend learning a component framework first.

The JAX-RS REST framework included in Java EE 6, but which can be easily installed in Java EE 5 or any servlet container, is excellent. It's probably what Servlet 3.0 should have been. But I don't know any books for that.




For Tomcat, read the manual on the website. It is very good. In particular, the first chapters on the organization and deployment of web apps as well as the chapters on the Servlets API and JSPs.

For spring, Manning's Spring in Action book is very good. The same goes for Hibernate (the Manning book), but I think Hibernate is largely outside the realm of webapps. Your call, however.

Wicket - Manning book too. But really, just write your front-end code in Javascript. It will be less painful, IMO.


I won't be commenting on any other technology, but if you want to learn Hibernate, get Hibernate Made Easy from Cameron McKenzie (www.hiberbook.com). It's worth every penny. You can finish reading the book in 2 days (literally). It's like a novel, and in the end you end up dealing with Hibernate like a semi-pro.


Jpassion has good videos and materials for learning Java EE 6 and other things.

You should also see examples of use:

  1. Petstore. Requires Maven, Glassfish recommended. Written by Antonio Goncalves who wrote the book mentioned.
  2. JBoss ticket monster. Requires Maven & Jboss Forge. Deploy to Jboss.

We use cookies and other tracking technologies to improve your browsing experience on our website, to show you personalized content and targeted ads, to analyze our website traffic, and to understand where our visitors are coming from.

By continuing, you consent to our use of cookies and other tracking technologies and affirm you're at least 16 years old or have consent from a parent or guardian.

You can read details in our Cookie policy and Privacy policy.