[erlang-questions] wxErlang - some answers

Vlad Dumitrescu vladdu55@REDACTED
Sat Jul 8 21:10:48 CEST 2017


Hi Joe,

I wonder -- from this point of view of the APIs, what do you think of the
now defunct `gs` application?

People have given good feedback, but I will add my 2c too. There are
several issues to solve.

One issue is "how do I put the GUI together?", which IMHO is best done
declaratively. With an adequate language, even dynamic UIs can be
described. This is relatively easy.

The second issue is handling the state: bot the application state (what the
real app needs to know from the inputs) and the GUI state (for example, a
checkbox controlling the enabled state of the rest of the controls on the
page; or an input validator for the whole UI). The latter is the tricky
one, in my experience, as some entity needs to have the whole state
available. Updates to this states need to be observed, which is not easy to
do correctly (see even below).

Then there is the issue of performance, again two-sided:
- we'd like to be able to use native controls/widgets, but allow custom
ones too. Here we also stumble upon supporting all OSs and graphics
frameworks.
- updating the UI needs to be done at the appropriate moments, i.e. if
needed and not more often than the display can update itself.

There is one technology that is available everywhere, has optimized
rendering and is reasonably easy to adapt and adapt to: HTML. With
frameworks like Electron (https://electron.atom.io/), it is available on
the desktop and with the full power of JavaScript. Web components are on
the rise and there are libraries (vue.js, https://vuejs.org/, for example)
that make them easy to build and reason about. The remaining issue however
is an interesting hurdle: how to interface JS with Erlang? There have been
interesting projects for that (like beam.js and erlv8), but I can't find
any active one - it would be interesting to know what what the reason was
for not continuing the work.

best regards,
Vlad


On Sat, Jul 8, 2017 at 11:28 AM, PAILLEAU Eric <eric.pailleau@REDACTED>
wrote:

> Hello Joe,
>
> I'm particularly interested in XRC [1] standard.
>
> I think your effort, and efforts of people helping, may be a step to
> create XSLT templates to write wx abstract code to help people create
> easily wx UI without the huge effort to understand basics of wx.
> wx documentation is intimidating (well like was Erlang documentation first
> time I looked at it many years ago :) ...) but much harder than it  to be
> able to write code quickly.
>
> Those templates could be a plugin in usual build tools to handle .xrc
> files, like asn1 file are handled to create code.
>
> If I can help, I will !
>
>
>> My intention is to try and decompose wxErlang into a large number of
>> small examples, where each example illustrates one feature of the
>> system. Also so show how to build complex examples from the small
>> parts.
>>
>> I'll make all the code available on github so you can join in the fun
>> (is this fun?).
>>
>
> [1] http://docs.wxwidgets.org/trunk/overview_xrc.html
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20170708/186097f9/attachment.htm>


More information about the erlang-questions mailing list