<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>Nice!</div><div><br></div><div>I sent a little pull request on the shell demo:</div><div><br></div><div><a href="https://github.com/joearms/ezwebframe/pull/2">https://github.com/joearms/ezwebframe/pull/2</a></div><div><br></div><div>"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.</div><br>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. :)"<div><br></div><div>BR,</div><div>Ulf W</div><div><br></div><div>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.</div><br><div><div>On 13 Dec 2012, at 11:17, Joe Armstrong wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">ezwebframe<br>==========<br><br><a href="https://github.com/joearms/ezwebframe">https://github.com/joearms/ezwebframe</a><br><br>Pronounced "Easy web frame."<br><br>About<br>=====<br><br>Ezwebframe attempts to make web programming just a little bit easier.<br>
<br>From Erlang point of view the browser *is* an Erlang process.<br><br>Assume we have a web page populated with divs. For example:<br><br> <div id="a"><br> ...<br> </div><br><br> <div id="b"><br>
...<br> </div><br><br>Erlang thinks the browser is a process. To fill div a with HTML an <br>Erlang process evaluates the command:<br><br> Browser ! [{cmd, fill_div}, {id, a}, {txt, B}]<br><br>Where B is a binary containing HTML.<br>
<br>In the browser controls can be programmed to send messages to Erlang,<br>for example, when we click on a button in the browser the Erlang<br>process controlling the window will be sent a message which can be<br>received with the statement:<br>
<br> receive<br> {Browser, {struct, [{clicked, ButtonName}]}} -><br> ...<br> end<br><br>All this is achieved using a thin JSON layer over websockets and<br>with cowboy managing the websockets.<br>
<br>Cheers<br><br>/Joe<br><br><br><br> <br><br><br><br>
_______________________________________________<br>erlang-questions mailing list<br><a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>http://erlang.org/mailman/listinfo/erlang-questions<br></blockquote></div><br><div apple-content-edited="true">
<div><div>Ulf Wiger, Co-founder & Developer Advocate, Feuerlabs Inc.</div><div><a href="http://feuerlabs.com">http://feuerlabs.com</a></div></div><div><br></div><br class="Apple-interchange-newline">
</div>
<br></body></html>