Developer Notes on Porting to Legals
In a post on the Open Laszlo forums, rcyeager of cooqy described his experience trying his Open Laszlo applications in the latest preview release, PR4:
The demos in the PR4 Explorer work...but my "real-world" code fails miserably. I expected DHTML conversion issues, but to lose support of SWF mode compatibility is scary...and this is with Legals supposedly going to Beta soon? In my case, 100% of my V3 apps don't work in either SWF mode or DHTML w/ Legals PR4. Is anyone getting better results with their real-world V3 apps running in Legals?? So far the attempt by Legals to pull the tablecloth out from under the dishes has left my lobster dinner strewn all across the floor...
Jim Grandy's post about Legals Preview Release 3 sets the stage. My perspective on porting existing applications to the multiple runtimes infrastructure is based on converting the calendar demo. A few highlights:
- swf assets won't work in DHTML. To display a swf asset, you'd need the flash player; we're not using the flash player in DHTML, so, swf assets just won't appear. The solution here is to use bitmap assets instead of swf's.
- We haven't made all the components work yet in PR4. We've got open bugs in JIRA for all the component problems.
- drawview support was just added in the last few days; it's not in PR4. Look for it in beta 1, at least for firefox. (IE support is still in progress, I think.)
- DHTML doesn't support embedding fonts; swf does. If you try to embed a font, you'll get a compile warning, and the text will look ugly, or it won't appear at all.
- The flash runtime is permissive about derefrencing a null reference and getting properties on an undefined object. DHTML blows up if you do this.Because it was permitted in swf, lots of code doesn't check for null. All the places that don't check for null need to be tracked down and fixed, both in the LFC, the components, and application code. This was the source of at least half of the problems I had.
The overall story is that we're still getting up to feature-complete, and we know we've got a lot of optimization and bug fixing ahead of us. We really appreciate all our users, especially when they take the time to post their concerns and problems. Keep the bug reports coming, and we'll keep working.









November 12th, 2006 at 1:00 am
How does one check for null pointers correctly without the test itself causing a reference to a null pointer?
Thanks
November 12th, 2006 at 1:01 am
What’s the expectation for performance of the DHTML version please?
November 12th, 2006 at 5:31 am
Is the nightly build stable or we have to wait?
Thank you,
Abdullah
http://www.WeArab.Net/
July 13th, 2007 at 4:13 pm
To check for null pointers without causing a null pointer exception, do this…
if (”something” in this && this.something) {
…
}
July 13th, 2007 at 4:17 pm
Performance expectations for the DHTML runtime are “pretty good” and “maybe a bit slower than Flash on the same machine.” The browser matters a lot, though; in particular, IE6 is way slower than anything else.
There is some performance data in http://svn.openlaszlo.org/test/performance/analysis sorted by build id. Later builds have higher numbers, and smaller results are faster.
July 13th, 2007 at 4:19 pm
The nightly build is unstable by definition, but we do periodic releases that are more stable. The most recent release is 4.0.2, and we’re coming up on 4.0.3. The 4.0.2 release can be found here:
http://download.openlaszlo.org/4.0.2/