19 July 2004
HTML integration in CE applications
In two previous entries, I had discussed tips on developing on Windows CE and trapping events from the Web Browser control. I had been researching integration of an HTML UI in a CE application for a hypothetical company I work for. Here are some details on what I've found.
The Ideal Design
The primary requirement is to have dialog resources external to the application and to have their layout and underlying logic externally editable. The original design was to use XSL to implement application screens. The screens would need to include database integration and to validate user actions. The following technologies would be used to get the features we want:
- HTML - provides page layout,
- XML/XSL - merges database data into the HTML layout,
- COM connection points - provides HTML event notifications
HTML 4.01, implemented in the XSL files, would be used for all of the control layout on the screens. HTML provides the basic Windows controls (e.g. edit boxes, list boxes, buttons, etc.) that would be useful in a CE application. Tree and list controls (multi-columned lists) would require more advanced DHTML coding, but they are less useful within the CE form factor.
XSL would be used to populate the screen with database data in the form of XML documents. In the MVC pattern, the XSL/HTML represents the view and the XML document represents the model. The XSL can also integrate secondary XML files to populate lists for choosing among valid selections.
The only viable option for displaying HTML content on CE is to use the HTML Control. It consists of a very small API to create and manage an HTML window. This control has an additional set of limitations to deal with; it apparently only provides a subset of what PIE provides. The most notable deficiency is that external script files cannot be used--they must exist in <SCRIPT> blocks. Finally, the only HTML events that can be trapped from the HTML Control are link and button clicks.
Here is a summary of the issues:
- No Web Browser control interfaces,
- No DOM,
- Limited XSL support,
- No external script files (HTML Control),
- Limited event notification (HTML Control)
My ultimate solution was to write code to replace the missing features as best as possible. With that additional code, I supported a subset of all of the features listed above and, although not perfect, achieved much more than if the HTML Control were not available.
- Some thoughts on Ruby after finishing a week (minus one day) of training posted by sstrader on 15 December 2011 at 8:59:30 PM
- Links on the singleton pattern posted by sstrader on 9 December 2011 at 9:19:50 AM
- Phonebot posted by sstrader on 29 October 2011 at 6:37:05 PM
- The labeled break in Java posted by sstrader on 4 September 2011 at 11:27:56 AM
- Recent code project posted by sstrader on 1 July 2011 at 7:33:06 PM