Board Thread:Watercooler/@comment-5590118-20150701035141/@comment-24473195-20150924211541

I really don't see Lua modules used on wikis that often. Every so often I see them, but honestly I'm kind of against them because of how complex and unreasonably long they are. You have to go through and create a table then create functions within the table and then write in such a weird way that it just seems pointless and unworthy of the effort it requires. I could probably transform most modules into JS. The only benefit is that supposedly it doesn't quite take as long to load Lua modules. I don't know the validity of this claim, but I assume it's based off the presumption that JS runs on all pages whereas modules run on the pages you transclude them on. Well, there are two sides to modules. One side is user-facing ("{{#invoke"), and the other is the code.

From my perspective most people don't need to know how to create lua modules, just like 99% of people don't really know the code behind the {{#if  parser function, and most don't care, as long as it works. So it is not a particular problem that modules are complex, most users only need to know is how to {{#invoke them, and what functionality they have. Although that would only work if there are enough people helping to maintain and create them, just like in wikipedia.

Modules are by far more efficient than JS and regular wikitext templates, both wikia and the wikimedia foundation has run tests to verify this. For one some JS may not work on mobile, and some wikitext templates are so long that they may take ages to download on mobile. That's not even counting that there are some really crazy huge frankenstein templates out there.

Anyway, I'll take my own advice and use the User: for documentation. It may probably be another year before people come to an agreement on where or how to store them properly.