Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does one make a Grails application designer friendly without the need to re-deploy after a change to the view?

Tags:

grails

gsp

It has been a long while since I have really worked with J2EE so please excuse my ignorance. My recent engagement in a Grails project has peaked my interest in Java once more and especially in Grails as it makes building web applications on the Java platform fun again. That being said, I would like an expert to comment on the following requirement that I have for an application built using Grails:

The Design Team (web designers) require access to the GSP pages and edit the view files (layouts, templates, etc.) without bothering the development team (software developers). This scenario can take place both during construction and after deployment into production.

The communication level between the Designers, Developers, and Business Users are not an issue here. However, about 40% of the time, the Business Units involved request changes to the front-end that have no impact on the Developers time but require the time of a Design Team member. Currently, the deployment workflow follows the Grails application through the deployment of a War file to a Tomcat server. I imagine there is a simpler way to allow the Design team to make UI changes without going through the build and deploy lifecycle.

Several of the Design Team members have had exposure to PHP in the past and at times miss the ability to just overwrite a template file to make a UI piece more functional or improve a layout template. I hope there is a similar way to accommodate such simplicity within Grails. I have been told that exploding the War file might be an option but that still requires the reload of the Tomcat hosted application.

If you believe that I looking at the desired solution the wrong way, please do chime in as I am more interested in a workable compromise for all the team members involved. Thank you.

like image 994
Amir Khawaja Avatar asked Jan 24 '10 20:01

Amir Khawaja


1 Answers

You need to specify the following settings in Config.groovy:

grails.gsp.enable.reload=true
grails.gsp.view.dir="/path/to/gsp/views"

The 'grails.gsp.view.dir' is typically the path to your checked out SVN repo. You can then just 'svn up' everytime you want to update the views.

There is one caveat: When a GSP view is compiled it uses up permgen. Eventually you will run out and need to restart the server.

like image 164
Graeme Rocher Avatar answered Oct 09 '22 13:10

Graeme Rocher