This is a software architecture essentially based on the integration of traditional development languages, methods, frameworks, with an XML, XHTML or HTML based user interface.
The purpose of this architecture is having the most standard and powerful user interface platform like HTML and its extensions (XHTML, Flash, JavaScript), in programs which still behave in a stable and usual way. This can be thought of like a client-server programming model, in which the client and the server are mostly on the same machine
Basically the key is the extensive use of embedding.
The last time I checked out Mozilla's development status, I saw some steps in Mozilla's automatic control by some interfaces, like telnet, Greasemonkey, JSSH but I wasn't able to actually control the DOM whith the last one. I didn't develop for Mozilla since that.
Our need depends on the actual architecture we use. I worked on the following ones, in the last years:
This is a way I used in a very protected environment, in which we didn't want any user to access the operating system's
controls directly. The main application is the only window shown at full screen on the desktop, and the only
widget contained by it is the web browser control.
This way is the main application which contains the low level code. The web browser only shows web controls
and calls the main application's methods.
var browser = new ActiveXObject("InternetExplorer.Application")
browser.visible = true
browser.navigate2("http://www.darius.co.hu/")
while(browser.busy)
WScript.sleep(20)
browser.document.getElementsById("p")[0].innerHTML
= "dynamically injected text"
browser.document.forms[0].submit()
I first used this architecture on Tablet PC's with 1000Mhz CPU. First I tried to make a normal web application through
IIS - HTTP - Web Browser, but I was very annoyed by the long page loading delay. Now we have much faster CPU's, so this
isn't necessary anymore. Even complex page rendering with embedded components is fast enough on 2GHz processors.
If You have a slow environment for any reason, the Windows solution needs to cut off IIS and set the correct permissions
in Internet Explorer, for the local security zone. The main application could be the best place to set the correct
registry values and let the embedded browser run without security warnings.
I wanted my software to be stable as well, but many movie playback ActiveX controls plus other ones in HTML pages
some times led to nice crashes. The solution was separating working services's processes from the UI, so that after a
UI crash, that could be restarted and reconnected to the still working services - let's say video recording components,
network operations, and so on.
Using JavaScript can also be easy to recover an HTML page from a crash: it's enough to capture any UI event
(mouse, keyboard, stylus), and record a journal somewhere. This way, after a UI crash we can restart it with
the very last pressed key restored, and even stylus strokes on Tablets.