08.31.07

Reporting a bug — with guest blogger Maynard Demmon!

Posted on August 31st, 2007 in General, Development by benshine

Getting a bug fixed on an open source project can be a frustrating experience. Learning enough about the codebase to fix the bug yourself may not be something you have the time or expertise to do. To increase the odds that your bug will be addressed you want to make it as attractive to the developers as you can.

One of the best ways I’ve found to make a bug report attractive is to provide a clear and concise test case. In a GUI application this might be a sequence of steps to reproduce the bug. With a development platform like Laszlo a test case is the simplest piece of code that consistently demonstrates the bug.

The key words here are simple and consistent. The test case needs to be as simple as possible so the developer can quickly focus in on the problem and consistent so that the developer can be sure that their changes actually fix the bug. When providing a test case for in a Laszlo bug report you
should keep the following things in mind:

  • The test case should be a complete application. Included everything between the opening and closing <canvas> elements. A developer shouldn’t need to write additional code to get the test case to run.
  • Collapse the test case into the minimum number of files needed to reproduce the bug, ideally 1 file. This includes dependencies on assets such as fonts, resources, external datasets, etc. A developer doesn’t want to have to pull down and manage a bunch of different files from the bug tracking system.
  • Make sure any commentary provided in the test case is inside an XML comment tag. A developer shouldn’t have to snip out the relevant parts of the test case from a sea of commentary about the bug.
  • Simplify the test case as much as possible. Remove everything that is not needed so that the developer can focus in on what is not working.
  • If you can construct code that is very similar to your test case that does work correctly provide that in the test case as well. For example maybe a bug only shows up if you use a $once constraint but not with a $ constraint.
  • Provide precise details of the environment within which the bug occurs. This should contain the following:
    • The operating system.
    • The web browser name and version number.
    • For SWF the version of the flash player.
    • The version of the LPS used to compile the test case.
    • Any parameters used during compilation such as lzr=swf8, debug=true, etc.
    • The version of the java runtime the LPS was using.

Maynard Demmon is a Laszlo Systems developer. Maynard has filed some great bugs with the right amount of detail and easy test cases, making them a breeze to fix. See, for instance, LPP-4370, drawview doesn’t respect visibility

08.15.07

LZProject - an OpenLaszlo 4 Blueprint Application

Posted on August 15th, 2007 in General, Documentation by Raju Bitter

OpenLaszlo 4.0 is the only RIA technology capable of generating DHTML/Ajax or Flash out of the same code base. With the announcement of OpenLaszlo 4.0 in March we have triggered a new wave of interest in the OpenLaszlo technology. But still many developers wonder how they can integrate OpenLaszlo with their Java back end system. LZProject will provide answers to some of these questions and give you a good overview of the general architecture of an OpenLaszlo application.

LZProject - OL4 Blueprint App

LZProject includes both the client application, written in LZX, and all necessary back end components, including Java servlets and a small Apache Derby Java embedded database. It’s been designed to be simple to deploy and easy to modify. The application supports English, German and Korean locales at the current stage. We hope that you’ll download and use the application as you read the white paper, and, if you’re a software developer, that you’ll download the sources and play with them too.

You can download LZProject as a Java Web Application (WAR file) and deploy it on your own Java servlet container. The WAR file is the SOLO version of LZProject, containing two SOLO compiled files (SWF/Flash7 and JavaScript) of LZProject. It will run on any system capable of running a Java servlet container such as Tomcat 5.0 or higher. LZProject has been tested to run in DHTML mode in Firefox 2.x, Safari 2, Webkit, Opera 9.22 (still displaying a warning for DHTML runtime). The Flash runtime version will run in any Browser with at least Flash7 support.

The complete source is available from the OpenLaszlo Subversion server at svn.openlaszlo.org/labs/lzproject. Build instructions can be found in the Wiki, including a screen cast showing how to build LZProject.

We hope that the OL4 Blueprint App LZProject and the accompanying white paper will contribute to an even wider OpenLaszlo adoption around the world and are glad for any feedback on the application and the white paper.