views:

62

answers:

3

I'm really pissed when I'm developing UI and have to redeploy the whole application to see my changes which can take up to a minute. Most of the time when starting up is spent in starting up the service and dao layer(=hibernate). I already have the application divided into multiple modules and the UI code is one separate module. All of the modules are packaged inside war and deployed on Tomcat. The software uses Spring for IOC. The code in the UI layer uses Spring MVC and more recently Vaadin. Maven is used to build the projet.

Is there any tips to speed things up when changing code in the UI layer? Like is there a way to redeploy only one jar? I've read about OSGI and EJB that could help with this? Would you recommend using one of those or is there other solutions? I've no problems using a real application server like glassfish or jboss. The end result doesn't have to be a war-file either.

EDIT: I'm trying to get rid of JSP so replacing JSP files on server is not enough anymore. Vaadin is plain Java code. Even in Spring MVC the controllers are Java code.

A: 

If you only change on your viewlike .jsp, .jsf you don't need to redeploy whole application.

You can point your server to refer them[pages] from there.

org.life.java
I've been using this technique but unfortunately(or more like fortunately) I'm leaving JSP gradually behind.
palto
@palto your comment is unclear to me
org.life.java
Basically tricks that speed up JSP development are not useful to me any more.
palto
@palto how? which view you are using then ?
org.life.java
Currently I'm using Vaadin, which is all java.
palto
A: 

There's a couple of solutions off the top of my head to this.

  1. Typically an Web/App Server will have a working directory, you'll find that if you replace the JSP page there, that your 'change' will get picked up immediately. This is even easier if you're using an exploded WAR file on deployment.

  2. JRebel can be used to speed up turnaround time

Changing to EJBs or OSGI is going to be a non-trivial change - speed of deployment probably shouldn't be your only driver for this.

PS: My web front end skills are a little rusty, so perhaps take my advice with a grain of salt

karianna
JRebel is interesting, have to check that out.
palto
A: 

Are your changes actually to UI elements, or CSS styles? We've had some luck with externalizing static resources like CSS and graphics, where the change can be seen simply by making sure your browser cache is empty. If you are actually changing the UI, I just watched the "30 second" Vaadin intro, and it that at least makes it look like any UI change needs a server restart to make visible. YMMV

mezmo