DHTML Target
From OpenLaszlo
This is a working page of issues for the DHTML target.
- See Legals_Project_Plan for big picture information, including milestones.
- See DHTML_Laszlo for developer notes and tools.
Contents
|
Definition Issues
Media
The OpenLaszlo platform accepts Flash (swf) files at both compile-time and runtime. Flash files are used to present vector graphics, authored animations, and to wrap video and audio files.
The Flash file format satisfies these requirements:
- Designer-friendly authoring tool
- Stroked and filled paths
- Linear and radial gradients
- Lossy and lossless images
- Hairlines
- Multbr animation
- Synchronized audio
We need to decide which of these features are supported in OpenLaszlo:DHTML. In particular, hairlines and stretchy gradients are common design features; are they supported in DHTML?
Proxied Mode
Does OpenLaszlo:DHTML support proxied mode?
- XMLHTTPRequest security schemes may require server proxying
- Can be worked around with JASON, a <script> tag can load from anywhere
Implementation Issues
Prototype Chain
IE does not support prototype chaining. There is no @__proto__@, and there is no @constructor@ for @super@. We need to figure out how to compile classes and constructors for this platform.
This has been solved by using Douglas Crockford's strategy for implementing class-based inheritance in JavaScript.
Views
Each view V compiles to a <div>, that contains V's child views.
Issues:
- Is clip=false possible? Does this require layers?
Layout
Views can be positioned using CSS position: absolute; margin-left: x; margin-top: y
.
Animation
- A global variable stores a list of animation records.
- LzNode.animate() adds a record to this list.
- When an animation is added to the list and it was empty, call doAnimations().
- doAnimations() steps through the animation list, executing animations and removing animations which have expired. If the list is empty when it ends, it invokes setTimeout(doAnimations, xxx).
Media Requests
DOM manipulation of the background property of a view's style.
Data Requests
HTTPDataRequest.
Data Binding
This is requires:
- A runtime XML DOM representation
- An XPath implementation that executes against that DOM
- A procedural interface for instantiating views
All of these seem easy.
Constraints
Use the existing compiler mechanism to build dependency functions for constraints, and port the event notification mechanism.
CSS
How should we use browser CSS support - clientside/serverside, roll our own, browser/DHTML or a combination the two?
Notes on FlashMX CSS support - Example of CSS in Flash
- RUNTIME SUPPORT
- multiple CSS styles can apply to different parts of text
- CSS can be external or programmatically generated
- only applies to HTML text in TextFields - p, b, li, a, a:link, a:hover, a:active, user-defined tags, classes
- COMPONENT SUPPORT
- v2 Components can use styles to adjust colors and text
- the following components are styleable - Alert, DataGrid, List, Menu, SimpleButton, TextArea, TextInput, Tree
- NOTES
- CSS is not supported in Flash Lite
Performance Issues
- What is the performance of a page that contains large number of absolutely positioned divs?
- What is startup time for an application that links in a large runtime library?