This is a work in progress - please modify and comment!
- Any HTML templates should live in separate files in the "/template" directory, rather than as inline strings
- PREREQUISITE: [ ] pre-compile and bundle templates with grunt to avoid proliferation of XHR requests
- Use minimal plugin configs (eg.
gridOptions
forng-grid
): defer to defaults where possible. Same goes for other plugins - avoid lengthy configs where possible - Use
extend
, in order to add structure to property declarations:// before $scope.foo = 1; $scope.bar = 2; $scope.baz = function() { ... } // after angular.extend($scope, { foo: 1, bar: 2, baz: function() { ... } });
- Table data manipulation (searching, sorting, etc.) for large data sets (>10 rows) should take place server side.
-
Use NPM modules where useful.
- External modules must be well tested and documented.
- External modules must be kept in the default "node_modules" folder.
- Check external dependencies into the git repo (to prevent build issues if NPM is down at build time).
- Avoid modifying external modules.
- After NPM-installing a module, require it CommonJS style. Eg.
// good require('module'); // bad require('../node_modules/module/module.js');
- Declare dependency versions using fuzzy versioning, eg.
1.1.x
(more about semver)
- Grid: Turntable
- Infinite scroll view: turn/infinite-scroll
- Autocomplete:
- BinaryMuse/ngInfiniteScroll
- fires continuously
onScroll
which causes significant UI lag - many open issues
- fires continuously
- ng-grid
- too many features, sloppy code, and low test coverage
- many outstanding issues
- goes to extreme lengths to avoid using
<table>
s - weird workarounds for standard use cases, see here