views:

426

answers:

11

What Java web development environment is the best for absolutely minimizing the build-deploy-test cycle time?

Web development environment: JBOSS, Tomcat, Jetty? Deploy WAR exploded? Copy WAR or use symbolic links? There are factors here I don't know about.

Build-deploy-test cycle? The amount of time it takes to test a change in the browser after making a change to the source code or other resources (including Java source, HTML, JSP, JS, images, etc.).

I am looking to speed up my development by reducing the amount of time I spend watching Ant builds and J2EE containers start. I want the Ruby on Rails experience --- or as close as I can get.

I'd prefer a solution that is web framework agnostic, however if a particular framework is particularly advantageous, then I'd like to hear about it.

Assume all the standard tools are in use: Hibernate, Spring, JMS, etc. If stubbing/mocking support infrastructure is required to make this work, I'm OK with that. In fact, I'm OK with having a development environment that is very different from our production environment if it saves me enough time.

+2  A: 

Have you considered Grails?

yawmark
+1  A: 

Deployment is as fast as it can get with Google App-Engine + GWT (optional) + Eclipse Plugin.

Never seen anything faster.

JohnIdol
Don't you have to restart the built-in server every time you change a class? I've had a look at GAE and found that I had to do this. Be nice to know as I could well be wrong.
Damo
In my answer I am taking only abuot deployment - anyway, you have to do that (restart the development server) only if you change your server side code - in GAE + GWT most of the logic is client-side so it's not too big a deal.
JohnIdol
+5  A: 

You should probably take a look at Javarebel:

http://www.zeroturnaround.com/javarebel/

and this thread here:

http://stackoverflow.com/questions/645746/how-to-improve-productivity-when-developing-jee-based-web-applications

Jon
+1  A: 

JRuby on Rails. Develop on whatever platform you want, deploy to standard Java servers.

Ben Hughes
+4  A: 

Building (used to be compiling) is a a sign of our times. We need quick validation of our thoughts and our actions. Whenever I find myself building to many times it is usually a sign that I'm not focused. That I don't have a plan. For me this is the time to stop and think. Do a list of things that need to be done (this is web framework agnostic) do them all and test them all after one build.

rmarimon
+1  A: 

Maven 2 and eclipse. mvn eclipse:eclipse <- pure awesomeness. Also, WTP within eclipse works great (and maven generates working WTP projects).

Brian Dilley
WTP? Plus, could you add links to all the awesomenessly stuff? :)
Kelly French
+1  A: 
  • Small web containers will load faster than overloaded webcontainers with the kitchen sink built in (.. cough .. jboss ).
  • Some design decisions slow build times (e.g. aspect-weaving based toolkits add an aspect-weaving phase to compile times).
  • Avoid building components that can only be tested after long elaborate load cycles. Caches are a prime culprit here. If your system has deep dependencies on a global cache scattered everywhere you'll need to load the cache every time you need to test something.
  • Unit-testable components, so you can run pieces instead of the whole thing.

I find that projects built reasonably compile, deploy, and startup in a few to 10 seconds, which is usually fine.

Steve B.
+4  A: 

JBOSS uses Tomcat for its servlet/JSP engine, so that's a wash.

Tomcat does support hot deploy.

Jetty's pretty small and starts quickly, but it doesn't support hot deploy.

Eclipse is merely an IDE. It needs a servlet/JSP engine of some kind. If it's like IntelliJ, you can use any Java EE app server or servlet/JSP engine you'd like.

IntelliJ is pretty darned fast, and you don't have to stop and start the server every time you rebuild. It works off the exploded WAR, so things happen fast.

duffymo
An easy way to get redeploys on Jetty is to use contexts. You then touch the context xml file, and the web app is reloaded.
Thorbjørn Ravn Andersen
Didn't know that, thanks.
duffymo
"The ContextDeployer may be used to (hot)deploy an arbitrary Context or Web Application with Jetty specific configuration. To statically deploy only standard web applications at startup, use the WebAppDeployer."http://docs.codehaus.org/display/JETTY/ContextDeployer
Thorbjørn Ravn Andersen
+1  A: 

Have you tried using Eclipse JEE and then tell it to deploy to a server managed by Eclipse? Tomcat and JBOss works pretty well in this way. Also allow you to change code in a method, use Ctrl-S and have the class updated inside the server.

MyEclipse also works pretty well like this.

Thorbjørn Ravn Andersen
+1  A: 

GWT in eclipse is probably the fastest I can think of. Using the hosted mode browser for your tests you can debug and change your code without restarting anything. Just need to click the refresh button in the browser and the changes are there (java, css, etc). One other thing is that GWT is adding this same support to normal browsers (Firefox, IE, Safari) so you can debug from within them the same way. These changes are coming in 2.0. See http://code.google.com/events/io/sessions/GwtPreviewGoogleWebToolkit2.html

Carnell
+2  A: 

Jboss Seam together with the Jboss Developer Studio is good for hot deploying everything aside from EJBs (SLSB, SFSB and Entities need redeploy).

Damo