[erlang-questions] ANN: ezwebframe - an easy web framework

Ulf Wiger <>
Thu Dec 13 13:16:27 CET 2012


Nice!

I sent a little pull request on the shell demo:

https://github.com/joearms/ezwebframe/pull/2

"First thing I tried with the shell demo was to enter c:regs(), which resulted in output in the real erlang shell, but not much in the browser.

This patch spawns a small group_leader process which collects IO generated by the evaluated command and sends it to the browser. The browser-side output is currently pretty ugly. I'll gladly leave that to some HTML/JS wiz to fix. :)"

BR,
Ulf W

PS OTP team - I noticed in kernel/src/group.erl that the group_leader code has gotten a bit more complex with the addition of unicode. It would be nice to separate the group_leader logic from the interaction with the tty driver. It would make a nice behavior.

On 13 Dec 2012, at 11:17, Joe Armstrong wrote:

> ezwebframe
> ==========
> 
> https://github.com/joearms/ezwebframe
> 
> Pronounced "Easy web frame."
> 
> About
> =====
> 
> Ezwebframe attempts to make web programming just a little bit easier.
> 
> From Erlang point of view the browser *is* an Erlang process.
> 
> Assume we have a web page populated with divs. For example:
> 
>     <div id="a">
>       ...
>     </div>
> 
>     <div id="b">
>       ...
>     </div>
> 
> Erlang thinks the browser is a process. To fill div a with HTML an 
> Erlang process evaluates the command:
> 
>      Browser ! [{cmd, fill_div}, {id, a}, {txt, B}]
> 
> Where B is a binary containing HTML.
> 
> In the browser controls can be programmed to send messages to Erlang,
> for example, when we click on a button in the browser the Erlang
> process controlling the window will be sent a message which can be
> received with the statement:
> 
>     receive
>        {Browser, {struct, [{clicked, ButtonName}]}} ->
>            ...
>     end
> 
> All this is achieved using a thin JSON layer over websockets and
> with cowboy managing the websockets.
> 
> Cheers
> 
> /Joe
> 
> 
> 
>  
> 
> 
> 
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions

Ulf Wiger, Co-founder & Developer Advocate, Feuerlabs Inc.
http://feuerlabs.com



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20121213/705cd045/attachment.html>


More information about the erlang-questions mailing list