caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Sven LUTHER <luther@dpt-info.u-strasbg.fr>
To: Mattias Waldau <mattias.waldau@abc.se>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Using HTML as a standard GUI for Ocaml
Date: Sun, 1 Apr 2001 22:11:11 +0200	[thread overview]
Message-ID: <20010401221111.A635@lambda.u-strasbg.fr> (raw)
In-Reply-To: <AAEBJHFJOIPMMIILCEPBOEIECHAA.mattias.waldau@abc.se>; from mattias.waldau@abc.se on Sat, Mar 31, 2001 at 11:31:43AM +0200

On Sat, Mar 31, 2001 at 11:31:43AM +0200, Mattias Waldau wrote:
> - Is the idea below good or bad?
> - I am looking for ideas how to implement the idea below.
> - Making some kind of JSP/ASP-package for Ocaml could be a solution,
> but code likes that gets very messy.
> - What has been done? Unpublished code?
> - Alternatives?
> 
> Using HTML for GUIs
> ===================

can be a good idea, depending on your use.
> 
> Today there exists two flavors of gui for Ocaml based on Tcl or GTK.
> Tcl is portable, and GTK is becoming portable.

Gtk is portable, it works at least on X, windows, the linux framebuffer device
(soon) and possibly some others.

> What about using HTML-interfaces
> instead of standard GUIs like Tcl and GTK?

Well, i think this may be a good idea (sun is doing this) if you need to run
your code remotely and for system configuration and administration.

But, ...

Most web browser are huge beast, running slowly and ressource hungry. Also i
think you can do less things with html than you can do with modern toolkits.

Also there is the question of bandwith.

> The architecture is
> that you start some kind of HTTP-based server and than you
> start the browser and go to a local adress like
> http://localhost:8989/start.html.

Sun is doing this for their system/wbe server administration, but then i guess
everyone using this has fast web connection and quick boxes wiht loads of
memory

> The advantages are
> - Portable

Sure, ...

But i think you don't envision to run it on a text based browser like lynx ?

> - Much nicer looking GUI's, it is easier to add pictures, fonts etc
>   to a HTML-gui, than to a Tcl/GTK-based

Erm, ...

i don't think much people will be of the same opinion as you.

It may be easier for simple tasks, but there is much less things you can do
with HTML.

Also i hope you don't try to do OpenGL stuff and other such, i don't think it
will work.

> - Many GUI-operations are easier to do in HTML than in a standard
>   GUI-tool, for example HTML-tables are easier to create the
>   listboxes with columns.

But you have less control wit them, as well as one the callbacks you can add
to them. Also i am not html specialist but from what i know, the event loop
handling is really slow on a browser + server thing than what you can do with
even the slow tcl/tk toolkit.

> - Easy to create server-based solutions out of client-applications.
>   Only need to handle state in a general and scalable way.

This has nothing to do with GUIs, ...

> - Smaller executables, for example including GTK statically into
>   Unison increases the size from 700Kb to 2400Kb on Windows.

But you need the 20Mb + of mozilla/whatever installed.

> - Easier to integrate with other applikations, since two
>   applications can merged on the HTML-page

mmm, ...

i don't know about this, but i think you will launch a cgi to generate the
html page. if you have 2 pages, you would need to launch 2 cgis and merge
them, or have one of them call 2 other and do the merging.

I think it trully depends on what you want to do. Please provide a more
detailed context, and we could discuss it in more details.

> The disadvantages are
> - slower

much slower, and ressource hungry, yes ...

> - difficult to set focus correctly if the whole page is updated
>   after each input (bugs i IE). This can be solved by being

And naturally, don't forget that IE is not the only browser around.

>   XML-based and talk XML from the browser to the server (which
>   only works on IE>=5 and Netscape 6).
Sure, and XML is the solution to all your problems ... :)))

I am not that convinced, but then i am no XML expert.

> - browser incompabilities. (for example HTC in IE makes event
>   very easy to handle, but incompatible with active sheet on Netscape,
>   which is buggy)

Just use Standard html and forget about all the private extensions of the ones
and the others.

All in all, i think using html as guis is a solution only for the most
specialized of case, where having it running remotely is a requirement, like
in the sun case, but mostly it is simply to cumbersome and ugly to be of any
help for more advanced GUIs. I would not do it.

That said, in the ocaml oreilly book, you will find a chapter on how to write
a web server in ocaml, and some stuff that could lead to some of the things
you may want to do, please read it.

Friendly,

Sven Luther
-------------------
To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr


  parent reply	other threads:[~2001-04-01 20:10 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-28  2:19 [Caml-list] Complex Numbers David McClain
2001-03-28  3:38 ` [Caml-list] OCaml, where art thou? Anjayan Puvananathan
2001-03-30 14:51   ` Xavier Leroy
2001-03-30 23:12     ` David Fox
2001-03-31  9:31       ` [Caml-list] Using HTML as a standard GUI for Ocaml Mattias Waldau
2001-04-01 12:52         ` Fergus Henderson
2001-04-01 20:11         ` Sven LUTHER [this message]
2001-04-01 20:35           ` Bruce Hoult
2001-04-02 10:09             ` Sven LUTHER
2001-04-02 15:53               ` CREGUT Pierre FTRD/DTL/LAN
2001-04-02 19:16         ` Gerd Stolpmann
2001-04-03 18:06           ` Mattias Waldau
2001-04-02 13:21       ` [Caml-list] Threads in OCaml Xavier Leroy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010401221111.A635@lambda.u-strasbg.fr \
    --to=luther@dpt-info.u-strasbg.fr \
    --cc=caml-list@inria.fr \
    --cc=mattias.waldau@abc.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).