Skip to content

Latest commit

 

History

History
32 lines (29 loc) · 1.36 KB

README.md

File metadata and controls

32 lines (29 loc) · 1.36 KB

Ideas for possible improvements for milsymbol

GENERAL

  • favor maintainability over time/performance over space/memory
  • reduce overall complexity (1,827 branches, 28,534 statements)
  • consistently apply ES6 style throughout the code
  • replace deprecated String.substr()
  • replace == and != with === and !==
  • use immutable objects whenever appropriate (incl. Symbol)
  • never modify actual parameters
  • remove/replace all var declarations
  • favor map/reduce over loops
  • reduce (global) symbol state as far as possible

SPECIFIC

  • drop Canvas2D support (for now)
  • define icon parts statically, preferably in JSON definition files
  • defer styling as long as possible
  • add named styles to icon parts depending on symbol options
  • use SVG compliant attributes throughout the code
  • hoist default style attributes to SVG namespace
  • define icons (composition of icon parts) declaratively (NICE TO HAVE)
  • introduce SVG group to scale/transform icon parts
  • improve separation of symbol style options and effective style
  • remove icon cache
  • move SIDC-dependent metadata to JSON configuration (NICE TO HAVE)
  • abstract styling over letter and number SIDC (alpha/numeric)

CANCELLED

  • IMPRACTICAL - use XML library to generate SVG from JavaScript object
  • OVER-ENGINEERED - use simple layout framework for placement/alignment
  • IMPRACTICAL - use expression framework for dynamic texts