NYCPHP Meetup

NYPHP.org

[nycphp-talk] was Presentation URL--cross-browser

Jayesh Sheth jayeshsh at ceruleansky.com
Thu Aug 26 11:56:36 EDT 2004


Hi Susan and Mitch (and others),

The idea of XUL has inspired many other non-Mozilla XUL-like technologies.

Examples of these are XML interfaces provided through Flash (Lazlo
Systems) or through Java (Thinlet and jXUL).

Adam Lock (who previously worked for Netscape as part of the Mozilla team
before it was disbanded) has produced a Mozilla plugin for Internet
Explorer (IE). It installs the Mozilla engine (Gecko) as an ActiveX
control for IE. You can get it here:
http://www.iol.ie/~locka/mozilla/mozilla.htm

(Adam Lock also has a similarly-named, but different project for embedding
ActiveX controls inside of Mozilla.)

I should also point out that it is possible to create semi-rich web
applications using web services (XML-RPC / SOAP) and HTML and JavaScript.
Some people from NYPHP were nice enough to send me GMail invitations after
my presentation, and I got to try it out. It seems that GMail is taking
this approach, although I have not really inspected its code.

The deal with using HTML + JavaScript + web services for semi-rich web
applications is that you are still stuck with the rather inflexible HTML
widgets. For example, an HTML drop-down box's contents (<select> <option>
</option> </select>) cannot be edited directly. Mozilla provides an
attribute to turn on this feature (editable="true", or something like
that).

Additionally, some Mozilla widgets are designed to hold thousands of rows
of data. (Specifically, the column display widget used to display rows of
email titles in Thunderbird / Mozilla Mail).

If you think of an otherwise excellent traditional web application such as
Squirrelmail (webmail app using PHP), you will realize how much better it
would be if it had been implemented using something XUL-like. For example,
to page through rows of email titles, one would simple have to use the
scrollbar.

I think that if you want cross-browser compatibility for a rich or
semi-rich web application, you could go with a commercial Flash-based
product such as Lazlo System's presentation server or with a more
cross-browser-friendly HTML + JavaScript + Web Services approach.

XUL has many built-in niceties such as tabs, editable widgets, etc. which
have no direct HTML equivalents.

I think in its current state, XUL-based applications are ideal for
Intranet-based applications, and particularly for data-entry oriented
applications.

Often with data-entry oriented applications, one has to present many input
fields spread over many different "pages" / screens. Mozilla's tab or
wizard tags could come in handy here.

Also - with XUL + JS + Web Services + PHP / MySQL, once data is entered
and the Submit button pressed, the data can be passed back to the server,
and validation errors can be displayed using a JavaScript alert or by
highlighting a relevant field, all without the dreaded page-refresh. Thus
input validation can be done on the server (PHP) side, and the results of
that validation can be displayed on the client side.

Libraries such as PEAR's HTML_QuickForm provide separate validation logic
for the client and server sides. Even though this logic is automatically
generated, it is worth pointing out that with a rich web app using XUL,
this validation logic would only have to be written once (on the
server-side).
Thus validation logic could be "hidden" on the server-side, or use more
complex server-side information analysis (such as seeing if an entered zip
code is valid), yet intervene on the client-side.

I hope that all makes sense ...

- Jay



More information about the talk mailing list