Tips and Tricks for Dekoh Developers
Posted on July 20, 2007 by rohit
Filed Under Programming, Technology, Uncategorized.
When I was asked to write this blog, I was wondering, writing the first official blog, what should I do? I thought I can see better from the developer’s view and so decided to blog something that will be useful for the developer. Instead, of writing a tutorial or a step by step how to I am writing a few tips that are considered to be common knowledge but i began using them on my current Dekoh Application assignment and they have helped me be much more productive than I would have been without this knowledge and eased the distribution of the application too.
1. Have a component.xml file in your Dekoh apps. This is like having a custom server deployment file, but it gives a lot of Dekoh power to your application. Like it will allow you to maintain versions and enable automatic updates, define dependencies and so on. Check this out to know the structure of component.xml.
2. To deploy a component you can simply drop the .war in the Dekoh\server\downloads folder and restart the server.
3. If you maintain a component.xml file, update the version in this file and create a war. Then placing this war in Dekoh\server\downloads and restarting the server will take care of updating the application.
4. To go to the dekoh server command shell, stop the dekoh service and from command prompt run dekoh_shell.bat/dekoh_shell.sh in the Dekoh\server\downloads directory. From the command prompt you can deploy,undeploy,start and stop the dekoh applications running on the server.
5. While in development mode you may prefer to directly deploy your working doc-root to Dekoh so that the changes you make to your JSPs/JS reflect immediately in the application.
6. Also set your compiled Java classes to be placed in doc-root\WEB-INF\classes so that they are also available as soon as you change the code and compile it. You’ll just have to restart the application (not the server).
7. To enable remote debugging of deployed application open the dekoh_shell.bat/dekoh_shell.sh file and remove the comment to this line set DEBUG_OPTIONS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005
and then connect to port 5005 using your favorite debugger.
8. Dekoh provides you various widgets for reuse, including script.aculo.us and also custom widgets for example Thumbnail Maker and Tag Cloud. If you want to make a custom dialog, you can use the Dekoh dialog as
new dekohDialog(”snipPreview”,
{
className:’dekoh’,
title: “Title” ,
height:previewHeight,
width:previewWidth,
minHeight:320,
minWidth:400,
content:divContent,
topMessage:metaDataDiv
});
Read this blog post to know more about using the bundled javascripts in your application.
9. In your JSP page or servlet you can use RequestContext.getRequestContext(request).isLocalRequest() to find whether the access is being made from the local machine or a remote end and deliver different content based on that.
10. Keep visiting http://www.dekoh.org and http://blogs.dekoh.com/ for the latest developer information.
Comments
Leave a Comment












