Page MenuHomePhabricator

Write analysis of Jade extension's implementation
Closed, ResolvedPublic


Describe the technical implementation details of the Jade extension, including class structure and relationship to other components of MediaWiki.

Event Timeline

Harej created this task.Apr 8 2019, 4:07 PM
Restricted Application added a project: User-Ladsgroup. · View Herald TranscriptApr 8 2019, 4:07 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Harej triaged this task as High priority.Apr 16 2019, 1:16 AM

This extension basically adds a namesace (NS_JUDGEMENT), Turns content handling and content type of those pages into json (treat it like it's User:Foo/foo.json) then has some hooks that after saving those pages:

  1. Validates if the the given json is compatible with the given schema (we have v1.json schema file)
  2. Triggers JudgementSummarizer to summarize the each judgement (basically take the preferred judgements) and then uses a class called JadgementLinkTable which is a gateway to two tables using JudgementLinkHelper to put the judgements into the summary tables)

Since I love to nag, these are current issues of the extension:

  1. The tables in the database has changed (according the git blame) and now have more columns and indexes while since they are wired into update.php through patching of existing tables, the beta cluster has completely different schema than the one in the code
  2. It fails without any errors. For example is completely blank now
  3. Most of the code has lots of static entries and there's no proper DI
  4. The service-wiring is weird and doesn't look like most extensions
  5. Has lots of "Helper" classes, these are code smell and need to be moved to another class, part, etc.
  6. It's not componentize at all, there is completely different classes sitting in one namespace
  7. Has used Judgment everywhere, changing this to something else basically involves touching every line in the code.

I guess these nags are enough for now.

Harej closed this task as Resolved.Apr 18 2019, 5:17 PM