[dojo-contributors] DOH!

sam foster potatosculptor at gmail.com
Fri Mar 2 05:25:11 EST 2012


I just want to add to the statistics of projects that would have
chosen doh if it hadn't needed to load dojo.js (I've used an
AMD-patched Jasmine on the last couple of projects). Honestly, if you
look at all these test frameworks they have their own core and dom
library baked into them and the code-reuse-or-bust part of you
cringes. But in a test situation you are less concerned with how much
code there is and more concerned with its stability and a certainty
that the results you get back aren't tainted by the test framework
itself.

ISTM that this is a case for a build, so we end up with output like

doh/
    runner.js  <-- this is all I need
    resources/   <-- for a nice browser-based runner
      templates, css
    lib/
      promise.js
      etc.

so I can drop it in:

project/
  main.js
  lib/
    etc.
  test/
    doh/
      runner.js
    resources/ etc.

It doesn't matter that DOH has dependencies on dojo modules, provided
those are bundled in, and checked and released independent of dojo
itself. Its more important that we don't leak any globals or other
environment side-effects other than a single doh. (if that) So as a
DOH-only consumer, I should be able to grab a zip or git clone which I
can drop into a vendor/doh directory and treat as a black box. I never
have to see or care what modules DOH uses internally.

DOH is a poster-child case for a baseless dojo; a seperate project
which treats dojo as a repository of handy, AMD-loadable libraries.
This is how I want to consume dojo also, so I'm motivated to get this
to work. Tom, you asked for help - I'm offering. I know I've dropped
off the map, but I'm still on freenode and IM every day - lets talk.

/Sam


More information about the dojo-contributors mailing list