Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor reports and dimensions #5820

Closed
tsteur opened this issue Jul 11, 2014 · 2 comments
Closed

Refactor reports and dimensions #5820

tsteur opened this issue Jul 11, 2014 · 2 comments
Assignees
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.

Comments

@tsteur
Copy link
Member

tsteur commented Jul 11, 2014

Currently, it is very complicated to add a new report or a new dimension.

For instance to add a new report you basically need to know

  • about the entire Piwik platform (eg Events, Menu, Widgets, ReportMetadata, ViewDataTable, DataTable, API, Controller, ...)
  • about many data strucutres (eg how a report metadata array structure looks like where not even a documentation about all array keys exists, about goal reports, segment metadata array structure, ...) etc
  • the code just for one report is spread across many files.
  • A lot of duplicated code. Eg translations for report names, dimensions, etc have to be copied many many times because of the current implementation

For a third party developer this is nearly impossible and would probably take a very long time. Goal is to make this as easy as possible while keeping the platform still performant.

It is a bit easier for plugin developers to add a new dimension although it is still complicated. I think it is not possible add all to add new actions. Even more complex is the part of the core. It is very hard to understand (even for core developers) what is going on during tracking and how everything works. Code is often spread across many files. Only a few people can actually add new dimensions. One problem is that most dimensions are in core although they should be actually in the plugins. Goal is to make it easy to add new dimensions and also easier to understand current dimensions. It would be awesome to have the code for one dimension in one class or whatsoever. Including their MySQL column definition, segments, .... Another goal is to move as much code out of the core as possible for now. Please consider: It would be possible to move a lot out but this would involve the refactoring of many more parts which results in a never ending refactoring.

The last goal is to provide a step by step guide and documentation for core and plugin developers.

tsteur added a commit that referenced this issue Jul 12, 2014
tsteur added a commit that referenced this issue Jul 15, 2014
…. Also reverted the config change in the previous commit which was actually not needed
tsteur added a commit that referenced this issue Jul 15, 2014
tsteur added a commit that referenced this issue Jul 18, 2014
tsteur added a commit that referenced this issue Jul 18, 2014
…ate file. Added possibility to copy methods from one class into another including use statements and documentation, added possibility to directly make a translation and modify or create a language file during generation
tsteur added a commit to matomo-org/developer-documentation that referenced this issue Jul 18, 2014
tsteur added a commit to matomo-org/developer-documentation that referenced this issue Jul 18, 2014
refs matomo-org/matomo#5820 updated some guides because of reports refactoring
tsteur added a commit that referenced this issue Jul 18, 2014
tsteur added a commit that referenced this issue Jul 18, 2014
@tsteur tsteur self-assigned this Jul 18, 2014
tsteur added a commit that referenced this issue Jul 18, 2014
@mattab
Copy link
Member

mattab commented Aug 3, 2014

Great start Thomas!

@mattab mattab added this to the Short term milestone Aug 3, 2014
tsteur added a commit that referenced this issue Aug 11, 2014
tsteur added a commit that referenced this issue Aug 11, 2014
tsteur added a commit that referenced this issue Aug 11, 2014
tsteur added a commit that referenced this issue Aug 11, 2014
… be a database testcase as a random method is calling TaskScheduler which requires a DB
tsteur added a commit that referenced this issue Aug 11, 2014
…alone but not when executing the whole suite...
@tsteur
Copy link
Member Author

tsteur commented Aug 11, 2014

I'm closing this issue for now. I'd love to write some more unit/integration tests for the Tracker but the Tracker is not really testable and the system and UI tests already make sure it works. Hope we can refactor the Tracker completely at some point in the future

@tsteur tsteur closed this as completed Aug 11, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Projects
None yet
Development

No branches or pull requests

2 participants