
N2O: Erlang Web Framework - andreygrehov
http://kukuruku.co/hub/erlang/n2o-erlang-web-framework
======
rdtsc
This framework is really out there. It is well ... different and interesting.

Here are some not so conventional things going on:

* Write your page in Erlang.

* Even translates Erlang to JS as a parse transform.

* Websockets (with a fallback mechanism) is the default connection mechanism.

* Don't want to use JSON for some crazy reason? That's alright, user Bert (and ship binary encoded Erlang terms to the browser!).

* Can render stuff on the server and send the whole thing over the websocket connection.

[https://github.com/5HT/n2o](https://github.com/5HT/n2o)

~~~
hackerboos
>Websockets (with a fallback mechanism)

Not enough frameworks make this as seamless as it should be. So it's
refreshing to see it done here.

I've been looking at Phoenix (Elixir not Erlang) but the problem is that I'll
have to do logic to detect when WS are available and do the fallback myself
which results in more code server side.

I think this is something that should be handled by the framework itself.

~~~
chrismccord
I'm the author of Phoenix. I'm glad to hear you're giving it a look! I spent a
lot of time thinking about the WS layer and fallback support. Ultimately I
settled for standard WS with a small multiplexing layer on top. For those that
need fallback, they can drop in websocket-js (flash fallback, compatible with
native WS api). Have you taken at look at this for your fallback support?
[https://github.com/gimite/web-socket-js](https://github.com/gimite/web-
socket-js)

Phoenix is still far from 1.0, so any and all feedback is welcome.

~~~
findjashua
I'm new to Elixir (and FP in general), but I really like the language. I came
across a couple of youtube videos on Phoenix , and it looks really nice
(reminds me of Rails). I think something like Sinatra would be even nicer, for
2 reasons: 1\. the standard these days is to have a rest api serving json to
web/mobile clients, so a Rails-like framework seems overkill 2\. Pretty much
all my friends who are learning web dev on their own, find Sinatra/Flask way
easier to get started with than Rails/Django.

Regardless, Elixir (and Phoenix) is a great leap forward compared to the other
options for building concurrent, reliable servers. I hope more people try it
out before falling for hype/marketing ( _cough_ node.js _cough_ mongodb _cough
cough_ )

------
davidw
I think there's still room to innovate in the Erlang/Web space. Chicago Boss
was a nice improvement because it ties so much different stuff together. It
does have a few issues though, like not being very 'Erlangy' in places: it
uses lots of parse transform magic. I think it's the right direction though,
in that it's fairly general purpose.

