Cargo-Lua best practices by River

Fremantle

· EMWCon · Cargo · Lua · MediaWiki · conferences · videos ·

EMWCon has finished for this year. It's all been online, but still run in UTC-4 (it was going to be held in Ohio, USA), so unfortunately I've only been able to attend a couple of sessions at the start and end of the days. Luckily, all talks were recorded and are now on Youtube.

This morning, I've been catching up on Cargo/Lua Best Practices, and When Not To Use Them by Megan Cutrofello (aka RheingoldRiver). Two things that I found interesting were her advice to

  • not use _pageName unless it's to actually get the page name; don't use it as a primary key (instead add a separate field to use as a PK, one that doesn't change ever); and
  • not to output wikitext in Lua (but use mw.html instead).