views:

195

answers:

6

I have a lot of experience with HTML, SQL. Also a lot of experience in Java.

But I don't know how to build a Database driven J2EE Web Application.

From what I understand I'll be needing Spring, Hibernate, EJB 3 as a good foundation of technology to get started. I'll need a MVC framework (JSF, Spring MVC, Struts, etc.).

I have gone through tutorials for several of these technologies but I just don't know how I would go about building my own web app from scratch. Does anyone know a good book or resource that will kind of walk me through good design and best practices?

I should have specified this. I have programmed using Java, Java Servlets, JDBC web application. But the application I worked on, everything was developed in house and we really didn't use frameworks. But now I need to learn how to develop a web application using these frameworks. Is there a design pattern or something I can learn that would help?

A: 

There are many J2EE books for this but no single one covers all the concepts. I would suggest that you pick up different books on different topics.

  1. Proffesional Java Server Programming
  2. Head First JSP Servlets (This one is a must even if you dont use JSP's).
  3. Orielly's book on JSF
Geek
A: 

Spring, Hibernate and EJB3 that you have mentioned is just some of the Java frameworks that helps you get your code organized and neat. Those frameworks is basically built on top of Java API. You don't have to use it if you are feeling overwhelmed by it at first glance. But after coding a large codebase in a large team, you might feel that you will need those frameworks.

If you want to build Java webapp without really worry about gluing together all of these Java frameworks, you can start by downloading Tomcat and use plain Java Servlet (Java answer for CGI) + JSP (PHP like page that gets compiled into Java Servlet) + JDBC (Java API for database call). But you'll notice that overtime your code gets so boring, and that is the moment you will be interested with Spring, Hibernate and its friends.

From my point of view, as a beginner it's good to know the basics of Servlet API + JDBC so you can understand what frameworks like Spring and Hibernate is doing under the hood.

jpartogi
A: 

Firstly, to build J2EE you need a good IDE to make life easier and I would suggest Netbeans

Secondly, read some tutorials. I think this one is sufficient as a beginners tutorial to enterprise level applications:

http://wiki.netbeans.org/BeginningWithEnterpriseApplication

^^ Its from the Netbeans site and specifically for netbeans which is the added bonus.

waqasahmed
A: 

I see that you have very little experience on Web applications. I think AppFuse is what you are looking for. It will help you create a Web application in a short time with maven archetypes.

utku.utkan
But newcomers will be overwhelmed with the enormous amount of frameworks it includes
jpartogi
A: 

My 2 cents worth -

I'd recommend using Wicket and JPA. Wicket uses simple Java and html. There isn't loads of configuration files etc required for it. There are a number of tutorials for getting started with it.

A: 

I don't think you should try to use every framework/pattern at once if you're not really into them. Start with making an application using JPA for instance and take it from there.

Tommy