On Feb 2, 2012, at 7:11 PM, Rawld wrote:

I'm not sure exactly when the change was made to add a dojo.js
dependency, but I remember the rational...

DOH was always dependent on parts of dojo.
Untrue. And if true, easily fixed.

What it *always* did was try to load Dojo tests if it detected Dojo around. But that's not the same thing as a dependency.
In the old days, those
dependencies were ccp from the dojo code stack over to the DOH code
stack.
That was an *explicit* choice on my part: the idea of a test harness depending on the code under test is *NUTS*. Completely bonkers. At a *minimum*, if there's a dep, DOH should have it's *own copy* of a *stable version* of that thing.
This resulted in the need to mx two copies of the same
code...which resulted in one of those copies rotting (DOH's). In fact,
DOH has become more and more janky over the years.
That's a question of interest and investment, not design and architecture.
The naive alternative--just depend on dojo.js--wasn't/isn't any better
(as you point out). This pollutes the test environment too much and may
be adjudicated as too heavy.
It is actively worse in at least 2 ways:

1.) projects that just want DOH (as I happen to right now) no longer can do that without figuring out what web of dependencies they need to un-tangle. As it is, I'm just going to take the 1.6.x version and hack out all the other stuff in there that feels wonky to me. Yes, that's a fork...but at least I can do it easily enough.
2.) instability in Dojo is now instability in DOH.

Also, "pollutes the test environment"? 'Fo serious? Did you see how DOH was structured? It added one global. That's it.
The wise alternative is to use only the particular modules of dojo
needed to impl DOH, and *push them into a private namespace* as is
possible with dojo's AMD loader. This way duplication of code is
eliminated and code doesn't rot, yet the test environment is not
polluted. This option is available with the "sandbox" url arg. It is
experimental in 1.7 and was working at one point, though I haven't
tested it in a while.
Again, bonkers. The point of a test system is to be isolated. Having dependencies from the *code under test* is *INSANE*.
If you want to use DOH, you've always had to download the toolkit (I
just did a quick check and I didn't see any way to just get DOH), so the
dojo tree is there; using it doesn't add any weight. In the future, we
may want to package DOH independently.

Anyhow...that was the thinking...

--Rawld

On 02/02/2012 10:30 AM, Alex Russell wrote:
Um, somehow DOH seems to have sprung a Dojo dependency which is...um...nuts.

How did this happen? Why is it considered sane? I just want to test some code, not get in bed with all of dojo.js.

*sigh*
_______________________________________________
dojo-contributors mailing list
dojo-contributors at mail.dojotoolkit.org
http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
_______________________________________________
dojo-contributors mailing list
dojo-contributors at mail.dojotoolkit.org
http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 4 of 38 | next ›
Discussion Overview
groupdojo-contributors @
categoriesdojo
postedFeb 2, '12 at 1:30p
activeMar 2, '12 at 5:25a
posts38
users13
websitedojotoolkit.org

People

Translate

site design / logo © 2022 Grokbase