dyna3/doc/tech.md

2.1 KiB

Technology plan for implementation

The intial modest outline for bootstrapping dyna3 is as follows:

  • dyna3 will be an npm project, but as it runs entirely client-side, there's no initial concern for being able to run under Node.js. However, npm will be useful as a dependency manager. In addition, helper scripts for the build can be run with node (via coffee).
  • For a build tool, we are just going to go with the venerable "make." I tried using npm scripts, and they can handle the necessary operations, but they have no notion of a "target being up to date" like make does, so I was constantly re-running unnecessary/redundant pieces of the process, which was frustrating.
  • The package will build into a top-level site/ directory, which will contain all and only the files that must be on a server to deliver dyna3 to a client browser. Everything in site/ will generated from the package files; nothing in site/ will be committed to the repository. Right now the planned contents a of site/ are just a handful of top-level files, the modules/ directory for in-package javascript, the /doc directory for generated documentation, and a copy of the production node_modules/ directory as a backup for the external dependencies.
  • Literate coffeescript modules (in the src/modules directory except for the top-level application) will compile into individual js modules in the site/modules directory (again, except for the top-level application)
  • Why coffeescript? The motivation for the javascript family of languages is wide deployability and availability of numerous libraries; the motivation for coffeescript is that it (still) reduces the amount of punctuation and extraneous characters from Javascript, resulting in better readability. And Literate coffeescript so that the manual and code are co-located.
  • All modules will use ES Modules syntax/format for imports.
  • index.html will be minimal, perhaps containing just a title, and maybe a link to generated documentation in the site/doc directory. All of the modules will create the DOM elements needed to display themselves on the fly.