Moderators: They make you lose count(Longest thread still alive!)

  • FTB will be shutting down this forum by the end of July. To participate in our community discussions, please join our Discord! https://ftb.team/discord

lenscas

Over-Achiever
Jul 31, 2013
2,015
1,801
248
94 well, it makes sense if you have programmed with a mvc-framework that had you make routes.
The only thing my creation does differently then the one I use the most is that it easily splits off into other files, which I must admit is a feature I "stole" from nodejs.
Though that one worked a bit differently, with the nodejs version all the possible routes are loaded at once. With my version the correct route is found in steps, in theory you can have 10 route files loaded before your program finally "arrived" at the controller.

Also, I discovered that I really like to work on it, so much though that I made a start at "replacing" lapis database functions with my own (right now I just load in luaDBI) and I am really tempted to also make my own rendering functions/system (looks at sailor awesome client+server code thing of awesomeness) and even get my thing loose from the lapis framework and make it a "real" framework that can stand on its own.

So....what to work on next. A "real" quarry builder like codeigniter has? Or trying to make my own render things? Or replace some utility functions like to_json() and from_json() (though those 2 examples are bad as I am just going to load in a nice library for that. No point in reinventing the wheel again)

Or perhaps make a script that will compile all the lua files and see if I can load in compiled scripts?
Or any other ideas that may make a framework more awesome?

Maybe I should combine the helper object inside the app object so you need to pass less things?
 

lenscas

Over-Achiever
Jul 31, 2013
2,015
1,801
248
102 I also learned today that lua has a foreach.
I guess it has that for the guys that like functional programming as I don't see why you would want to use it instead of
for key,value in pairs(someTable) do
--code
end

I mean, that looks nicer then
local someFunction(key,value)
--code here
end
table.foreach(someTable. someFunction)

(in my eyes at least)