views:

471

answers:

9

Im porting a project from php to java. The project is a web-app based on php and ajax techniques with a javascript front-end. What java-frameworks would you use for something like this?

+3  A: 

How well do you know Java?

Why are you porting it?

I can't really tell based on your description, but there are lots of Java web frameworks out there. Pick one. I prefer Spring.

I fear that you're about to be very disappointed. I anticipate a lot of questions like "Why can't I do X in Java? It's easy in PHP!"

duffymo
+1  A: 

Apache Wicket is a possible java based web framework you might consider. The default would be the java servlet and jsp frameworks.

emeraldjava
A: 

In my opinion you would still do the same but generate the html with JSP and javabeans instead of php. javascripts and ajax will still work without a problem if the outputed html is the same.

fmsf
+1  A: 

without seeing the source code - you will need a complete rewrite. just "porting" will probably not work.

out of all available frameworks i'd recommend two: wicket if you want clean lightweight technology. with ajax. jsf/seam if you are in a corporate environment where it it easy to get tons of experienced developers.

Andreas Petersson
A: 

It depends by the size of your project, the features and your resources.

If the project have'nt a lot of particular needs you can use Struts. Thsi is a stable framework, not really advanced but simple and powerfull for the development.

Another frameworks more recent and advanced are Spring and Wicket. Before you start, I recommend you to do a check-list of your need:

  1. Do you must porting a O/R mapping too?
  2. Have you a stable developer knowing Java/J2EE?
  3. Do you think to add some feature during the porting or in short-run?

etc etc

good luck! :)

alepuzio
+5  A: 

Does the result have to be written in Java, or does it just have to run on the JVM? In the latter case, you might want to consider Grails, which uses Groovy, a Java-based dynamic language that compiles to Java byte code and has full access to the Java standard API.

Michael Borgwardt
Very nice recommendation, but it could be difficult if there's ever a need to look under the covers. That would require a good Spring/Hibernate/Groovy background. But if it fit into the sweet spot, it could be a very nice way to go.
duffymo
@duffymo 's comment: dont be afraid of learning spring/hibernate/groovy. If you are a programmer, you shouldnt be afraid of learning new things, even if the curve is a bit steep. Plus, you rarely have to look under the hood for grails.
Chii
A: 

i would port it to GWT

Harald Schilly
+1  A: 

I really like Stripes.

There's a really good book out on it too. Stripes ... and Java Web Development is Fun Again.

ScArcher2