« Back

UI Developers, make your life easier

General Blogs October 24, 2013 By Iliyan Peychev Staff

Last week, during Liferay Spain Symposium 2013, Olaf Kock recorded a new episode for Liferay Radio with your truly. I talked about my life as developer in Liferay, about the development process of Liferay Portal 6.2, about AlloyUI and so on. The episode will be published soon.

As you probably know, I'm working on everything, which is somehow related to UI - Alloy, Portal, Plugins. During our conversation, we talked about the way I'm developing software and one of the things I mentioned was that I try to minimize as much as possible the time I spend after every change in JSP, JS or CSS. Let's face it - deploying manually to Tomcat and refreshing the browser page after that is boring. And everything which is boring, should be fixed.
Keeping that in mind, some time ago I tried to resolve this issue. For that purpose, I get a program, called LiveReload, which tracks the changes on the file system and applies those in CSS and HTML immediately, without refreshing browser's page, or if the change was in JS, JSP or JSPF - refreshes the page.
I applied this to AlloyUI relatively easy, but the tricky part was to apply the same pattern to Portal, so initially I left it. However, after my conversation with Olaf, I felt it is time to achieve it. Surprisingly, I turned to be very easy:
The first step should be to apply the changes to Tomcat immediately, without redeploying manually. I know two ways to achieve this, and here I will talk about the second one - using JRebel. For those of you, who missed the blog post by Miguel Pastor about JRebel, here it is.
The second pass is to apply LiveReload to Portal. This is easy and works very well.
What you gain? Changes in CSS and HTML in Alloy and Portal are being applied immediately, without even reloading the page. In case of changes in JS, JSP, JSPF, etc. - LiveReload reloads the page.
Hope that will help someone to save some time and spend it for real development!
Threaded Replies Author Date
Thanks a lot for the suggestion Iliyan, this... Jorge Ferrer November 5, 2013 8:46 AM

Thanks a lot for the suggestion Iliyan, this tool rocks!

It took me a while to make it work in linux though, so for those interested here are my installation notes: https://gist.github.com/JorgeFerrer/978a35aa6dd63a856edf
Posted on 11/5/13 8:46 AM.