Re: HTML is declarative on purpose [was: Web neurons ]

Art writes:-


>>You wouldn't need applets if HTML was improved.

>Yes, you probably would.  As soon as you give people enough power, 
>to do simple things, they will be wanting to program whole database
>systems in it.  

I really don't believe you would. Any database and database handling program can be duplicated by linked HTML pages with suitable HTML extensions that allow:-

        Triggering of other pages (this can give multi-tasking capabilities)
        Data to be passed between pages
        Data to be stored in pages, and named
        Simple logic flow (IF, ELSE) acting on stored data names 
        String handling
        Links to be made/broken
        Pages to be created/deleted
        (things I didn't think of yet)

all automatically.

In this I am thinking that each HTML page represents one database element.

It may look like a lot but not that many extensions are needed, just the right ones (IMHO).

Databases have to do things like - find, sort, add (record), delete, goto next, 
update, etc. 

As a crude example -  to find say Mr Jones' record in an HTML address book:-

Input "Jones" from the user.
Trigger the first Surname element page, and pass "Jones" to it.
Store "Jones" as say ARG1 in that page.
Suppose the contents of this page were "Bloggs" stored as CONTENTS. 
Also, that the record number "1" is stored as RECNUM.
Do a test - IF CONTENTS=ARG1 then trigger a result page and pass it RECNUM.
   ELSE, trigger the next Surname element page (in record 2) and pass it "Jones"
Carry on until you get a match,
   or the last element passes say "No match" to the results page.
The record number could be stored as text in the results page and displayed.

Note there is no need for a search Loop as in standard languages. Only one simple IF ELSE per element page. In fact maybe Looping should be banned.

This does involve a radically different programming strategy. Each database element now becomes a sort of "object" with its own code, and with explicit links to other elements.

I wish I lived in Hawaii too.
---------------------------------------
John Middlemas
john@eco.powernet.co.uk

Received on Thursday, 30 May 1996 22:23:39 UTC