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

Joe Armstrong erlang@REDACTED
Wed Dec 19 18:18:37 CET 2012


On Wed, Dec 19, 2012 at 4:34 PM, <acidbriggs@REDACTED> wrote:

> IMHO, I would say that JQuery is a great choice for this as it makes it
> very easy to integrate this into current applications using JQuery. Since
> JQuery is probably the most used javascript library out there, it's a an
> awesome fit.
>
>
I'm pretty familiar with jQuery so it is rather easy


> That being said... The design of the ezwebframe API is very simple to
> understand an I would say that it would probably be very easy to do the
> same thing for D3.
>
> I love the idea of this. I reminds me a lot of the java framework called
> Ice Faces. But that is a different animal and it failed miserably in our
> testing.  Given the history of Erlang, I bet this scales much better.
>
>

You really should try the IRC example in

https://github.com/joearms/ezwebframe/blob/master/demos/chat/chat2.html

This is 145 lines of code in total - this is *everything* the neat thing
is that the program that manages the interface is also the IRC server
there is only one process involved.

>From a local point of view localhost:1456 *is* a web server
but from a remote point of view it is an IRC server in a web page :-)

I don't know if you've tried this:

On machine one - note your IP adress (suppose it's 223.45.12.34)
start ezwebframe and go to localhost:1456 and open the chat2.html page

Open your firewall (if you have one) to allow remote access to port 1456

Go to any other machine on the planet and go to

http://223.45.12.34:1456

And it all works.

I've tried this on several machine and it works fine. When I get time I'll
open up my firewall and we can try this (not today, I'm busy)

I'd recommend anybody who has downloaded the code to try this to get the
wow feeling.

I was amazed that it worked so easily and was so short.

I wrote this to update the chapter on IRC in my book - and found that an
entire
chapter vanished down to one page after I made the interface to web sockets.

I think the key point is uniform messaging - the IRC server AND the web
server are the same process and all they see are uniform messages (in this
case JSON) - to get the browser to do things you send it JSON messages.
When things happen in the browser you get sent JSON messages.

The point is the bits fit together nicely - conceptual integrity rules.

Cheers

/Joe

Thanks Joe!
>
> --Briggs
>
>
> On Dec 19, 2012, at 7:59 AM, Steve Davis <steven.charles.davis@REDACTED>
> wrote:
>
> Hi Joe,
>
> It occurs to me that the DOM selection model of D3 (http://d3js.org) may
> be a better fit than JQuery for this approach?
>
> regs,
> /s
>
> On Thursday, December 13, 2012 4:17:14 AM UTC-6, Joe Armstrong wrote:
>>
>> ezwebframe
>> ==========
>>
>> https://github.com/joearms/**ezwebframe<https://github.com/joearms/ezwebframe>
>>
>> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
>
>
> _______________________________________________
> 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/20121219/6ec6d3ad/attachment.htm>


More information about the erlang-questions mailing list