gmp26 / Apps1

An incubator for math ed apps based on AngularJS
http://nrich.maths.org/probabilityApps
MIT License
7 stars 2 forks source link

Refactor reusable code #36

Open gmp26 opened 11 years ago

gmp26 commented 11 years ago

This repo is good at making standalone Apps, but pretty hopeless at packaging reusable directives. I think we need to start a new repo for reusables modelled along angular-ui/bootstrap lines. This would mean adopting conventions such as each directive in its own [angular] module, and probably dispensing with require.js.

So we keep Apps1 for apps, but start a new repo for directives and associated support - probably by forking angular-ui/bootstrap. Those guys can summon amazing demos in plunkr or jsFiddle with very little code.

Here are some candidate reusables

Directives

  1. Factor out existing d3 directives.
  2. A graph plotter
  3. An <input type="tex" ngModel="{{mathExpr}}" > input directive based on MathQuill
  4. The mgc directives currently in incoming - these have yet to find a place in Apps1, probably because they are naturally best published as directives.

    Services

  5. A TeX to abstract syntax tree parser service. (Probably can inherit this from MathQuill)
  6. An adaptive function sampler service. It must take a mathematical expression and sample it intelligently over a given domain.