Nova Web Framework - have you used it?

If so, where/how and what do you like about it? :003:

Nova makes it simple to build a fault-tolerant and distributed web application. It takes ideas from different web frameworks and implements them with the functionality and stability that Erlang and BEAM offer.

Built with

Nova makes it simple to build a fault-tolerant and distributed web application. It takes ideas from different web frameworks and implements them with the functionality and stability that Erlang and BEAM offer.

Erlang/OTP

Runs on a well tested Erlang VM (BEAM) that has been proven up to five nines availability.

Django Templates

Powerful views that utilizes django templates.

Open-source

We encourage people to get involved and contribute to the project, and build web applications with this framework.

http://novaframework.org

3 Likes

Their website doesn’t have SSL support, my browser didn’t want to load it, lol. ^.^;

It’s docs are mostly just a dump of the functions, it could definitely use some how-to’s and setup’s and other such pages. Hard to get a handle on it currently.

1 Like

The site is working fine for me but I remember you have similar issues with another non-ssl site…

I agree how-tos and tutorials are always handy, and from what I know @Taure will be giving a talk about Nova soon… so maybe that will contain a bit more info :003:

1 Like

New page that we will launch soon will run with https. Also have more content.

Meanwhile you can look at our last talk to get some understanding

Here is also some olddr dev.to

And on githib you can see how ro install

Here are some demos:

5 Likes

I have Firefox set to strict mode, which is pretty good about throwing up all kinds of warnings when accessing sites that aren’t set up properly, but it also makes it (rightfully for security reasons) difficult to even access those sites unless they get fixed or I jump through hoops (which makes me really make sure that I really want to access that site), lol.

Woot!

Will nova be serving the HTTPS itself it will it be reverse proxied or so?

Homepage could definitely use some examples (animated image of in the UI on how to do something, code, etc…) to really show things off!

1 Like

It is more us not doing certs why our homepage with nova runs on http. Nova is built on cowboy so yes it would be easy to fix to add certs.

That is why we will add it when we update the site soon.

2 Likes

It would probably be a huge boom to build in ACME communication into the server software, that way certs can be updated easily, automatically, and on the fly! A lot of server software either has ACME built in or as a plugin nowadays, even to the lowest level software on sockets. Could probably build it off one of the ACME libraries in the erlang ecosystem.

1 Like

This is very interesting to see. I am new to erlang, and it would be nice if someone can help with a CRUD application written in Nova that shows how to:

  1. Configure routes for POST, GET, PUT/PATCH, DELETE
  2. Channel requests to controllers.
    3 Fetch/ create / read / update from DB
  3. Return views and json to the browser.

Thank you in advance.

2 Likes

Here is a small repo that shows how you can create routes and a controller with different return values back. Json, handling json, qs and so on.

Also it is a websocket routing in this with a ws module. It doesn’t have any DB in it. But DB requests you can have in the functions that need to handle it.

It also have tests if you want to see how you can do that.

3 Likes

Thank you.

2 Likes

@Taure just want to say thanks, I really like the way you’re providing code examples for possible use cases, that is very user friendly way to learn framework.

3 Likes

If you have any questions you can ask here on the forum or join us in Erlang slack #nova channel.

We will try to update our guides more this year.

https://hexdocs.pm/nova/quick-start.html

2 Likes

Hey, this sounds interesting ! I am an Erlang beginner and I’m curious how exactly this framework makes a web application more scalable. As far as I can see, it simply serves API requests?

2 Likes

Not really sure what more scalable means in this context.

Right now I would say Nova is more of a View-Controller Framework where the Model part of it is in early beta.

With Views, you can work with DTL to create frontend parts. We have plugins to handle the flow of a request, like decoding body or access logging, we also aim to have modularity in it.

You can use Nova to only serve API:s, but you can also do both have some endpoints that will have a view and some endpoints that will work as an API or just serve some views.

When installing Nova you get access to the rebar3_nova plugin that have some templates that you can use to bootstrap a Nova application.

2 Likes

I picked up the “more scalable” somewhere on the project’s website I think. I’m trying it out, I noticed though that in this article Getting started with Nova - DEV Community the link to the installer is outdated.

Plus, unfortunately, the installation of rebar3 hangs for me (waited several minutes, yes I’m using a local rebar3). Tried several times, no progress in minutes unfortunately:

sh -c "$(curl -fsSL https://raw.githubusercontent.com/novaframework/rebar3_nova/master/install.sh)"
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  4880  100  4880    0     0  20326      0 --:--:-- --:--:-- --:--:-- 20944
Rebar3 could not be found in your $PATH. This might be cause you are
running a local installation or forgot to install it.
Do you want to install rebar3? (Y/n)

why could that be ?

Edit2: The curl one-line installer on the website looks a bit off also… ?

Edit3: After digging to the core of the installer and running the escript inside it manually, it worked for some reason:

Congratulations, you have installed Nova plugin for rebar3!
Try it out with typing:
$ rebar3 new nova my_first_app

Running that though gave - besides a few warnings - this error:

===> "/Users/xxx/.cache/rebar3/plugins/pmod_transform/ebin/pmod_transform.app" is missing applications entry

and after that, $ rebar3 shell freezes here:

===> Verifying dependencies...
===> Analyzing applications...
===> Compiling myapp
Erlang/OTP 23 [erts-11.2.2.9] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [hipe] [dtrace]

Eshell V11.2.2.9  (abort with ^G)
1> ===> Booted myapp
===> Booted sasl

so opening localhost:8080 doesn’t yield the expected results. any advice what I’ve done wrong maybe ?

Edit4: After wiping erlang and rebar3 thoroughly and reinstalling, the install instructions worked. :tada:

3 Likes

Great that it got solved. :slight_smile:

3 Likes