Web toolkit, N2O guide

classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

Web toolkit, N2O guide

Eckard Brauer
Hello,

as I will have to develop a little web application for serving >~80 %
pure static and < 20 % dynamic (DB frontend, sessoins - DB choice is
still free) content, I thought of using N2O as the toolkit of choice.
Some questions arise from that:

* Are there better alternatives to N2O for that?

* Is there a (preferrably step by step) guide for beginners available,
  as most of the tutorials I found seem outdated for years?

Thanks in advance for hints!
Eckard

--
:)
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Web toolkit, N2O guide

Marc Worrell
Hi Eckard,

You can also use Zotonic CMS (http://zotonic.org/)

Static files can be served using `controller_static_pages` or directly as assets from their
the `lib` directory, or as templates from the `templates/static` directory.

The nice thing with using Zotonic for your site is that you also get:

 * Rich and very flexible templating system
 * Full content management environment
 * Multi-lingual
 * Access control modules
 * Email handling (send & receive)
 * Timezone handling
 * Module system
 * etc. etc. etc.

Zotonic uses PostgreSQL for its database.

Currently the 0.x version is the “stable” branch.
We are working towards a 1.x (really soon now).

The 1.x will have deep MQTT integration.

Cheers, Marc


On 1 Apr 2019, at 13:08, Eckard Brauer <[hidden email]> wrote:

Hello,

as I will have to develop a little web application for serving >~80 %
pure static and < 20 % dynamic (DB frontend, sessoins - DB choice is
still free) content, I thought of using N2O as the toolkit of choice.
Some questions arise from that:

* Are there better alternatives to N2O for that?

* Is there a (preferrably step by step) guide for beginners available,
 as most of the tutorials I found seem outdated for years?

Thanks in advance for hints!
Eckard

--
:)
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Web toolkit, N2O guide

Vlad Dumitrescu-2
Hi!

Should the link be to http://zotonic.com? The org one goes to the default page of an unitialized server.

best regards,
Vlad


On Mon, Apr 1, 2019 at 2:55 PM Marc Worrell <[hidden email]> wrote:
Hi Eckard,

You can also use Zotonic CMS (http://zotonic.org/)

Static files can be served using `controller_static_pages` or directly as assets from their
the `lib` directory, or as templates from the `templates/static` directory.

The nice thing with using Zotonic for your site is that you also get:

 * Rich and very flexible templating system
 * Full content management environment
 * Multi-lingual
 * Access control modules
 * Email handling (send & receive)
 * Timezone handling
 * Module system
 * etc. etc. etc.

Zotonic uses PostgreSQL for its database.

Currently the 0.x version is the “stable” branch.
We are working towards a 1.x (really soon now).

The 1.x will have deep MQTT integration.

Cheers, Marc


On 1 Apr 2019, at 13:08, Eckard Brauer <[hidden email]> wrote:

Hello,

as I will have to develop a little web application for serving >~80 %
pure static and < 20 % dynamic (DB frontend, sessoins - DB choice is
still free) content, I thought of using N2O as the toolkit of choice.
Some questions arise from that:

* Are there better alternatives to N2O for that?

* Is there a (preferrably step by step) guide for beginners available,
 as most of the tutorials I found seem outdated for years?

Thanks in advance for hints!
Eckard

--
:)
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Web toolkit, N2O guide

Marc Worrell
Ah yes,  http://zotonic.com 

One more thing to check for the new site :-)

Thanks, Marc


On 1 Apr 2019, at 16:46, Vlad Dumitrescu <[hidden email]> wrote:

Hi!

Should the link be to http://zotonic.com? The org one goes to the default page of an unitialized server.

best regards,
Vlad


On Mon, Apr 1, 2019 at 2:55 PM Marc Worrell <[hidden email]> wrote:
Hi Eckard,

You can also use Zotonic CMS (http://zotonic.org/)

Static files can be served using `controller_static_pages` or directly as assets from their
the `lib` directory, or as templates from the `templates/static` directory.

The nice thing with using Zotonic for your site is that you also get:

 * Rich and very flexible templating system
 * Full content management environment
 * Multi-lingual
 * Access control modules
 * Email handling (send & receive)
 * Timezone handling
 * Module system
 * etc. etc. etc.

Zotonic uses PostgreSQL for its database.

Currently the 0.x version is the “stable” branch.
We are working towards a 1.x (really soon now).

The 1.x will have deep MQTT integration.

Cheers, Marc


On 1 Apr 2019, at 13:08, Eckard Brauer <[hidden email]> wrote:

Hello,

as I will have to develop a little web application for serving >~80 %
pure static and < 20 % dynamic (DB frontend, sessoins - DB choice is
still free) content, I thought of using N2O as the toolkit of choice.
Some questions arise from that:

* Are there better alternatives to N2O for that?

* Is there a (preferrably step by step) guide for beginners available,
 as most of the tutorials I found seem outdated for years?

Thanks in advance for hints!
Eckard

--
:)
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Web toolkit, N2O guide

Eckard Brauer
In reply to this post by Marc Worrell
Hi Marc,

thanks for the response. I already had Zotonic on the focus, but for my
current web app (may be proved wrong at any given point) it seems a bit
overkill. Most of the nice features (I'd be glad with for a larger app)
I don't really need there, current idea is to:

* serve only static pages with only a single variable element (header
  colour dependent on date) and
* two user accounts, one for administering (uploading/changing pages)
  and one for enabling download of specific content (PDFs).

Further improvement will only include:

* Template based page generation,
* (ToDo like) database application, to be filled only from admin
  account, public list display, history.

As I'm rather new to Erlang, I'm looking for the/a toolkit with least
possible learning effort for me on one hand, runtime footprint on the
second and not too much difference from a "conventional", static web
server, as the application is to be mostly administered by non-IT
people.

What I was stuck of with the N2O manual, is the fact that they forgot
to mention "mad" as a requirement... hope I'll closer get to it now.

Cheers,
Eckard

Am Mon, 1 Apr 2019 14:55:19 +0200
schrieb Marc Worrell <[hidden email]>:

> Hi Eckard,
>
> You can also use Zotonic CMS (http://zotonic.org/
> <http://zotonic.org/>)
>
> Static files can be served using `controller_static_pages` or
> directly as assets from their the `lib` directory, or as templates
> from the `templates/static` directory.
>
> The nice thing with using Zotonic for your site is that you also get:
>
>  * Rich and very flexible templating system
>  * Full content management environment
>  * Multi-lingual
>  * Access control modules
>  * Email handling (send & receive)
>  * Timezone handling
>  * Module system
>  * etc. etc. etc.
>
> Zotonic uses PostgreSQL for its database.
>
> Currently the 0.x version is the “stable” branch.
> We are working towards a 1.x (really soon now).
>
> The 1.x will have deep MQTT integration.
>
> Cheers, Marc
>
>
> > On 1 Apr 2019, at 13:08, Eckard Brauer <[hidden email]> wrote:
> >
> > Hello,
> >
> > as I will have to develop a little web application for serving >~80
> > % pure static and < 20 % dynamic (DB frontend, sessoins - DB choice
> > is still free) content, I thought of using N2O as the toolkit of
> > choice. Some questions arise from that:
> >
> > * Are there better alternatives to N2O for that?
> >
> > * Is there a (preferrably step by step) guide for beginners
> > available, as most of the tutorials I found seem outdated for years?
> >
> > Thanks in advance for hints!
> > Eckard
> >
> > --
> > :)
> > _______________________________________________
> > erlang-questions mailing list
> > [hidden email]
> > http://erlang.org/mailman/listinfo/erlang-questions
>



--
:)
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Web toolkit, N2O guide

Wes James
How about cowboy:


<snip>


-wes

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Web toolkit, N2O guide

Dmitry Klionsky-2

+1 for cowboy.

You serve static files using https://ninenines.eu/docs/en/cowboy/2.6/guide/static_files/
For templating you can use https://github.com/erlydtl/erlydtl


On 4/1/19 10:59 PM, Wes James wrote:
How about cowboy:


<snip>


-wes

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Web toolkit, N2O guide

Marc Worrell
In reply to this post by Eckard Brauer
Hi Eckard,

Given your requirements it is really straight forward to make in Zotonic.
As Zotonic is made for sites like you describe (content uploading, pages, template driven etc.).

Though if you like to roll your own administrative interfaces then you can use other tools :)

Cheers, Marc



> On 1 Apr 2019, at 21:37, Eckard Brauer <[hidden email]> wrote:
>
> Hi Marc,
>
> thanks for the response. I already had Zotonic on the focus, but for my
> current web app (may be proved wrong at any given point) it seems a bit
> overkill. Most of the nice features (I'd be glad with for a larger app)
> I don't really need there, current idea is to:
>
> * serve only static pages with only a single variable element (header
>  colour dependent on date) and
> * two user accounts, one for administering (uploading/changing pages)
>  and one for enabling download of specific content (PDFs).
>
> Further improvement will only include:
>
> * Template based page generation,
> * (ToDo like) database application, to be filled only from admin
>  account, public list display, history.
>
> As I'm rather new to Erlang, I'm looking for the/a toolkit with least
> possible learning effort for me on one hand, runtime footprint on the
> second and not too much difference from a "conventional", static web
> server, as the application is to be mostly administered by non-IT
> people.
>
> What I was stuck of with the N2O manual, is the fact that they forgot
> to mention "mad" as a requirement... hope I'll closer get to it now.
>
> Cheers,
> Eckard
>
> Am Mon, 1 Apr 2019 14:55:19 +0200
> schrieb Marc Worrell <[hidden email]>:
>
>> Hi Eckard,
>>
>> You can also use Zotonic CMS (http://zotonic.org/
>> <http://zotonic.org/>)
>>
>> Static files can be served using `controller_static_pages` or
>> directly as assets from their the `lib` directory, or as templates
>> from the `templates/static` directory.
>>
>> The nice thing with using Zotonic for your site is that you also get:
>>
>> * Rich and very flexible templating system
>> * Full content management environment
>> * Multi-lingual
>> * Access control modules
>> * Email handling (send & receive)
>> * Timezone handling
>> * Module system
>> * etc. etc. etc.
>>
>> Zotonic uses PostgreSQL for its database.
>>
>> Currently the 0.x version is the “stable” branch.
>> We are working towards a 1.x (really soon now).
>>
>> The 1.x will have deep MQTT integration.
>>
>> Cheers, Marc
>>
>>
>>> On 1 Apr 2019, at 13:08, Eckard Brauer <[hidden email]> wrote:
>>>
>>> Hello,
>>>
>>> as I will have to develop a little web application for serving >~80
>>> % pure static and < 20 % dynamic (DB frontend, sessoins - DB choice
>>> is still free) content, I thought of using N2O as the toolkit of
>>> choice. Some questions arise from that:
>>>
>>> * Are there better alternatives to N2O for that?
>>>
>>> * Is there a (preferrably step by step) guide for beginners
>>> available, as most of the tutorials I found seem outdated for years?
>>>
>>> Thanks in advance for hints!
>>> Eckard
>>>
>>> --
>>> :)
>>> _______________________________________________
>>> erlang-questions mailing list
>>> [hidden email]
>>> http://erlang.org/mailman/listinfo/erlang-questions
>>
>
>
>
> --
> :)

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Web toolkit, N2O guide

Eckard Brauer
In reply to this post by Dmitry Klionsky-2
Hello,

OK, tried the "Getting started" at
(https://ninenines.eu/docs/en/cowboy/2.6/guide/getting_started/).

When following that page, I don't get a 500 response as promised, but a

compile: warnings being treated as errors
src/hello_erlang_handler.erl:9: function start/2 is unused

when building. So defining routes in paragraph "Listening for
connections" should probably be corrected - what's the correct way /
where is the correct position to define routes?

Thanks in advance!
Eckard

Am Tue, 2 Apr 2019 09:57:36 +0300
schrieb Dmitry Klionsky <[hidden email]>:

> +1 for cowboy.
>
> You serve static files using
> https://ninenines.eu/docs/en/cowboy/2.6/guide/static_files/
> For templating you can use https://github.com/erlydtl/erlydtl
>
>
> On 4/1/19 10:59 PM, Wes James wrote:
> > How about cowboy:
> >
> > https://github.com/ninenines/cowboy
> >
> > <snip>
> >
> >
> > -wes
> >
> > _______________________________________________
> > erlang-questions mailing list
> > [hidden email]
> > http://erlang.org/mailman/listinfo/erlang-questions



--
:)
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Web toolkit, N2O guide

Hugo Mills-2
On Wed, Apr 03, 2019 at 12:21:15PM +0200, Eckard Brauer wrote:
> Hello,
>
> OK, tried the "Getting started" at
> (https://ninenines.eu/docs/en/cowboy/2.6/guide/getting_started/).
>
> When following that page, I don't get a 500 response as promised, but a
>
> compile: warnings being treated as errors
> src/hello_erlang_handler.erl:9: function start/2 is unused

   Is the function exported?

   Hugo.

> when building. So defining routes in paragraph "Listening for
> connections" should probably be corrected - what's the correct way /
> where is the correct position to define routes?
>
> Thanks in advance!
> Eckard
>
> Am Tue, 2 Apr 2019 09:57:36 +0300
> schrieb Dmitry Klionsky <[hidden email]>:
>
> > +1 for cowboy.
> >
> > You serve static files using
> > https://ninenines.eu/docs/en/cowboy/2.6/guide/static_files/
> > For templating you can use https://github.com/erlydtl/erlydtl
> >
> >
> > On 4/1/19 10:59 PM, Wes James wrote:
> > > How about cowboy:
> > >
> > > https://github.com/ninenines/cowboy
> > >
> > > <snip>
> > >
> > >
> > > -wes
> > >
> > > _______________________________________________
> > > erlang-questions mailing list
> > > [hidden email]
> > > http://erlang.org/mailman/listinfo/erlang-questions
>
>
>
--
Hugo Mills             | "I don't like the look of it, I tell you."
hugo@... carfax.org.uk | "Well, stop looking at it, then."
http://carfax.org.uk/  |
PGP: E2AB1DE4          |                                             The Goons

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions

signature.asc (853 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Web toolkit, N2O guide

Eckard Brauer
Hello Hugo,

you hit the nail - I should have known that, but the next problem
arises:

Even if [{port, 8080}] is the 2nd arg of cowboy:start_clear/3, the
server doesn't listen on 8080 - at least netstat doesn't see that, and
I don't get a connection.

How to diagnose that problem - what am I doing wrong?

Thanks again,
Eckard

Am Wed, 3 Apr 2019 10:31:29 +0000
schrieb Hugo Mills <[hidden email]>:

> On Wed, Apr 03, 2019 at 12:21:15PM +0200, Eckard Brauer wrote:
>  [...]
>
>    Is the function exported?
>
>    Hugo.
>
>  [...]
>  [...]
>  [...]
>  [...]
>



--
:)
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Web toolkit, N2O guide

Roger Lipscombe-2
In reply to this post by Eckard Brauer
> Open the src/hello_erlang_app.erl file and add the necessary code to the start/2 function

start/2 goes in hello_erlang_app.erl, not hello_erlang_handler.erl.

On Wed, 3 Apr 2019 at 11:21, Eckard Brauer <[hidden email]> wrote:

>
> Hello,
>
> OK, tried the "Getting started" at
> (https://ninenines.eu/docs/en/cowboy/2.6/guide/getting_started/).
>
> When following that page, I don't get a 500 response as promised, but a
>
> compile: warnings being treated as errors
> src/hello_erlang_handler.erl:9: function start/2 is unused
>
> when building. So defining routes in paragraph "Listening for
> connections" should probably be corrected - what's the correct way /
> where is the correct position to define routes?
>
> Thanks in advance!
> Eckard
>
> Am Tue, 2 Apr 2019 09:57:36 +0300
> schrieb Dmitry Klionsky <[hidden email]>:
>
> > +1 for cowboy.
> >
> > You serve static files using
> > https://ninenines.eu/docs/en/cowboy/2.6/guide/static_files/
> > For templating you can use https://github.com/erlydtl/erlydtl
> >
> >
> > On 4/1/19 10:59 PM, Wes James wrote:
> > > How about cowboy:
> > >
> > > https://github.com/ninenines/cowboy
> > >
> > > <snip>
> > >
> > >
> > > -wes
> > >
> > > _______________________________________________
> > > erlang-questions mailing list
> > > [hidden email]
> > > http://erlang.org/mailman/listinfo/erlang-questions
>
>
>
> --
> :)
> _______________________________________________
> erlang-questions mailing list
> [hidden email]
> http://erlang.org/mailman/listinfo/erlang-questions
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Web toolkit, N2O guide

Eckard Brauer
Hello Roger,

thanks - now it works. Will have to study the documentation a bit more
to understand the structure of cowboy apps.

Cheers,
Eckard

>  [...]
>
> start/2 goes in hello_erlang_app.erl, not hello_erlang_handler.erl.
>
> On Wed, 3 Apr 2019 at 11:21, Eckard Brauer <[hidden email]>
> wrote: [...]
>  [...]
>  [...]
>  [...]



--
:)
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Web toolkit, N2O guide

Jesper Louis Andersen-2
In reply to this post by Eckard Brauer
On Mon, Apr 1, 2019 at 1:09 PM Eckard Brauer <[hidden email]> wrote:

* 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.

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.


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Web toolkit, N2O guide

Wes James
In reply to this post by Eckard Brauer
Take a look at the examples.

wes

On Wed, Apr 3, 2019 at 4:21 AM Eckard Brauer <[hidden email]> wrote:
Hello,

OK, tried the "Getting started" at
(https://ninenines.eu/docs/en/cowboy/2.6/guide/getting_started/).

When following that page, I don't get a 500 response as promised, but a

compile: warnings being treated as errors
src/hello_erlang_handler.erl:9: function start/2 is unused

when building. So defining routes in paragraph "Listening for
connections" should probably be corrected - what's the correct way /
where is the correct position to define routes?

Thanks in advance!
Eckard

Am Tue, 2 Apr 2019 09:57:36 +0300
schrieb Dmitry Klionsky <[hidden email]>:

> +1 for cowboy.
>
> You serve static files using
> https://ninenines.eu/docs/en/cowboy/2.6/guide/static_files/
> For templating you can use https://github.com/erlydtl/erlydtl
>
>
> On 4/1/19 10:59 PM, Wes James wrote:
> > How about cowboy:
> >
> > https://github.com/ninenines/cowboy
> >
> > <snip>
> >
> >
> > -wes
> >
> > _______________________________________________
> > erlang-questions mailing list
> > [hidden email]
> > http://erlang.org/mailman/listinfo/erlang-questions



--
:)
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Web toolkit, N2O guide

Eckard Brauer
Hello Wes,

was my fault - I put the start/2 into hello_erlang_handler instead of
*_app by accident (in fact, I made a shell script, and that was a
consequence of copy/paste).

But thanks for the hints - I appreciate both the simplicity and
expressiveness of Erlang.

Cheers,
Eckard

Am Wed, 3 Apr 2019 08:31:29 -0600
schrieb Wes James <[hidden email]>:

> Take a look at the examples.
>
> wes
>
> On Wed, Apr 3, 2019 at 4:21 AM Eckard Brauer <[hidden email]>
> wrote:
>
> > Hello,
> >
> > OK, tried the "Getting started" at
> > (https://ninenines.eu/docs/en/cowboy/2.6/guide/getting_started/).
> >
> > When following that page, I don't get a 500 response as promised,
> > but a
> >
> > compile: warnings being treated as errors
> > src/hello_erlang_handler.erl:9: function start/2 is unused
> >
> > when building. So defining routes in paragraph "Listening for
> > connections" should probably be corrected - what's the correct way /
> > where is the correct position to define routes?
> >
> > Thanks in advance!
> > Eckard
> >
> > Am Tue, 2 Apr 2019 09:57:36 +0300
> > schrieb Dmitry Klionsky <[hidden email]>:
> >
> > > +1 for cowboy.
> > >
> > > You serve static files using
> > > https://ninenines.eu/docs/en/cowboy/2.6/guide/static_files/
> > > For templating you can use https://github.com/erlydtl/erlydtl
> > >
> > >
> > > On 4/1/19 10:59 PM, Wes James wrote:
> > > > How about cowboy:
> > > >
> > > > https://github.com/ninenines/cowboy
> > > >
> > > > <snip>
> > > >
> > > >
> > > > -wes
> > > >
> > > > _______________________________________________
> > > > erlang-questions mailing list
> > > > [hidden email]
> > > > http://erlang.org/mailman/listinfo/erlang-questions
> >
> >
> >
> > --
> > :)
> > _______________________________________________
> > erlang-questions mailing list
> > [hidden email]
> > http://erlang.org/mailman/listinfo/erlang-questions
> >



--
:)
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Web toolkit, N2O guide

Eckard Brauer
In reply to this post by Jesper Louis Andersen-2
Hello Jesper,

Jesper Louis Andersen <[hidden email]>:

> On Mon, Apr 1, 2019 at 1:09 PM Eckard Brauer <[hidden email]>
> wrote:
>
> >
> > * 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!

Cheers,
Eckardo

--
:)
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions