views:

74

answers:

3

I'm a .NET programmer who is soon moving to the Java EE world. I have plenty of experience with .NET web technologies, web services, WebForms and MVC. I am also very familiar with the Java language, and have written a few servlets and modified a couple of JSP pages, but I haven't touched EE yet.

I'd like to set up a public website using Java EE so I can familiarize myself with whats current. I'm thinking just a technology playground at this point with no particular purpose in mind. What Java technologies are the current hotness for this sort of thing? (For example, if someone asked me what I'd recommend learning to set up a new .NET site, I'd say use ASP MVC instead of WebForms and recommend LINQ-to-SQL as a quick, simple and widely used ORM.)

So, what I'd like to know is:

  • Is there a recommended technology for the presentation layer? Is JSP considered a good approach, or is there anything cleaner/newer/more widespread?
  • Is Hibernate still widely used for persistence? Is it obsolete? Is there anything better out there? (I've worked with NHibernate some, so I wouldn't be starting from scratch.)
  • Is cheap Java EE web hosting available?
  • What should I know being a .NET web developer moving to the Java world?
+3  A: 
  • Is there a recommended technology for the presentation layer? Is JSP considered a good approach, or is there anything cleaner/newer/more widespread?

JSP has been replaced by Facelets. It provides an excellent templating fit for JSF, Sun's MVC framework (the Java counterpart of ASP.NET MVC). If you don't go for JSF, then Facelets has not much benefit for you and you could just continue with legacy JSP, probably with a 3rd party templating framework on top like Freemarker or Velocity and/or a 3rd party MVC framework like Spring MVC, Struts2 or Stripes. I however strongly recommend to just go ahead with Facelets+JSF on Java EE 6.

  • Is Hibernate still widely used for persistence? Is it obsolete? Is there anything better out there? (I've worked with NHibernate some, so I wouldn't be starting from scratch.)

It's certainly not obsolete. It has just expanded its powers with a JPA implementation. Even more, the guy behind (N)Hibernate, Gavin King, has worked on the Java EE's JPA specification himself.

  • Is cheap Java EE web hosting available?

Only eatj.com, javaservlethosting.com and Google Appengine comes to mind.

  • What should I know being a .NET web developer moving to the Java world?

Maybe any of those answers will be helpful:

BalusC
I think it's more appropiate to consider JSF a counterpart of ASP.NET Web Forms than to ASP.NET MVC. And be aware that Sun's standards-frameworks in Java EE are not as dominant as MS ones in ASP.NET.
leonbloy
Thank you for the references, I'll be sure to check them out.
Tom Tresansky
+1  A: 

I'd like to answer specially for Hibernate - it is very widely used, I'd recommend it with all ten ;)

Xorty
+2  A: 

To add to BalusC answer: It's true that plain JSP is rather outdated (specially if used with scriplets, no so much with EL expressions). But your choice of alternatives depend highly (though not univocally) on the web framework you decide to use. And beware that in this area there are many much more alternatives (or fragmentation) than in .NET, some more oriented to the MVC pattern (Struts, Struts2, Stripes, Spring MVC) some more component-based (JSF, Tapestry, Wicket), and some others (GWT). No clear winner here. See for example here.

leonbloy
That was 2 years ago. Now there is Java EE 6 which is finally superior to all of those 3rd party frameworks. Also see the 3rd link at the bottom of my answer which in turn points to a very good point: http://stackoverflow.com/questions/1960280/what-to-learn-for-making-java-web-applications-in-java-ee-6/1960447#1960447
BalusC
@Balusc : Java EE 6 is there long enough to challenge as you said "all thos 3rd party frameworks", and somehow I am not getting a felling that Java EE 6 is superior to Spring+Hibernate for example ... And also I am afraid, that "those 3rd party frameworks" are developing way too fast to get out dated ...
Xorty
@Xorty: The major benefit of Spring was DI. JEE6 comes with JSR299/JSR330 for this (with JBoss Weld as reference implementation). The major benefit of Hibernate was abstract persistence. JEE6 comes with JPA2 (JSR317) for this (for which Hibernate has an implementation as well!).
BalusC
@BalusC : And I don't doubt that :) What I doubt is, that Java EE 6 (despite of bringing new technologies) is NOT going to be superior (which is not at the moment) to 3rd party frameworks, especially those strongly supported from large companies
Xorty
Thank you for the references. Why are there so many alternatives? Can you point me towards any good discussions of the history/justification of this?
Tom Tresansky
I also would like to read some good balanced history of Java web frameworks, I dont recall any. Here's a time line: http://raibledesigns.com/rd/entry/my_future_of_web_frameworksJustifications... everybody has a handful. I'd point to two. 1: the first "official" J2EE specification (from Sun) sucked very badly. 2: web development, in general, sucks - or to put it mildly, is trickier than other layers or environments, is very difficult to make both developers and users happy (after all, Microsoft WebForms wasnt' the silver bullet either).
leonbloy