What to learn for making Java web applications in

2019-01-02 19:16发布

My goal is to make web applications!

I finished reading the Books "Headfirst - Java" and "Headfirst - Servlets and JSP".

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

Can anyone please tell me how I should proceed with learning? Should I grab a book like this: Beginning Java EE 6 Platform with GlassFish 3: From Novice to Professional or should I just make some Online tutorials?

Thanks!

7条回答
有味是清欢
2楼-- · 2019-01-02 19:34

Jpassion provides good videos and material to learn Java EE 6 and other stuff.

You should also see applications examples:

  1. Petstore. Requires Maven, Glassfish recommended. Written by Antonio Goncalves who wrote the mentioned book.
  2. JBoss Ticketmonster. Requires Maven & Jboss Forge. Deploy in Jboss.
查看更多
十年一品温如言
3楼-- · 2019-01-02 19:35

If you just want to create web applications in Java, check out the Play Framework. It is similar to "Ruby on Rails"

查看更多
泪湿衣
4楼-- · 2019-01-02 19:38

For Tomcat, read the manual on the website. It is very good. Particularly, the first few chapters on web app organization and deployment, and the chapters on the Servlets API and JSPs.

For Spring, the Manning book Spring in Action is very good. Similarly for Hibernate (the Manning book) but I think Hibernate is mostly outside the scope of webapps. Your call, though.

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

查看更多
妖精总统
5楼-- · 2019-01-02 19:47

My advice1 is to stop reading books and start implementing stuff. In my experience, book learning is poor a substitute for the knowledge you get by actually doing things.


1 - Context: this is advice to someone who has just finished reading two books on the topic.

查看更多
倾城一夜雪
6楼-- · 2019-01-02 19:51

Java EE 6 is really amazing. The only problem is that it's about 2 weeks old, and there is only 1 container currently offering it's features -- Glassfish.

I have nothing against Glassfish, I use it all over the place, several production instances, I love the product and the project.

That said, the details of Java EE 6 do not translate back to Java EE 5. Some do, many do, but the Web Profile, Servlet 3.0, the new Bean types, JPA 2, etc. Those aren't there.

So, by learning Java EE 6 first, you're simply constraining 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 spec (at least those parts of the spec that they support, Tomcat doesn't have EJB for example).

I can't think of anything in Java EE 5 that wasn't carried forward to Java EE 6. Java EE 6 made some very old aspects optional, and those you simply wouldn't learn today anyway. Java EE 6 made some Java EE 5 stuff even easier (packaging notably, EJB Lite for example).

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

No single book will teach you what you need to know. Servlets, for example, are a nice foundation, but for anything larger than a couple of pages or endpoint, you will want to use one of the many 3rd party frameworks, or JSF, and no book covers the core and then a framework on top of that.

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

For web programming, raw Servlets are important enough just to understand the request/response cycle but you don't need a deep understanding to make a leap to a 3rd party framework.

I'm a big fan of Stripes for an Action framework (vs a component framework), and the single Stripes book available is excellent (making choosing that an easy choice).

I can't suggest a Component framework book, and I actually would not recommend one right off. The component frameworks truly bury the HTTP core request/response structures. They bury them for a reason, and they gain value BY burying them, but I believe to be effective you need to have a solid understanding of these concepts early on. That's why I don't suggest learning a Component framework first.

The JAX-RS REST framework, included in Java EE 6, but readily installable in Java EE 5 or any servlet container, is excellent. Arguably it is what Servlet 3.0 should have been. But I don't know any books for that.

查看更多
明月照影归
7楼-- · 2019-01-02 19:53

I won't comment on other technologies but if you want to learn Hibernate get "Hibernate Made Easy" by Cameron McKenzie(www.hiberbook.com). It is worth every penny. You can finish reading that book in 2 days(literally). it is like a novel and at the end you find yourself dealing with Hibernate like a Semi-Pro.

查看更多
登录 后发表回答