<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Dec 13, 2012 at 11:17 AM, Joe Armstrong <span dir="ltr"><<a href="mailto:erlang@gmail.com" target="_blank">erlang@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">ezwebframe<br>==========<br><br><a href="https://github.com/joearms/ezwebframe" target="_blank">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<span class=""><font color="#888888"><br><br>/Joe<br><br><br><br></font></span></blockquote><div><br></div><div><span style="font-family:arial,sans-serif;font-size:13px">That's über cool. I really like the idea . I can see how you can distribute easily the rendering with that.</span></div>
<div>- benoit </div></div></div>