views:

424

answers:

9

This question gave me tons of great places to start looking into developing web apps.

If I wanted to try to stick with Java, where do you recommend I look? Or, do you recommend I let go of my safety blanket and fly free with PHP, Django or Rails?

+6  A: 

I suggest you look into Spring, specifically the Web MVC and Web Flow components. This way you can keep and grow your Java skillz!

Joe Skora
+2  A: 

I worked for a year within the Echo2 framework which allows you to stay purely within Java. The Eclipse plug-in costs $$$, and as such, I cannot comment on that aspect, but the actual API is free and fairly reasonable to use.

daniel
+1  A: 

It depends ... Consider what you're trying to do (i.e. requirements). Do you need a web application that is enterprise-y? This often means low risk in terms of maintainability, performance, security, interoperability, scalability, etc. A Java web application can range from any of Google's properties, to a CMS like Magnolia to an investment bank's risk management system. In the long run, this might help your resume as there are a truckload of J2EE jobs out there.

Unfortunately, Java does not have a KISS web framework like Rails or even ASP.NET MVC (any takers for the latter?). In a KISS web framework you're not doing much more than CRUDing the database and painting it on the screen. So given that you've already indicated that you know Python, I might go for Django. Alternatively joining the RoR world is not that difficult.

Alan
A: 

I say pick a new framework:

  1. You'll learn a new language and improve yourself as a developer. Learn skills you can bring back to Java.
  2. I've used Django and TurboGears, (I personally perfer Django, haven't tried RoR yet but Ruby the language is cool) but they're both way more thought out than any of the Java API's I've used including Struts, JSF, and good ole' servlets.
  3. I use Java at work and feel constrained by it now, personal projects I use lots of other thing.
  4. Packaging is just way easier, with Java web frameworks you have to worry about compile time classpaths and runtime classpaths. There is only one in a dynamic language and all the scripts will set that up for you.
William
+2  A: 

If you don't totally want to leave your comfort zone, you could look into the Google Web Toolkit, which will take your Java code and compile it for the web (i.e. translate it to cross-browser JavaScript). This isn't really a transition but would be a good tool to keep in mind given your skill in a Java environment.

Evan Hanson
+2  A: 

As someone who develops Java-based web applications I'd say it might be easier dabbling in PHP for a little while as you avoid a lot of configuration & set up hassles that come with Java.

If you're just wanting to learn how to develop web-based apps then you can get going fairly quickly with PHP. If you grok those ideas properly it shouldn't be too hard to work out servlets, JSPs, etc. and then you can make up your mind which server-side language to use.

(Something else in PHP's favour is that it's really easy to find cheap hosting; you're unlikely to find anything as cheap for Java and if you do there's a reasonable chance there will be restrictions on the libraries you can use.)

Another option might be Cold Fusion which I believe is now implemented as a tag library in Java. I'm unsure of cost/licensing though.

wrumsby
That's a good point about hosting.
Andrew Swan
+1  A: 

Apache Wicket homepage says:

With proper mark-up/logic separation, a POJO data model, and a refreshing lack of XML, Apache Wicket makes developing web-apps simple and enjoyable again. Swap the boilerplate, complex debugging and brittle code for powerful, reusable components written with plain Java and HTML

Stephen Denne
+1  A: 

Use AppFuse for a quickstart. It lays down the basic web project skeleton on which you can build on. We would suggest Spring for MVC and Business layers, and it can be integrated with Struts/Tiles for Presentation layer and with Hibernate for the DB Layer.

Sanjay
+1  A: 

No one has mentioned Java Servlets and JavaFX!

Partial