Revision as of 01:51, 14 March 2006 by Jylee (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Use _dev directory to cut down Zimlet development cycle

Typical software development involves the cycle fix -> build -> test -> fix ... It can be particularly cumbersome because Zimlets need to be deployed to the system in order to be tested. You might fix a typo in the xml, then need to deploy, possibly restart tomcat, then reload the browser to see the change.

There is a Zimlet dev directory to address this issue. It is a special location /opt/zimbra/tomcat/webapps/service/zimlet/_dev directory (replace /opt/zimbra/tomcat with your own Tomcat install directory). The Zimlets stored in the dev directory is read each time it's needed. For example, you can test the Hello World Zimlet by doing the following

 $ mkdir -p /opt/zimbra/tomcat/webapps/service/zimlet/_dev/com_zimbra_hello
 $ cp com_zimbra_hello.xml /opt/zimbra/tomcat/webapps/service/zimlet/_dev/com_zimbra_hello

Then simply reload the browser to load the new Zimlet in dev directory. Now you don't need to go through formal Zimlet lifecycle management of deploying and undeploying in order to test your new Zimlets. Each time you edit the contents in _dev directory, just reload the browser. When you are ready to deploy to the all the users, you can then create a zip bundle and deploy on the machines.

This feature is not supposed to be used on the production machines. Because the Zimlets in dev directory is read often it creates a lot of disk activity. Use dev directory only on your development box. Do not create dev directory on the production machines.

Javascript Debugger

There is a very popular Javascript debugger plug-in for Firefox browser called Venkman. You can inspect objects and variables, see the call stack, set breakpoints and step through the program. Very useful.

Jump to: navigation, search