• Announcement: Lua.org now officially recommends this forum as a meeting place for the Lua community

[WIP] Restia: My dumb attempt at a web framework (1 Viewer)

darkwiiplayer

Newcomer
Joined
May 30, 2020
Messages
10
Reaction score
2
Age
27
Location
Germany
Greetings Lua Forum!

Today I'd like to share a little project I'm working on: Restia, a new framework for building web applications (and other web stuff, really)

Let me explain: The original idea was to build a lightweight framework for web applications, but throwing out all of the magic that annoys me so much about frameworks like rails, while finding alternatives solutions that ideally keep about 90% of the convenience of these other frameworks with 0% of the magic.

Since most of the building blocks are intentionally very generic, I've been finding out that they can very easily be applied to other applications like building static websites or even completely unrelated applications (the config module, for example, could be used anywhere).

The questions I'm currently trying to figure out are:
  • What direction should I take this in?
  • What features need to be added, which ones should be left out?
  • Should it work without openresty as well? (luahttp, tarantool, etc.)
I'm also very interested in experimenting with static site generation, as the whole JAM stack thing seems to be gaining quite a bit of traction and the idea of having a unified system for dynamic web applications and static pages does seem cool on paper.

If you're interested, I'd love if you could have a quick look at the readme and maybe even play around with the current development version. I'm currently just going by what I figure might be best without any feedback from other users, which is never ideal. But please keep in mind that most stuff is still very experimental. A short™ guide on how to get started is included in the repository.

Anyway, thanks for reading and have a wonderful day :D
 

Sonazuma

Administrator
Staff member
Joined
Jan 6, 2020
Messages
34
Reaction score
11
I haven't had time to try it out yet, but I really like that it looks well thought out and organized. Btw, the ldoc link in the readme is broken.

To your questions: I think an answer to the first question "What direction should I take this in?" implicitly answers the next two questions. In my opinion, it depends on your target audience. If the target audience is "Ruby users", then make the transition as easy as possible for them. Personally, I really like the the benefits you listed in the readme and I will try it out.
 

darkwiiplayer

Newcomer
Joined
May 30, 2020
Messages
10
Reaction score
2
Age
27
Location
Germany
If the target audience is "Ruby users"
Ruby users are happy with ruby, so I don't think many of them are looking for an alternative, and the design principles of restia are quite different from what rails considers "good" anyway.

I was more hoping to pick up those who want some of the easy prototyping that rails offers, but who ultimately care more about performance than being able to write one-liners. Basically a good in-between of rails and plain openresty.

Btw, the ldoc link in the readme is broken.
All I see is a missing image and a code block that shouldn't be there in the changelog, which has been annoying me for a while, but doesn't break it. Do you just mean those two, or is there something more severe not working?

EDIT: Ah, also the how do I start section is currently wrong since I changed the way scaffolding works. I'll update that as soon as I get a chance.
 

Sonazuma

Administrator
Staff member
Joined
Jan 6, 2020
Messages
34
Reaction score
11
Ruby users are happy with ruby, so I don't think many of them are looking for an alternative, and the design principles of restia are quite different from what rails considers "good" anyway.

I was more hoping to pick up those who want some of the easy prototyping that rails offers, but who ultimately care more about performance than being able to write one-liners. Basically a good in-between of rails and plain openresty.


All I see is a missing image and a code block that shouldn't be there in the changelog, which has been annoying me for a while, but doesn't break it. Do you just mean those two, or is there something more severe not working?

EDIT: Ah, also the how do I start section is currently wrong since I changed the way scaffolding works. I'll update that as soon as I get a chance.

Referring to readme.md:
  1. Section: Building the Documentation: ldoc link https://github.com/DarkWiiPlayer/restia/blob/master/ldoc returns 404 not found, try in incognito mode
  2. Section: Contributing: ldoc link lunarmodules/LDoc, has a syntax error (comma at the end)
 

darkwiiplayer

Newcomer
Joined
May 30, 2020
Messages
10
Reaction score
2
Age
27
Location
Germany
Ah, now I see... Damn that's a dumb error: I used `()` instead of `[]` in a markdown link! Thanks for pointing that out :D
 

dinsdale247

Moderator
Staff member
Community Patron
Creator of WinLua
Joined
Nov 17, 2020
Messages
93
Reaction score
32
Location
Victoria BC
Website
winlua.net
Very cool. Have you tried it with lua-http? Here is a little prototype project I have that creates a web terminal to a running minecraft server (*nix only). The next step was to combine it with a small "database" and add dynamic pages so users could log in, manage, and connect to MC instances. Restia looks like a good fit.

One of the problems with lua-http is that it's very low level. The lua-http server module is what you would use to write a "web server". Things like templating engines and authentication modules need to be written or bolted on.
 
Top