Overcoming the Multiplicity of
Languages and Technologies for
Web-based Development using a
Multiparadigm Approach
Sameh El-Ansary
Donatien Grolaux
Peter Van Roy
Mahmoud Rafea
Web technologies
Original design (CERN): easy means of
communication for physicists all over the world
Content is static in essence and lasts forever
(Was supposed to display mathematical formulas)
Nowadays:
Content is interactive, often dynamically generated
Multimedia capabilities, WIKI, etc
(Still no easy way to display mathematical formulas)
October 7, 2004 QHTML
Evolution of web
technologies
A lot of $$$ went and is still going into the
web business
Evolution was rather chaotic
Inheritance from the past, strong inertia
Lack of uniformity, W3C is supposed to fix that
• Web browsers still render differently many pages
• Many holes were filled, with many different
technologies
October 7, 2004 QHTML
A web application as a
client-server application
Page description: HTML
Page presentation: CSS
Server side application: Perl, Python, …
Server DB: SQL, XML, …
Client side application: JavaScript, VBScript, …
(Browser abstraction layer)
Web developers need to master many different
paradigm/programming languages. It is a
complete mess.
October 7, 2004 QHTML
Disclaimer
We do not intend to fix this mess
Instead, we take benefit of Mozart/Oz to
overcome some of these difficulties
This is a proof-of-concept experiment
There is a functional implementation for
Mozart/Oz users
October 7, 2004 QHTML
Why Mozart/Oz can help ?
Part of the problem is:
The content to display is described using a structured
declarative symbolic data structure (HTML+CSS)
Server side computation to generate the HTML and
implement the business model of the application is a real
programming language (Perl, Python, …)
Client side computation to interact dynamically with the
user is a real programming language (JavaScript,
VBScript, …)
Classical imperative programming languages don’t
support structured declarative symbolic data
structures, they process it as generic text
Main reason of the poor integration with HTML
Mozart/Oz is different : Oz Records
October 7, 2004 QHTML
QHTML
Toolkit for Mozart/Oz, a web page is
considered as a regular GUI window
HTML QHTML Window
Description: Oz record
CSS QHTML Look: Oz record
Server side computation Mozart/Oz application
Client side computation None, everything is on the
server
Server DB None in QHTML; Sameh’s
Oz Sqlite
October 7, 2004 QHTML
QHTML Example
October 7, 2004 QHTML
Example Code
declare FH TAH
Desc=toplevel(td(glue:nswe
lr(glue:nwe
button(value:"Save" glue:w action:Save)
button(value:"Load" glue:w action:Load)
file(glue:w handle:FH)
button(value:"Quit" glue:e action:Quit))
textarea(glue:nswe handle:TAH)))
proc{Save}
{WriteToFile {FH get(value:$)} {TAH get(value:$)}}
end
proc{Load}
{TAH set(value:{ReadFromFile {FH get(value:$)}})}
end
proc{Quit} {Window close} end
October 7, 2004 QHTML
QHTML Window
QHTML is a GUI toolkit
No need to know HTML, CSS, Java, JavaScript, …
QHTML documentation is self contained
Very close to the QTk philosophy
Correctly formatted description record
Handles offer a natural bridge between the declarative and
imperative paradigms.
A QHTML Window can be connected/disconnected to an actual
browser for rendering
• The same window can be migrated between different browsers on
different computers/platforms
• Fault management: from the application point of view a QHTML
window is always working, no matter if it is currently being
rendered in a browser
Classical web approach: one window per client, instantiated
from the same description window
October 7, 2004 QHTML
Current State
QHTML Web page:
[Link]
QHTML is stable
QHTML is complete wrt toolkit capabilities
Documentation is very complete:
[Link]
html
Implemented using DHTML, but for now only Internet
Explorer variant is fully supported
October 7, 2004 QHTML
Conclusion and Future work
Conclusion
QHTML is not the next standard web technology, it uses
current standard technologies in a more convenient way
QHTML is proof of concept: a programming language
with structured data structure support is more suited to
the task than current classical web technologies
Future Work
Fix QHTML Web Site !
Support more browsers
Enable client side computation
October 7, 2004 QHTML
The End
Thank you for your attention.
October 7, 2004 QHTML