[web-devel] missing web component needed: server-side page control
Alberto G. Corona
agocorona at gmail.com
Tue Jun 22 07:23:26 EDT 2010
Hi web haskellers.
A few days ago I mention the need to have server-side page control
available in Haskell. ASP.NET and JavaServer Faces have it.
I would like to collaborate with anyone of you interested. I have not
much time now but this can change in the coming weeks so I want to
know the interest on the subject in advance. I also want to receive
comments to the development plan.
The main advantages are:
-No Javascript, no Ajax needed when developing dynamic HTML pages
(All code becomes pure haskell in the server!!)
-No errors in advanced dynamic HTML code: all is statically typed
haskell (someone bets more?)
-Clear separation of HTML presentation from page control code
-Extensibility: makes possible to create custom controls, like HTML
tables automatically generated from haskell containers etc
All this will unleash the full power of haskell in the Web!!!
It is compatible and orthogonal with page templating and all other web
stuff. I think that it is a two month work.
basically what we have to do is the following:
0 develop a Haskell HTML DOM library. Just 31 objects to manage HTML trees
See the HTML DOM Objects Reference at
http://www.w3schools.com/jsref/default.asp
I suppose that this is not yet done
Can make use of the XML structure defined in HXT
http://hackage.haskell.org/package/hxt-8.5.2. HXT has namespace
support. This is needed for defining custom attributes and tags (4 and 5).
each HTML DOM method will do two basic things:
a) update a copy of the HTML page tree in the SERVER
b) send trough an Ajax channel the equivalent javascript
method, that will be executed in the web browser
3 create a minimum javascript module that:
read Ajax responses and execute them in the web browser, for
the above functionality
listen for events and forward them to the server trough Ajax.
4 define additional XML attributes to be interspersed in the HTML tree for
specifying url' s in the server where the server events will be
forwarded (for 3)
<button server:onclick="http://server/path...">
5 a mechanism for defining custom XML tags for extensibility: with
the name, the parameters and the library code that handle it
example of custom tag inserted in the HTML: <t:table
t:source="#{hasjkelldata} param1=......>
6 some templating that read 5 and produces a HTML tree and Haskell code.
So, people, feel free to question anything. This is just the starting
point to put ideas in the table and discuss all of this
More information about the web-devel
mailing list