User:Jeroen De Dauw/Wikibase.git cleanup

This page collects some of my notes on how to clean up Wikibase.git.

The first phase in this will be getting rid of the amorphous blob that is Lib by drawing boundaries and splitting of code in an iterative process. The second phase will be creating boundaries in the client and repo apps and cleaning up dependency construction.

Change dispatching edit

DispatchChanges script edit

Is really its own app, should be separated from lib

Includes

  • DispatchChanges
  • ChangeNotificationJob
  • Several references to Settings

ChangeNotifier class edit

Belongs in Repo, not used elsewhere

UpdateRepoOnMoveJob edit

  • Currently in Lib
  • Only constructed by Client
    • not quite - the JobQueue infrastructure instantiates it via reflection on the repo, in order to run it. -- Duesentrieb 11:48, 3 February 2014 (UTC)
  • Repo job queue needs to be able to run it
  • Contains code that can only work on Repo
    • Since the introduction of JobSpecification into core, we can push the job into the queue without instantiating the implementation, so the job implementation can now be moved into the repo. -- Duesentrieb 11:48, 3 February 2014 (UTC)

SpecialWikibaseQueryPage edit

  • Has reference to Repo
  • Only one usage in Client - it overrides the usage of Repo code

JavaScript edit

Should be split from PHP code. Probably all ought to go in own repo, with specific part (such as data model) being further split off.

mw.config.values.wbDataTypes resource module uses global state from repo or client in really fucked way. Using JS needs to be fixed first.

Lib/serializers edit

Belongs in it own component.

https://github.com/wmde/WikibaseDataModelSerialization