eWebOS...
Autonomous web documents
by Gérard Verron - November 2001
The concepts of "Autonomous Web Documents", and "ewebOS" follow the writing of ePlanning:
Time had come to provide a unified environment for this development. Although I am not a programmer, I submit the following lines as a contribution on this subjects to explain the dispositions that I have implemented for this undertaking.
Strangely, till now, the idea of autonomous web documents (or autonomous web applications ) has not yet been developed. Presently what is called as web applications are merely web pages parsed on the server, according to the commonly used client/server architecture; which is usually called the "light client concept":
Fortunatly, "The light client dictat is breakening", as users rightly find unbearable to be "hooked up" on a server while using them.
The "autonomous web document" concept is the result of the dispositions that I have developed to break this dictat. It write it to contribute to the evolution of this breakthrough, and to share experience in the development of such subjects.
The aim of this document is to provide a framework and examples. It will be a constantly evolving document, as these dispositions are at development stage
Basic common sense rules are proposed to be discussed in the autonomous web documents forum.
The following functional innovations are developed:
This site contains some technical innovations that you will be able to see only there (at least at issue date):
This file is also an "all in one concept" for easy download (except for images). Have a view at its header script, and copy it for your own use as it includes a useful "automatic toc" resource, which provides immediate "on the fly" generation and display of a document table of content.
The best way to use autonomous web documents is to take a demo file and adjust it to suit your needs. All I ask is to keep the top tags and its dedication to the Iraqi civilisation who has inspired the development of this web concept.
View http://eplanning.free.fr to see these demo files.
A unified client interface can start to be developed, as NS6 is becoming more serious about DHTML rendering since it is being replaced by MOZILLA.... (Personally, I consider NETSCAPE developers as criminals, because their deadly sectarian attitude is largely responsible for the marginal share of LINUX).
However several limitations remain for mozilla based browsers:
Following these cross-browser checkings and despite the strict W3C compliance of our code, present bugs in Mozilla prevent a correct display of autonomous web documents. We hope that next versions will rectify this soon.
Presently outlook express does not provide an access to the file system object; Sorry I can do nothing against that.
Typical web applications - server based - are found at
http://www.hyperoffice.com/
www.blox.com/
www.mywebos.com/
webfx.eae.net/webboard/
autonomous web documents and ewebOS depart from these applications that rely deeply on the server, and that leave the client in a situation of heavy dependency
Preambles of "Windows-like cross browser application interface can be viewed at:
www.brainjar.com
www.dhtmlcentral.com (Thomas Bratta website)
EwebOS makes use of these examples for the display of its "pseudo-windows", and extends them by:
Dhtml GUIs (Graphical Users Interface) are a developing matter, an interesting example of CrossBrowser Technology is at:
www.dhtml-guis.com/code/by/module/
Notably they have developed a "Poem" example (try the game ) where the data is saved in a cookie instead of the file system.
Autonomous web documents intend to address a more fundamental concept, the one of "data/application string exchanges".
To understand this, Autonomous Web Documents consider:
- the "data stream" strings
- the "client interface" strings
as equivalent but distinct text strings that can permanently generate scripting objects at runtime. The "client-interface" as well as "data" can consequently be dynamically exchanged within the same document.
This is done simply by appending or adding strings to the document at runtime, and by distinguishing the "data stream" strings from the other application scripts. At saving time, the autonomous document collects the "data stream" and appends it with the script strings. This forms a document which can be saved locally or on a distant server. This mechanism can also be extended as well to the application script by making use of the "DEFER" script attribute. It provides Autonomous Web Documents with dynamic customization capacities (customize menu).
This capability needs a high consideration, as it distinguishes autonomous web documents from traditional compiled applications.
No server scripting or CGI programming is used, also calls of external Applets or VB components is avoided. Standard Javascript is exclusively used to avoid additional resources.
To be immediately usable and fastly transferred, autonomous web documents are light and compact. Everything can reside in a maximum size of 100/200Ko .
- I do not like cookies which I consider as an intrusion, yet when applied at local level only, and strictly limited to the conservation of user settings, this may still be considered as a minimum harm
- Behavior has to be implemented and developed
Header | Document data |
Windows library |
Styles |
Menus scripts |
|
Application scripts | Scripts |
Body | Data |
Extension scripts |
A autonomous web documents consists of three main blocks:
All the styles are grouped in one same stylesheet, which is managed by script so as to group all the resources in a single document.
id style attribute (#men and #win), are indicated in front of each selector, also, clear descriptions are used so as to avoid any messy style confusion in the included documents
Preferably leave the basic windows menu library, and insert the menu application scripts in the application library
Prefer external dialog windows for any browsing with undefined external resource.
Have a look at the sample, it appends the document in the following order
For application script appending, use an identifier (#app+whatever) for each application style rule to avoid messy problems.
Grouped in a single script libraries for exchangeability and easy customization. I like to classify them by menu order order, with group names for easy understanding
It depends on the application. The data structure is presently displayed as a text string. XML representation will be the next step :
They form a set of arrays for eTablor and ePlanning applications. Savings are being done by getting the array elements, and building separate text-files from these elements, one for the style, one for the data.
The basic feature of a autonomous web documents is autonomy. Everything can reside in a single web page that can be sent to non experienced user who should not have to bother with images or files attached to the application.
When the client wants to save or to mail its file, a script function collects the string scripts, the style strings, and the datacache. This builds a new html document which can then be saved on the client computor.
As the data file which is in cache is represented as a html string, a autonomous web documents can have the possibility to save and import
When opening a web application file, the scripts read the datafile, and keep it in memory so that it can be appended or modified by the client browser.
Data and document formating management are distinguished by using script styles management; for this, I had to break Netscape undisclosed script access to styles management (this is a scoop!....) sorry for showing Netscape addicted that their preferred developers are "crooks" who steal Microsoft ideas and who do not implement them totally. The shame on them for this old silly "InsertRule" function, which hopefully should be soon replaced by "addRule" with excuses.
Can be done on the client PC for IE based browsers only (as MOZILLA/NETSCAPE do not implement the FileSystemObject which provides access to a windows PC file tree...)
I have written a javascript imitation of the Microsoft "common Dialog Window" to provide immediate access to the local PC system.
The present script provides in a 6Ko script almost the same functionality as the Microsoft 110Ko "Common Dialog" window.
Getting and posting data to distant servers, require the opening of a separate instance (iframe or dialogwindow), to provide the necessary server interaction. This presumes that the server has a server script to handle this interaction, and that you are registered on this server.
The"common Dialog Window" developed for this is obtained from the server. It is similar to the Windows common dialog
You can post a autonomous web documents or its content directly from within the application.
At present stage, due to the limitation of the "mailto" client protocol, the script makes use of a php server script.
This is presently the only situation where autonomous web documents need the use of a server. This limitation should find quickly a solution as it should be easily possible to parse a multipart smtp header from within a client script.
The present php3 script sends the whole html string as an attachement. As a consequence, the browser of the recipient displays immediately the web application.
Even more, this document can be revised from this mail browser. This gives a striking effect, as no other compiled application can do that!
It is the most striking feature of autonomous web documents. It is done by getting javascript files and adding them to the javascript document objects . The innovation is very simple once it is disclosed; it consists only in creating a temporary child dialog window, which is used as a temporary container of the new http instance (avoid screen refresh on the parent window) , and having the main file preconfigured for this transaction process.
When exchanging documents by mail, if attached files are enclosed in an accompanying folder, a great chance exists that this folder is forgotten or badly copied in a subsequent process, then the application becomes unusable.
To alleviate this, each application document should include its complete UI (User Interface), including its images, therefore these images have to be scripted. This UI must be compact so as to exchange light portable application documents.
The following "Graphical User Interface" basic components have been developed and are included in the application header scripts.
To shorten them, string return functions are employed each time a string is repeated.
Many types of drop down menus are available on the web, most of them made of long-tedious script. Ours is compacted in 4 functions and 20 self understandable script lines.
They are inspired from webfx.Drag-drop is only initiated for one tool-bar (to be developed)
Pseudo graphical script icons are used, by making use of a hover effect on a link tag.
Enough is enough: NETSCAPE sectarian attitude against "Wingdings", "Webdings", "Dingbats" and other web characters, can be overcome with unicode characters. However, even on this NETSCAPE is very limited in UNICODE display in its basic configuration. So this is somehow a headache..., and consequenly, at present stage, webdings are heavily used
(view http://www.hclrss.demon.co.uk/unicode/for
more information)
The best to develop scripted images is to look at existing ones and adapt them.
They are derived from Thomas Brattle script (www.dhtmlcentral.com).
Instances of several internal frames inside application windows has to be considered to allow the use of concurrent instances within one application. (I would like Iframes with scriptlets like with the menu3 of http://webfx.eae.net ...but once again, I face the Mozilla/Netscape sectarian attitude)
Basic scripting concepts
The body element is almost empty: It is mainly a container which includes the following divisions
Use of frames: Presently limited because the buggy ns6 is resisting anything but the topmost z-index for iframe generation, hiding dropdown menus....
Textarea input boxes are used instead of Iframes "design/edit mode" to provide compatibility to NS users. .
Sharing resources require the setting up of common server resources. The autonomous web documents concept is a powerful tool to develop a windows like serverOS interface.
E project OS provides intuitive access to repertories, files, and applications shared on a web project server.
E fileManager provides intuitive file management of repertories, and documents shared on a web project server.
It includes all the main functional of the windows desktop:
You may use the technique published in this paper as you want. You may copy the scripts provided here, modify them and use them for any purpose.
The only condition is that if you publish web pages that use this technique you point to its author at a suitable place and don't remove the Author's Statement,(especially its dedication to the Iraqi population whose dignity - after more than 10 years of monstruous embargo - has inspired these lines).
If you publish web pages that use this technique it's your responsibility to handle possible bugs even if you didn't modify any script. I cannot promise any support (I am a Construction Manager not a programmer).