Skip to content

Bundle AngularJS with Piwik #4691

@mattab

Description

@mattab

The goal of this ticket is to gather all good ideas on how we could use AngularJS within Piwik and make the most of it.

  • Introduce AngularJS and define some best practices
    • Good / bad practices
    • ~~When AngularJS can or should be used ~~
    • ~~Some examples ~~
    • Links to some good blog posts / videos, eg. AngularJS Recipes
    • What to consider for IE8 compatibility
    • ...
  • Define / change file structure of AngularJS widgets (the earlier the better)
    • Instead of grouping files into javascript, stylesheet, templates, ... folder we could separate them by use case. Meaning under a plugin there is a folder per feature such as "siteselector" which contains all related files. For instance siteselector(-contorller.js), sitecontroller-directive.js, sitecontroller.html, sitecontroller-filter.html
    • ~~There might be especially under CoreHome plugin a folder such as "common" where files are grouped into folders "filter", "service", "directive", ... for commonly used code. ~~
  • For Piwik core package: use a Package manager for Javascript such as bower.io
    • This would be used by plugins to define their JS dependencies
    • This would allow Piwik to load a given library only once, when two plugins or more require such JS lib
    • Document in developer.piwik.org this new workflow
    • Marketplace when packaging plugins, will resolve JS dependencies.
    • Builds.piwik.org when building Piwik, will resolve core JS dependencies.
  • ~~We could use Karma (http://karma-runner.github.io/0.10/index.html) + MochaJS ~~(http://visionmedia.github.io/mocha/) to run and write tests.
    • Provide a karma config and write a howto setup
    • Write some test examples
  • Grunt.js (http://gruntjs.com/) can be used to simplify some common tasks
    • Might be interesting for the build process as well
    • Features like Live-reload are interesting
  • Documentation

See also:

Documentation

Metadata

Metadata

Assignees

No one assigned

    Labels

    MajorIndicates the severity or impact or benefit of an issue is much higher than normal but not critical.TaskIndicates an issue is neither a feature nor a bug and it's purely a "technical" change.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions