Informations for a novice

19 views
Skip to first unread message

Carlo Ascani

unread,
Mar 21, 2023, 12:46:43 PM3/21/23
to Nitrogen Project / The Nitrogen Web Framework for Erlang
Greetings,

I would like to explore alternative to Elixir/Phoenix and Python/Django to develop CRUD admin interfaces.

My goal is to:
- Render a data table which displays all the records of a specific resource (a table in a RDBMS)
- Render links to RUD actions for each record (each table row)
- Render forms to CU the resource

Before starting getting my hands dirty with Nitrogen,
I am asking if such a thing is possible / easy.

I have to say I am not an expert in Erlang.
I am sorry for the silly questions, I would accept a RTFM as an answer.

Kind Regards,
Carlo

Jesse Gumm

unread,
Mar 21, 2023, 1:51:13 PM3/21/23
to nitro...@googlegroups.com
Hi Carlo,

Absolutely. This is definitely all possible with Nitrogen (indeed, a web framework that couldn't handle that would not be terribly effective 😀).

The most basic approach is to just iterate over the data with a list comprehension or lists:map/2.  But you can also use the #bind element (https://nitrogenproject.com/demos/binding4)

For more complicated interfaces, I personally lean toward list comprehensions/lists:map

I didn't test this, I just whipped it out (so it probably has typos in it), but this is a basic example of an admin-type CRUD page you can build pretty quickly (this took me about 5 minutes):


Basically, just get your user data from some database, and then you can iterate over it.

For learning, I'd start with the demos on nitrogenproject.com, then hit the documentation for a little deeper dive.

As another option, you could check out the Nitrogen book (shameless plug, I'm one of the authors). The Erlang forums run a monthly giveaway of the ebook, or if you didn't want to wait to (maybe) win a copy, there's a coupon code there as well.  Here's that link: https://nitrogen.erlangforums.com




--
You received this message because you are subscribed to the Google Groups "Nitrogen Project / The Nitrogen Web Framework for Erlang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nitrogenweb...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nitrogenweb/643d0fcc-0f4f-4144-9d73-b75bf89a759an%40googlegroups.com.


--
Jesse Gumm
Owner, Sigma Star Systems
262-264-8844 || sigma-star.com || @jessegumm

Carlo Ascani

unread,
Mar 22, 2023, 4:01:07 AM3/22/23
to Nitrogen Project / The Nitrogen Web Framework for Erlang
Hi Jesse,

you pretty much convinced me to try Nitrogen with this talk:

Nitrogen resonates with me more than ChicagoBoss or Zotonic.

My preferred way of learning is books, so I purchased the Nitrogen ebook.

Thanks a lot,
I hope to find time next weeks to play with it.

Cheers

Jesse Gumm

unread,
Mar 22, 2023, 8:05:19 AM3/22/23
to nitrogenweb
That's awesome to hear, and thank you for the purchase!

If you have questions, feel free to ask!

Reply all
Reply to author
Forward
0 new messages