Page MenuHomePhabricator

Documentation and framework for robust and well-performing templates and modules
Open, Needs TriagePublic

Description

This task is very bare-bones and will need fleshing out.

In the recent Tech Conf there was a session about onwiki tooling, which includes templates: T234661.

Making templates global (T52329) was identified by many participants as an important necessity, and we tried to see how could that big task be broken up to smaller and manageable steps. I am going over this list and the related notes and creating tasks accordingly to the best of my understanding:

T234661-11.JPG (3×4 px, 991 KB)

This task, or at least its initial version, covers the middle boxes in the top row and the middle row. According to @Pchelolo, one of the necessary steps towards this is to identify and document good practices for developing templates and modules and perhaps develop some kind of a framework that helps template developers and maintainers to actually write templates accordingly.

Some possible points in these practices:

  • Make sure templates are balanced (see also: T114445: [RFC] Balanced templates)
  • Templates must not be too long (define how much is "too long")
  • Templates must not call too many other templates (define how many is "too many")
  • Probably many other things

"Documentation" is probably a wiki page that lists all the best practices written by engineers who understand template and module parsing, caching, and performance.

A "framework" is probably a set of tools that helps template developers apply these suggestions. Some examples I can think of:

  • Performance measurement indicators.
  • Tips in the wiki syntax and Lua source code editing windows.
  • Special pages that show templates and modules that have performance issues.

More input from people who understand this well is needed.