[dojo-contributors] The Canonical Header for Online Book 0.9

Craig Riecke craig at tofuna.com
Sun Aug 19 14:04:30 EDT 2007

Since the dust has sorta settled on the dojo.css discussion, it seems 
like a good time for this.  We're striving for consistency in the Online 
Book 0.9.  And that's tough when examples come from many different 
authors and sources.  As such, it make sense to have a common header for 
all examples, varying only to make a point about header options.  It's 
not so much "this is how we're legislating you do it," it's more like 
"this is the path of least resistance to get an example working." 

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
    <style type="text/css">
        /*  Note, no dojo.css include here. */
        @import "/dojoroot/dijit/themes/tundra/tundra.css";
    <script type="text/javascript" src="/dojoroot/dojo/dojo.js"  
djConfig="parseOnLoad: true"></script>
    <script type="text/javascript">
       // Other requires
<body class="tundra">

The biggest question mark is "/dojoroot".  Although it's probably best 
to use relative paths here, the fact is we have no control over where 
people place examples.

/dojoroot could be a "virtual" location, as in telling the user 
"download Dojo and place it wherever you want, and substitute that dir 
for /dojoroot in our examples."  Or we could put an actual package name 
there, as in "donwload the latest tarball, unpack it in your root web 
directory, which will create dojo-0.9beta", and use dojo-0.9beta in all 
our examples.  The plus is copied-and-pasted examples will work 
verbatim.  The minus is we have to change the references each time the 
package is updated - not so much fun, currently, in Drupal.

Or, as perhaps the ultimate path of least resistance, we could use the 
CDN location as /dojoroot.  I admit being partial to this, and even to 
advocating CDN as the "recommended method" for learning/first applying 
Dojo.  (Side note: do we have a definitive list of things that do not 
work from CDN?)

I don't think requires a serious discussion, just a quick decision.  
People will run Dojo from whatever location they want, and that's 
great.  I just want to instantly gratify novices.  <--- uhhh, don't 
quote that last sentence out of context!

More information about the dojo-contributors mailing list