Notice: A non well formed numeric value encountered in /var/www/clients/client3/web52/web/issues/includes/class.flyspray.php on line 96 Notice: A non well formed numeric value encountered in /var/www/clients/client3/web52/web/issues/includes/class.flyspray.php on line 96 Notice: A non well formed numeric value encountered in /var/www/clients/client3/web52/web/issues/includes/class.flyspray.php on line 96 Deprecated: Function create_function() is deprecated in /var/www/clients/client3/web52/web/issues/includes/class.flyspray.php on line 104 Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /var/www/clients/client3/web52/web/issues/adodb/adodb.inc.php on line 845 Deprecated: Function create_function() is deprecated in /var/www/clients/client3/web52/web/issues/includes/class.user.php on line 111 Notice: Trying to access array offset on value of type bool in /var/www/clients/client3/web52/web/issues/scripts/details.php on line 127 FS#57 : make code testable

ShuFu Privacy - Firefox Addon

Notice: Undefined index: tasklist_type in /var/www/clients/client3/web52/web/issues/includes/class.tpl.php(128) : eval()'d code on line 85 Notice: Undefined index: tasklist_type in /var/www/clients/client3/web52/web/issues/includes/class.tpl.php(128) : eval()'d code on line 90
  • Status Assigned
  • Percent Complete
    0%
  • Task Type General Change
  • Category Testing
  • Assigned To Johannes Ahlmann (johannes)
  • Operating System All
  • Severity Low
  • Priority Normal
  • Reported Version Development
  • Due in Version 0.2.3
  • Due Date Undecided
  • Votes 0
  • Private No
Attached to Project: ShuFu Privacy - Firefox Addon
Opened by Johannes Ahlmann (johannes) - 2013-10-23
Last edited by devBert (devBert) - 2014-01-16

FS#57 - make code testable

- each file defines one or more modules/classes
- modules/classes are not instantiated within same file
- we add init files for panel/config/wizard/...
- each module/class is built by a dependency injection/factory thingey
- all dependencies of the module/class need to be explicitely stated at the beginning/instantiation

before:
(function() {
SHUFU.xyz = ... SHUFU.other ...
})();


after:
function makeXyz(dep1, dep2, dep3) {
return {
xyz = ... dep2 ...
};
}

later:
var xyz = theFactory('xyz');

This task does not depend on any other tasks.

Loading...