views:

120

answers:

2

I'm an experienced perl developer who commonly uses Catalyst/Moose etc for web development, and have some python/django knowledge. I'm interested in learning java with an eye on wicket/spring/hibernate and later on possibly moving towards groovy, scala or closure.. I'd rather not plough through all the basics.. What do you recommend book-wise to get going?

A: 

To learn the java web application architectural approach read Beginning Java EE 6 Platform with GlassFish 3: From Novice to Professional

janogonzalez
thanks for the recommendation - i shall check it out.
Tom
A: 

I wrote Java SE code for a year before I managed to understand the concepts behind Java EE. I only got my head around it when I read the Google App Engine starting guide.

The most important thing to comprehend is the Servlet pattern and the JSP format. A servlet is a Java class bound to a specific URI by (most often) by XML.

The Servlet class implements a method (doGet() or doPost()) accepting some parameters:

public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {


    response.getWriter().println("Hello, World!");

}

Will yield "Hello, World!" when accessing the URI associated with this HttpServlet class.

It's really the same principles as in PHP/Perl framework but with Java being a typed language the "You're not calling the Framework, the Framework is calling you" becomes more apparent.

With regards to Hibernate/ORM libraries, no (?) Java frameworks are bundled with an ORM library as such. There are several independent implementations of the Java Persistence API with Java Persistence Annotations (JPA) being the most recent (and hottest) standard. JPA would be the persistence implementation most closely mimicking the Perl/PHP ORM method of defining a User or BlogPost class as a model. DataNucleus (a JPA implementation) has migrations built in.

matiasf
Thanks, good tip on the GAE guide. I did follow that and it got me started but I feel like I need something to get me moving on from there.
Tom