matomo-org / matomo

Empowering People Ethically with the leading open source alternative to Google Analytics that gives you full control over your data. Matomo lets you easily collect data from websites & apps and visualise this data and extract insights. Privacy is built-in. Liberating Web Analytics. Star us on Github? +1. And we love Pull Requests!
https://matomo.org/
GNU General Public License v3.0
19.73k stars 2.63k forks source link

refactor most of SQL currently spread in codebase to be all within Dao classes. #7571

Open mattab opened 9 years ago

mattab commented 9 years ago

The goal of this issue is to extract the SQL queries from the codebase into Dao objects. When this issue is done, all SQL queries in Piwik will be in their own Dao objects and not spread across many other objects. this will make the platform codebase more consistent and slightly easier to work with.

Steps

Follows up #7540

(this is also a small first step that will later help work on postgresql support in #500)

mattab commented 9 years ago

we should already start creating new Dao classes suffixed with Dao.

I suggest we aim to refactor consistently across core codebase and plugins to use Dao (instead of Model), and move most of the spread-around SQL in new Dao classes, for Piwik 3.0.0

mattab commented 9 years ago

We will make some progress on moving SQL to Dao, especially for Tracker + Archiver.

The rest will be done later, if anyone wants to help, please submit pull requests :-)