lapis
lapis copied to clipboard
Lack of simple yet complete exemples.
The framework does have indeed a good documentation, but... I mean, it's really hard to get used to it, even after reading the documentation. Even better than guides, simple examples would provide a much easier adaptation. For example, a simple blog working with sessions.
The mysql documentation does not show an exemple either, so is the db connection escaped? I mean, does it works like PDO prepare (verbatim)?
What kind of examples besides a blog would you want? I'm totally up for working on such examples as practice and to learn the framework better.
Thank you. I would be grateful if you could write a simple login system using sessions, since I couldn't get it. You don't really have to write a entire blog example, I'm just wondering how files are separated (best practices guideline). For example, app.lua + posts.lua + pages.lua (?).
We could borrow some inspiration from Flask. The Flask tutorial has you build an example app from scratch. Perhaps a Lapis tutorial could do the same? The screencast that Leafo put up on their YouTube channel is good, but it's outdated by a few years.
I second that, the Flask tutorial looks really interesting.
Streak.club code base is good for examples.
I second this. Lapis has good documentation for the basic stuff, but users are pretty much left to themselves with anything more complex than that, and figuring out all that stuff takes time.
@sliceofcode Can you link to that video? Maybe it'll give me an idea for what should be covered.
I agree with @honewatson that streak.club is a spectacular example. Streak.club would really benefit from code annotations like how underscore does it. Apparently it uses docco although for this usecase it would be more fitting that the lua-flavored locco is used. Would anyone be interested in an idea like this happening?
In retrospect a moonscript-based docco doesn't currently exist and I think that would be a major disqualifier for this idea :\
@CatLover91 locco is cool though I also like this style of inline documentation using Markdown:
https://github.com/alexanderGugel/jdi
Shouldn't be too hard to create something for moonscript. I have already started creating some comments in anticipation of creating something like jdi for moonscript at some stage.
-- ## Confirm Anonymous Variable
--
-- Check if anonymous value exists. If it doesn't assign anonymous property with false
check_anonymous = (user) ->
unless user.anonymous
user.anonymous = false
user
@honewatson I am willing to come up with some kind of hosting and a tld to stand up something like this. I think the lapis community would really benefit from more resources and it would help distribute some of the weight of providing documentation off @leafo's shoulders.