Inspired by the recent spate of meditations on this subject, I knocked together a very, very sketchy script. So far using the script looks something like
my $h = HTK->new(); HTK::Text_Field->new($h,'test'); $h->main_loop;
And it would open a browser and display a text field containing 'test', and theoretically respond to use events and so forth.

How ever I've already run in to one problem: good old server push, namely the server can't send data to the client unless the client requests it. To solve this I create an invisible frame that refreshes itself every second. Then I can simply send a small bit of javascript to this hidden frame that causes the main frame to reload itself. Already I'm getting in to portability issues having to use javascript.

Thats not really why I'm writing this though. Why I'm writing this is two fold:

A) Does this have any practical point? Would anyone actually use this for something? Is the cross-platform abilities of html worth the lack of "gui power"?

By gui power I mean that in html there are really only two ways to receive events, one is you click on a hyperlink and the other is that you click a 'form submit' button. There are of course other issues related to this.

You could implement certain other features with javascript, but if you end up writing such complicated and probably non portable javascript, whats the point in using html as a gui, why not just use gtk or something?

B) Assuming "yes" to A, is the interface any good? Should I stick with trying to mimic other gui tool kits or would it be better to hand craft the html and then have the program try to guess which events it needs to receive?

In reply to HTML as a GUI: part 32,523rd by BUU

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.