[erlang-questions] Web toolkit, N2O guide
Wed Apr 3 19:25:35 CEST 2019
Jesper Louis Andersen <jesper.louis.andersen@REDACTED>:
> On Mon, Apr 1, 2019 at 1:09 PM Eckard Brauer <eckard.brauer@REDACTED>
> > * Are there better alternatives to N2O for that?
> N2O is a loosely coupled specification of protocols where each part
> work together. You can mix-and-match between them, though a lot of
> the power stems from them working well together. The protocols are
> available over many different transports, so it is a really strong
> toolbox for integration.
I originally selected N2O for it's compactness - to me, it seemed to
include all and everything I could think of needing in this case
(rather small application for a friend, I don't want to put too much
effort in before it starts working, adding some functionality at a
later point should easy be possible, and for me it's a good occasion
to learn some more Erlang). Where I initially stumbled over is the need
of the "mad" tool - I suspected, it could belong to (is included in)
either N2O or some more general tool, like e.g. rebar. After I
installed it, everything went fine.
In the meanwhile, I also wanted to give Zotonic a try, gave up becauso
of it's pure extent (it looks to me too oversized for the little app -
some choir website intented to be run on a raspberry or the like). I'd
most probably choose that for some larger application.
And, just now I'm playing with (pure) cowboy. With some custom
handler(s) for (authenticated) upload and access limitation, maybe that
will fit (most of) the needs. Maybe that's what you told below with
"software grows", so far I'd like to agree.
> Alternative solutions depends on your requirements, and what you want
> to achieve. The best advice I can give is "software grows". Any
> complex system starts from a simple system. So if you start with
> something "simple", you might outgrow that in time. N2O takes the
> concepts of messaging and formality to a far greater level than other
> systems, so if you imagine you grow in that direction (i.e.,
> *everything* is a websocket, we need to implement this from scratch
> in a $industrial-crap-language, etc), then it might be suitable.
> * Is there a (preferrably step by step) guide for beginners available,
> > as most of the tutorials I found seem outdated for years?
> Age of a tutorial might not be a problem. If things are stable, there
> will be less updates needed. In fact, I have a graphql-tutorial which
> needs treatment now, because things changed too much! And I don't
> have that much time allotted for it right now.
> https://ws.n2o.space/ would be the entry-point. There are some
> examples along the way where the 'mad' tool generates examples for
> you to work on. And it seems it was updated Nov 2018, which isn't
> that far in the past to me.
Of course, age in terms of months (or even years) is not a problem, but
I had a few occasions where dependencies grew further and didn't fit
the needs of some tools using them (maybe simply beginner problems, I'm
just learning how Erlang handles dependencies). Even the toolset in
Erlang is not very common for me (usually I did mostly Shell scripting,
C(++), some assembly languages etc. for the last years or decades, no
functional programming at all, except maybe a few little tries with
Python and Prolog), so it's easy to struggle when tools and
documentation have some difference or semantics are changed slightly.
Playing with Erlang more as a hobbyist I'm still hitting beginner's
problems - hope I'll still get it somehow..
So thanks for the valuable hints @all here!
More information about the erlang-questions