From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id DD5F77F615 for ; Thu, 8 Dec 2016 10:24:57 +0100 (CET) Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=vincent.balat@vblt.org; spf=None smtp.mailfrom=vincent.balat@vblt.org; spf=None smtp.helo=postmaster@slow1-d.mail.gandi.net Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of vincent.balat@vblt.org) identity=pra; client-ip=217.70.178.86; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="vincent.balat@vblt.org"; x-sender="vincent.balat@vblt.org"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of vincent.balat@vblt.org) identity=mailfrom; client-ip=217.70.178.86; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="vincent.balat@vblt.org"; x-sender="vincent.balat@vblt.org"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@slow1-d.mail.gandi.net) identity=helo; client-ip=217.70.178.86; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="vincent.balat@vblt.org"; x-sender="postmaster@slow1-d.mail.gandi.net"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3ATbChThb++8Y2rzxVUgiFt7H/LSx+4OfEezUN459i?= =?us-ascii?q?sYplN5qZpc+/bnLW6fgltlLVR4KTs6sC0LuN9f27EjBbqdbZ6TZZL8wKD0dEwe?= =?us-ascii?q?wt3CUeQ+e9QXXhK/DrayFoVO9jb3RCu0+BDE5OBczlbEfTqHDhpRQbGxH4KBYn?= =?us-ascii?q?br+tQt2auf+qzPi/8IH/ZABBhTz1Ie8jbUb+kQKEs8AKnYtjJ7t3xgbDv3RFZ8?= =?us-ascii?q?xZwGppIRSYmBO4ruy5+Zom9yVLp7p1/MdFVeD+fr8kZb1eFjUvdW4vsp7Frx7G?= =?us-ascii?q?GDWO4HARVHleuBNMChSNuA/7WJz8tDe8vON50TWyI8fyUfYzQzv0vPQjcwPhlC?= =?us-ascii?q?pSb21xy2rQkMEl0PNW?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0BCAACJJklYh1ayRtleHgYMGRgHgwIBA?= =?us-ascii?q?QEBAXmBBgcBhCeBIp8JgjeFPodqhSKCCCmBcYIugVoCgghBEgEBAQEBAQEBAQE?= =?us-ascii?q?BEgEBAQgNCQkdMIIzBAMDFYIXAQQBIyYMGRALCwsaHQICIQESAQUBChIGARIIC?= =?us-ascii?q?gmIOgMPCAQKnAY/jACCKYc6AwqDdQEBAQcBAQEBAQEhhUV5hFuCSEOBJ4Magl0?= =?us-ascii?q?Fhw8MgU+RSzWBeIRXhmyDZIJDgQeMd4lThDWCSDKBFA8XDVMNO0QRAoJsTIFoc?= =?us-ascii?q?gEBAYZ0LgEmZgEBAQ?= X-IPAS-Result: =?us-ascii?q?A0BCAACJJklYh1ayRtleHgYMGRgHgwIBAQEBAXmBBgcBhCe?= =?us-ascii?q?BIp8JgjeFPodqhSKCCCmBcYIugVoCgghBEgEBAQEBAQEBAQEBEgEBAQgNCQkdM?= =?us-ascii?q?IIzBAMDFYIXAQQBIyYMGRALCwsaHQICIQESAQUBChIGARIICgmIOgMPCAQKnAY?= =?us-ascii?q?/jACCKYc6AwqDdQEBAQcBAQEBAQEhhUV5hFuCSEOBJ4Magl0Fhw8MgU+RSzWBe?= =?us-ascii?q?IRXhmyDZIJDgQeMd4lThDWCSDKBFA8XDVMNO0QRAoJsTIFocgEBAYZ0LgEmZgE?= =?us-ascii?q?BAQ?= X-IronPort-AV: E=Sophos;i="5.33,318,1477954800"; d="scan'208,217";a="248660524" Received: from slow1-d.mail.gandi.net ([217.70.178.86]) by mail2-smtp-roc.national.inria.fr with ESMTP; 08 Dec 2016 10:24:57 +0100 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by slow1-d.mail.gandi.net (Postfix) with ESMTP id 24BFB535412 for ; Thu, 8 Dec 2016 10:24:00 +0100 (CET) X-Originating-IP: 74.125.82.42 Received: from mail-wm0-f42.google.com (mail-wm0-f42.google.com [74.125.82.42]) (Authenticated sender: v@vblt.org) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 0698041C096 for ; Thu, 8 Dec 2016 10:23:59 +0100 (CET) Received: by mail-wm0-f42.google.com with SMTP id a197so207619789wmd.0 for ; Thu, 08 Dec 2016 01:23:59 -0800 (PST) X-Gm-Message-State: AKaTC03AnDmuKsd3MlwQfg4sVWtqe86k0PAmU59ZmiUraMH5+UoU/ZLgsjA7yAT1dKUPdocZHztFbyozsQCisw== X-Received: by 10.28.185.78 with SMTP id j75mr91137wmf.14.1481189039682; Thu, 08 Dec 2016 01:23:59 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Vincent Balat Date: Thu, 08 Dec 2016 09:23:49 +0000 X-Gmail-Original-Message-ID: Message-ID: To: matthieu.dubuget@gmail.com, Caml-list Content-Type: multipart/alternative; boundary=001a1148d6408e3d500543223226 Subject: Re: [Caml-list] Web technologies as graphical user interface to OCaml programs? --001a1148d6408e3d500543223226 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi, This is precisely what Eliom is intended for. Eliom is the simplest way to program client-server applications with an interface in a browser. The program is written as a single code, with parts of the code being executed server-side and other client-side. Communication between client and server is straightforward (e.g. just call a server side function from the client). You can now also derive the mobile app for Android and iOS from the exact same code. Have a look at http://ocsigen.org/tuto/dev/manual/start for how to create very quickly a template application with code examples. (You will need to pin the dev version of all packages =E2=80=94 ocsigen-too= lkit, ocsigen-start ... =E2=80=94 as I think they are still not in opam, but they= will be released in very few days/hours). For an example of running app using this have a look a http://www.besport.com or the corresponding mobile apps: https://play.google.com/store/apps/details?id=3Dcom.besport.www.mobile https://itunes.apple.com/us/app/besport/id1104216922 Regards, Vincent Balat Le jeu. 8 d=C3=A9c. 2016 =C3=A0 09:21, Matthieu Dubuget a =C3=A9crit : > Hello, > > I wonder how I could use Web technologies to write OCaml program's > GUI. > > I=E2=80=99m particularly interested by the ocaml-vdom (elm) approach > simplicity. > > But my need would be to add a user interface to programs using some > OCaml libraries which are not supported by js_of_ocaml (Unix, C libs > bindings=E2=80=A6). > > One solution would be to keep the GUI-less native OCaml apps compiled > and running as native code, and have them communicate with GUIs that > would run in browsers. > > I'm not sure how this communication would be done, thought? Maybe > websocket, > but this is something I do not know at all=E2=80=A6 > > Another solution would be to have the native OCaml app directly serve > it's UI, maybe using ocsigenserver? > > I'm wondering if there are some examples around with those kind of > approaches or other kind of solution? > > Best regards > > > -- > Matthieu Dubuget > > > -- > Caml-list mailing list. Subscription management and archives: > https://sympa.inria.fr/sympa/arc/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs > --001a1148d6408e3d500543223226 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi,

This is precisely what Eliom is int= ended for. Eliom is the simplest way to program client-server applications = with an interface in a browser. The program is written as a single code, wi= th parts of the code being executed server-side and other client-side. Comm= unication between client and server is straightforward (e.g. just call a se= rver side function from the client).

You can now a= lso derive the mobile app for Android and iOS from the exact same code.
=

Have a look at=C2=A0
for how to create very quickly a template application wi= th code examples.
(You will need to pin the dev version of all pa= ckages =E2=80=94 ocsigen-toolkit, ocsigen-start ... =E2=80=94 as I think th= ey are still not in opam, but they will be released in very few days/hours)= .

For an example of running app using this have a = look a http://www.besport.com=C2=A0o= r the corresponding mobile apps:

Regards,
Vincent Balat



<= div class=3D"gmail_quote">
Le=C2=A0jeu. 8 d=C3=A9c. 2016 = =C3=A0=C2=A009:21, Matthieu Dubuget <matthieu.dubuget@gmail.com> a =C3=A9crit=C2=A0:
=
Hello,

I wonder how I could use Web technologies to write OCaml program's
GUI.

I=E2=80=99m particularly interested by the ocaml-vdom (elm) approach
simplicity.

But my need would be to add a user interface to programs using some
OCaml libraries which are not supported by js_of_ocaml (Unix, C libs
bindings=E2=80=A6).

One solution would be to keep the GUI-less native OCaml apps compiled
and running as native code, and have them communicate with GUIs that
would run in browsers.

I'm not sure how this communication would be done, thought? Maybe webso= cket,
but this is something I do not know at all=E2=80=A6

Another solution would be to have the native OCaml app directly serve
it's UI, maybe using ocsigenserver?

I'm wondering if there are some examples around with those kind of
approaches or other kind of solution?

Best regards


--
Matthieu Dubuget


--
Caml-list mailing list.=C2=A0 Subscription management and archives:
https://sympa.inria.fr/sympa/arc/caml-= list
Beginner's list: http://groups.= yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bug= s
--001a1148d6408e3d500543223226--