<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Kiss Note &#187; Dojo</title>
	<atom:link href="http://kissnote.com/topics/dojo/feed/" rel="self" type="application/rss+xml" />
	<link>http://kissnote.com</link>
	<description>Keep IT Simple and Stupid</description>
	<lastBuildDate>Mon, 17 May 2010 17:19:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>最简单的dojo学习笔记 &#8211; Part 2(create a widget)</title>
		<link>http://kissnote.com/2009/05/19/%e6%9c%80%e7%ae%80%e5%8d%95%e7%9a%84dojo%e5%ad%a6%e4%b9%a0%e7%ac%94%e8%ae%b0-part-2create-a-widget/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed</link>
		<comments>http://kissnote.com/2009/05/19/%e6%9c%80%e7%ae%80%e5%8d%95%e7%9a%84dojo%e5%ad%a6%e4%b9%a0%e7%ac%94%e8%ae%b0-part-2create-a-widget/#comments</comments>
		<pubDate>Tue, 19 May 2009 15:41:46 +0000</pubDate>
		<dc:creator>shengjie</dc:creator>
				<category><![CDATA[Dojo]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://kissnote.com/?p=116</guid>
		<description><![CDATA[&#60;Create Your Own Widget Class/&#62; Creating a Widget Programmatically var button1 = new dijit.form.Button(params, srcNodeRef); eg. new dijit.form.Button({ &#8220;class&#8221;: &#8220;large&#8221;, style: &#8220;color: red&#8221; }, dojo.byId(&#8220;someDiv&#8221;)); &#60;div id=&#8221;someDiv&#8221; class=&#8221;large&#8221; style=&#8221;color:red&#8221;&#62;&#60;/div&#62; Creating a Widget declaratively eg. &#60;div dojoType=&#8221;dijit.TitlePane&#8221; title=&#8221;Outer Pane&#8221;&#62;&#60;/div&#62; IMPORTANT: startup() Certain widgets require a startup() method to be called. Haha, java is here again just [...]]]></description>
			<content:encoded><![CDATA[<p><strong>&lt;Create Your Own Widget Class/&gt;</strong><br />
Creating a Widget Programmatically<br />
var button1 = new dijit.form.Button(params, srcNodeRef);<br />
eg.<br />
new dijit.form.Button({ &#8220;class&#8221;: &#8220;large&#8221;, style: &#8220;color: red&#8221; }, dojo.byId(&#8220;someDiv&#8221;));<br />
&lt;div id=&#8221;someDiv&#8221; class=&#8221;large&#8221; style=&#8221;color:red&#8221;&gt;&lt;/div&gt;</p>
<p>Creating a Widget declaratively<br />
eg.<br />
&lt;div dojoType=&#8221;dijit.TitlePane&#8221; title=&#8221;Outer Pane&#8221;&gt;&lt;/div&gt;</p>
<p>IMPORTANT:<br />
startup()<br />
Certain widgets require a startup() method to be called. Haha, java is here again <img src='http://kissnote.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  just like GUI, rite?</p>
<p>accordion = new dijit.layout.AccordionContainer({}, dojo.byId(&#8220;accordionShell&#8221;));<br />
accordion.addChild(new dijit.layout.ContentPane());<br />
accordion.addChild(new dijit.layout.ContentPane());<br />
accordion.addChild(new dijit.layout.ContentPane());<br />
accordion.startup(); //after all the elements added, start up</p>
<p>Interacting with Widgets<br />
Obtaining a Widget Reference<br />
dijit.byId(&#8220;idOfWidget&#8221;)</p>
<p><strong>&lt;Write Your Own Widget Class/&gt;</strong><br />
IMPORTANT: I know it&#8217;s cool hack the source code is cool, but that should be last thing you want to do if there is no suitable widget.</p>
<p>WHY the dojo div i put in is so different from what ends up in &#8220;view page source&#8221;?<br />
Dojo replaces the simple nodes of our example with groups of HTML elements. That&#8217;s one of the jobs of the Dojo parser.</p>
<p>eg.</p>
<p>&lt;div dojoType=&#8221;dijit.layout.AccordionPane&#8221; title=&#8221;pane 1&#8243;&gt;<br />
Text of Pane 1<br />
&lt;/div&gt;</p>
<p>dijit/layout/templates/AccordionPane.html:<br />
&lt;div class=&#8217;dijitAccordionPane&#8217;<br />
&gt;&lt;div dojoAttachPoint=&#8217;titleNode,focusNode&#8217; dojoAttachEvent=&#8217;ondijitclick:_onTitleClick,onkeypress:_onKeyPress&#8217;<br />
class=&#8217;dijitAccordionTitle&#8217; wairole=&#8221;tab&#8221;<br />
&gt;&lt;div class=&#8217;dijitAccordionArrow&#8217;&gt;&lt;/div<br />
&gt;&lt;div class=&#8217;arrowTextUp&#8217; waiRole=&#8221;presentation&#8221;&gt;?&lt;/div<br />
&gt;&lt;div class=&#8217;arrowTextDown&#8217; waiRole=&#8221;presentation&#8221;&gt;?&lt;/div<br />
&gt;&lt;span dojoAttachPoint=&#8217;titleTextNode&#8217;&gt;${title}&lt;/span&gt;&lt;/div<br />
&gt;&lt;div&gt;&lt;div dojoAttachPoint=&#8217;containerNode&#8217; style=&#8217;overflow: hidden; height: 1px; display: none&#8217;<br />
dojoAttachEvent=&#8217;onkeypress:_onKeyPress&#8217;<br />
class=&#8217;dijitAccordionBody&#8217; waiRole=&#8221;tabpanel&#8221;<br />
&gt;&lt;/div&gt;&lt;/div&gt;<br />
&lt;/div&gt;</p>
<p>${title}<br />
is replaced with the title=&#8221;&#8230;&#8221; attribute sent to the widget<br />
dojoAttachPoint=&#8217;containerNode&#8217;<br />
An attachPoint is a tag merged with user-provided HTML. It&#8217;s like a substitution variable for HTML.<br />
what is attachPoint</p>
<p>//hm?? what the ** ??</p>
<p>eg.<br />
sepecify dojoAttachPoint=&#8217;titleNode,focusNode&#8217; so that you can use the reference in the widget (this.titleNode).</p>
<p>dojoAttachEvent=&#8217;onkeypress:_onKeyPress&#8217;<br />
Connects an event to an event handler at that node.</p>
<p>Dijit.Declaration</p>
<p>declaratively create a widget<br />
eg1.<br />
&lt;div dojoType=&#8221;dijit.Declaration&#8221;<br />
widgetClass=&#8221;dojoc.widget.ImageAccordion&#8221;<br />
mixins=&#8221;dijit.layout.AccordionPane&#8221;<br />
&gt;&lt;div class=&#8217;dijitAccordionPane&#8217;<br />
&gt;&lt;div dojoAttachPoint=&#8217;titleNode,focusNode&#8217;<br />
dojoAttachEvent=&#8217;ondijitclick:_onTitleClick,onkeypress:_onKeyPress&#8217;<br />
class=&#8217;dojocAccordionTitle&#8217; wairole=&#8221;tab&#8221;<br />
&gt;&lt;div class=&#8217;dijitAccordionArrow&#8217;&gt;&lt;/div<br />
&gt;&lt;div class=&#8217;arrowTextUp&#8217; waiRole=&#8221;presentation&#8221;&gt;?&lt;/div<br />
&gt;&lt;div class=&#8217;arrowTextDown&#8217; waiRole=&#8221;presentation&#8221;&gt;?&lt;/div<br />
&gt;&lt;span dojoAttachPoint=&#8217;titleTextNode&#8217;&gt;&lt;img alt=&#8221;${title}&#8221; src=&#8221;${src}&#8221;<br />
&gt;&lt;/span&gt;&lt;/div<br />
&gt;&lt;div&gt;&lt;div dojoAttachPoint=&#8217;containerNode&#8217;<br />
style=&#8217;overflow: hidden; height: 1px; display: none&#8217;<br />
dojoAttachEvent=&#8217;onkeypress:_onKeyPress&#8217;<br />
class=&#8217;dojocImageAccordionBody&#8217; waiRole=&#8221;tabpanel&#8221;<br />
&gt;&lt;/div&gt;&lt;/div&gt;<br />
&lt;/div&gt;<br />
&lt;/div&gt;<br />
eg2.<br />
&lt;div dojoType=&#8221;dijit.Declaration&#8221; widgetClass=&#8221;simpleConnectedWidget&#8221; &gt;<br />
Just a plain ol&#8217; piece of text<br />
&lt;script type=&#8221;dojo/connect&#8221; event=&#8221;dblclick&#8221;&gt;<br />
console.debug(&#8220;Ouch!  I&#8217;ve been double-clicked&#8221;);<br />
&lt;/script&gt;<br />
&lt;/div&gt;</p>
<p>Notes</p>
<p>* widgetsInTemplate is automatically set to true, so any widgets you place in the template will be automatically filled in.<br />
* If you do not specify mixin, the widget class will be a subclass of dijit._Widget and mix in dijit._Templated. If you specify mixin, the first class listed must be a subclass of dijit._Widget. At least one of the mixins should itself mixin dijit._Templated, or you should supply dijit._Templated yourself as a mixin.<br />
* Only one extension point implementation of preamble.</p>
<p>programatically create a widget(More flexible &#8211; dijit.declare )<br />
one class -&gt; multiple templates</p>
<p>eg.<br />
dojoc/layout/ImageAccordion.js<br />
// all packages need to dojo.provide() _something_, and only one thing<br />
dojo.provide(&#8220;dojoc.widget.ImageAccordion&#8221;);<br />
// AccordionContainer is the module with dijit.layout.AccordionPane<br />
dojo.require(&#8220;dijit.layout.AccordionContainer&#8221;);<br />
// our declared class<br />
dojo.declare(&#8220;dojoc.widget.ImageAccordion&#8221;,<br />
// we inherit from this class, which in turn mixes<br />
// in _Templated and _Layout<br />
[ dijit.layout.AccordionPane ],<br />
// class properties:<br />
{<br />
templatePath: dojo.moduleUrl(&#8220;dojoc&#8221;,&#8221;layout/templates/ImageAccordion.html&#8221;),<br />
// Necessary to keep Dijit from using templateString in AccordionPane<br />
templateString: &#8220;&#8221;,<br />
// src: String<br />
//      src url for AccordionPaneExtension header<br />
src: &#8220;&#8221;<br />
});</p>
<p>dojoc/widgets/template/ImageAccordion.html:<br />
&lt;div class=&#8217;dojocImageAccordion&#8217;<br />
&gt;&lt;div dojoAttachPoint=&#8217;titleNode,focusNode&#8217;<br />
dojoAttachEvent=&#8217;ondijitclick:_onTitleClick,onkeypress:_onTitleKeyPress,onfocus:_handleFocus,onblur:_handleFocus&#8217;<br />
class=&#8217;dojocImageAccordionTitle&#8217; wairole=&#8221;tab&#8221;<br />
&gt;&lt;img alt=&#8221;${title}&#8221; src=&#8221;${src}&#8221;<br />
&gt;&lt;/div<br />
&gt;&lt;div&gt;&lt;div dojoAttachPoint=&#8217;containerNode&#8217;<br />
style=&#8217;overflow: hidden; height: 1px; display: none&#8217;<br />
class=&#8217;dojocImageAccordionBody&#8217; waiRole=&#8221;tabpanel&#8221;<br />
&gt;&lt;/div&gt;&lt;/div&gt;<br />
&lt;/div&gt;</p>
<p><strong>&lt;The Widget Life-cycle/&gt;</strong></p>
<p>onstructor<br />
Your constructor method will be called before the parameters are mixed into the widget, and can be used to initialize arrays, etc.<br />
parameters are mixed into the widget instance<br />
This is when attributes in the markup (ex: &lt;button iconClass=&#8230;&gt;) are mixed in<br />
postMixInProperties<br />
If you provide a postMixInProperties method for your widget, it will be invoked before rendering occurs, and before any dom nodes are created. If you need to add or change the instance&#8217;s properties before the widget is rendered &#8211; this is the place to do it.<br />
buildRendering<br />
_Templated provides an implementation of buildRendering that most times will do what you need. The template is fetched/read, nodes created and events hooked up during buildRendering. If you dont mixin _Templated (and most OOTB dijits do) and want to handle rendering yourself (e.g. to really streamline a simple widget, or even use a different templating system) this is where you&#8217;d do it.<br />
&#8212;&#8212;&#8212;&#8212;&gt; widget rendered<br />
postCreate<br />
This is typically the workhorse of a custom widget. The widget has been rendered (but note that sub-widgets in the containerNode have not!)<br />
startup<br />
If you need to be sure parsing and creation of any child widgets is complete, use startup.<br />
destroy<br />
Implement destroy if you have special tear-down work to do (the superclasses will take care of most of it for you; be sure to call this.inherited(arguments);)</p>
]]></content:encoded>
			<wfw:commentRss>http://kissnote.com/2009/05/19/%e6%9c%80%e7%ae%80%e5%8d%95%e7%9a%84dojo%e5%ad%a6%e4%b9%a0%e7%ac%94%e8%ae%b0-part-2create-a-widget/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>最简单的dojo学习笔记 &#8211; Part 1(dojo basics)</title>
		<link>http://kissnote.com/2009/05/19/%e6%9c%80%e7%ae%80%e5%8d%95%e7%9a%84dojo%e5%ad%a6%e4%b9%a0%e7%ac%94%e8%ae%b0-part-1/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed</link>
		<comments>http://kissnote.com/2009/05/19/%e6%9c%80%e7%ae%80%e5%8d%95%e7%9a%84dojo%e5%ad%a6%e4%b9%a0%e7%ac%94%e8%ae%b0-part-1/#comments</comments>
		<pubDate>Tue, 19 May 2009 15:30:08 +0000</pubDate>
		<dc:creator>shengjie</dc:creator>
				<category><![CDATA[Dojo]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://kissnote.com/?p=106</guid>
		<description><![CDATA[&#60;dojo functions/&#62; 1.  dojo.require(&#8220;dojo.fx&#8221;); //This registers a function to be run when the document (and all required dependencies) are ready 2. dojo.addOnLoad(function(){ console.log(&#8220;document ready!&#8221;); }); similarly, var init = function(){ console.log(&#8220;document ready!&#8221;); } 3. dojo.addOnLoad(init); 4. dojo.byId -  get DomNode 5. digit.byId &#8211; get widget 6. dojo.query &#8211; returns a list of Dom nodes based [...]]]></description>
			<content:encoded><![CDATA[<p><strong>&lt;dojo functions/&gt;</strong></p>
<p>1.  dojo.require(&#8220;dojo.fx&#8221;);<br />
//This registers a function to be run when the document (and all required dependencies) are ready<br />
2. dojo.addOnLoad(function(){<br />
console.log(&#8220;document ready!&#8221;);<br />
});<br />
similarly,<br />
var init = function(){<br />
console.log(&#8220;document ready!&#8221;);<br />
}<br />
3. dojo.addOnLoad(init);</p>
<p>4. dojo.byId -  get DomNode<br />
5. digit.byId &#8211; get widget</p>
<p>6. dojo.query &#8211; returns a list of Dom nodes based on CSS selector</p>
<p>eg.  // every element in the page with the class &#8220;blueButton&#8221; assigned<br />
dojo.query(&#8220;.blueButton&#8221;).forEach(function(node, index, arr){<br />
console.debug(node.innerHTML);<br />
});</p>
<p>7.dojo.forEach<br />
eg.disable all the select tags<br />
dojo.forEach(<br />
dojo.query(&#8220;select&#8221;, document),<br />
function(selectTag) {<br />
selectTag.disabled = true;<br />
}<br />
);<br />
// &gt;= 1.0 only.<br />
dojo.query(&#8220;select&#8221;, document).forEach(&#8220;item.disabled = true;&#8221;);</p>
<p>8. dojo.connect</p>
<p>eg. connect event to js event handler<br />
function helloPressed(){<br />
alert(&#8216;You pressed the button&#8217;);<br />
}</p>
<p>function init(){<br />
button = dojo.byId(&#8216;helloButton&#8217;);<br />
dojo.connect(button, &#8216;onclick&#8217;, &#8216;helloPressed&#8217;);<br />
}</p>
<p>eg.bind mult connections when exampleObj.bar() gets called, exampleObj.foo() will be called.<br />
var exampleObj = {<br />
counter: 0,<br />
foo: function(){<br />
alert(&#8220;foo&#8221;);<br />
this.counter++;<br />
},<br />
bar: function(){<br />
alert(&#8220;bar&#8221;);<br />
this.counter++;<br />
}<br />
};</p>
<p>dojo.connect(exampleObj, &#8220;foo&#8221;, exampleObj, &#8220;bar&#8221;);</p>
<p><strong>&lt;OO -Object Orientied/&gt;</strong><br />
OO,think is as Java.</p>
<p>pass Functions as Variables<br />
eg.</p>
<p>function applyTwoParameterFn(a, b, function){<br />
return function(a,b);<br />
}<br />
console.debug(applyTwoParameterFn(1, 2, Math.max)); //not as strict as java in terms of type/variables checking.</p>
<p><strong><br />
&lt;delcare a class/&gt;</strong> &#8211; woo&#8230; pretty much like java<br />
dojo.declare(&#8220;ClassName&#8221;, null, {/*class body*/});</p>
<p>dojo.declare(&#8220;Person&#8221;, null, {<br />
constructor: function(name, age, currentResidence){<br />
this.name=name;<br />
this.age=age;<br />
this.currentResidence=currentResidence;<br />
},<br />
moveToNewState: function(newState){<br />
this.currentResidence=newState;<br />
}<br />
});<br />
eg. create person class and instantialize it</p>
<p>var matt= new Person(&#8216;Matt&#8217;, 25, &#8216;New Mexico&#8217;);</p>
<p><strong>&lt;Arrays and Objects as Member Variables/&gt;</strong><br />
eg.<br />
dojo.declare(&#8220;my.classes.bar&#8221;, my.classes.foo, {<br />
constructor: function() {<br />
this.someData = [ ]; // each object has it&#8217;s own array<br />
},<br />
someData: [1, 2, 3, 4], // doesn&#8217;t do what I want: ends up being static<br />
numItem : 5, // one per bar<br />
strItem : &#8220;string&#8221;, // one per bar<br />
statics: { counter: 0, somethingElse: &#8220;hello&#8221; } // static variables<br />
});</p>
<p>IMPORTANT:<br />
Why is this true for arrays and objects, but not primitives? It&#8217;s because, like most OOP languages, JavaScript uses object references. For example, given:</p>
<p>x = { fruit: &#8220;apple&#8221; };<br />
y = x;</p>
<p>Now x and y both refer to the same object. Modifying x.fruit will also affect y.fruit.</p>
<p><strong>&lt;inheritance/&gt;</strong> &#8211; haha, it is java<br />
dojo.declare(&#8220;Employee&#8221;, Person, {<br />
constructor: function(name, age, currentResidence, position){<br />
// remember, Person constructor is called automatically as the parent<br />
this.password=&#8221;";<br />
this.position=position;<br />
},<br />
login: function(){<br />
if(this.password){<br />
alert(&#8216;you have successfully logged in&#8217;);<br />
}else{<br />
alert(&#8216;please ask the administrator for your password&#8217;);<br />
}<br />
}<br />
});<br />
initialize the subclass<br />
var kathryn=new Employee(&#8216; Kathryn &#8216;, 26, &#8216;Minnesota&#8217;, &#8216;Designer&#8217;);</p>
<p>Calling Superclass Methods<br />
someMethod: function() {<br />
// call base class someMethod<br />
this.inherited(arguments);<br />
// now do something else<br />
}</p>
<p><strong>&lt;Mixins/&gt;</strong> &#8211; multiple inheritance, hmm&#8230; java doesn&#8217;t do this.<br />
eg. blizzard class will inherit VanillaSoftServe, MandMs, CookiDough<br />
dojo.declare(&#8220;VanillaSoftServe&#8221;,null, {<br />
constructor: function() { console.debug (&#8220;mixing in Vanilla&#8221;); }<br />
});<br />
dojo.declare(&#8220;MandMs&#8221;,null, {<br />
constructor: function() { console.debug(&#8220;mixing in MandM&#8217;s&#8221;); },<br />
kind: &#8220;plain&#8221;<br />
});<br />
dojo.declare(&#8220;CookieDough&#8221;,null, {<br />
chunkSize: &#8220;medium&#8221;<br />
});<br />
dojo.declare(&#8220;Blizzard&#8221;, [VanillaSoftServe, MandMs, CookieDough], {<br />
constructor: function() {<br />
console.debug(&#8220;A blizzard with &#8220;+<br />
this.kind+&#8221; M and Ms and &#8220;+<br />
this.chunkSize+&#8221; chunks of cookie dough.&#8221;<br />
);<br />
}<br />
});</p>
<p>PS. VanillaSoftServe is the only superclass of Blizzard, others two just mixed in. Does not make sense to me, thinking it as three superclasses makes more sense<br />
<strong><br />
&lt;Understanding The Parser/&gt;</strong><br />
Not sure why dojo doc always tries to complicate this part. Parser is just create widget object for your source node.</p>
<p>pretty straight forward:<br />
* locating the nodes with dojoType attributes in the page<br />
* taking the attributes assigned to them and passing them into the constructor as properties on the configuration object<br />
* passing the source node for the widget as the second parameter to the constructor<br />
constructor: function(args, node){}</p>
<p><strong>&lt;modules/&gt;</strong><br />
modularization &#8211; namespace, collection of your widgets<br />
function sum() {<br />
var sum1; object level var<br />
sum2; globel var<br />
}</p>
<p>Module Helpers<br />
eg.<br />
var imgNode = document.createElement(&#8220;img&#8221;);<br />
imgNode.src = dojo.moduleUrl(&#8220;explosive.space&#8221;,&#8221;images/kaboom.gif&#8221;);</p>
<p>once the module is binded with the gif. It doesn&#8217;t matter where the code snippet is located relative to kaboom.gif.Yeah!!!</p>
<p>Use requireIf to save runtime.<br />
dojo.requireIf(dojo.isIE, &#8220;explosive.space.BlueScreenOfDeathCatcher&#8221;);</p>
]]></content:encoded>
			<wfw:commentRss>http://kissnote.com/2009/05/19/%e6%9c%80%e7%ae%80%e5%8d%95%e7%9a%84dojo%e5%ad%a6%e4%b9%a0%e7%ac%94%e8%ae%b0-part-1/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>dojo快速安装</title>
		<link>http://kissnote.com/2009/05/16/dojo%e5%bf%ab%e9%80%9f%e5%ae%89%e8%a3%85/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed</link>
		<comments>http://kissnote.com/2009/05/16/dojo%e5%bf%ab%e9%80%9f%e5%ae%89%e8%a3%85/#comments</comments>
		<pubDate>Sat, 16 May 2009 22:30:44 +0000</pubDate>
		<dc:creator>shengjie</dc:creator>
				<category><![CDATA[Dojo]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://blogs.kissnote.com/?p=46</guid>
		<description><![CDATA[One Sentence定义: Dojo是Javascript的一个框架（开源工具包）。 快速安装: 三种方法： 1. 无安装，直接使用AOL’S 的DOJO(Content Distribution Network)或者google api. 2. 本地安装最新的编译后的dojo. 3. 本地维护dojo源码，编译。 总的来说，使用dojo，都需要编译和装载dojo.xd.js. 1. 使用 CDN/Google提供的dojo.  – &#60;推荐&#62;:  想初次体验dojo的初学者 &#60;script type=&#8221;text/javascript&#8221; src=&#8221;http://o.aolcdn.com/dojo/1.0.0/dojo/dojo.xd.js&#8221;&#62;&#60;/script&#62; &#60;script type=&#8221;text/javascript&#8221; SRC=&#8221;http://ajax.googleapis.com/ajax/libs/dojo/1.3/dojo/dojo.xd.js&#8221;&#62;&#60;/script&#62; 2. 本地使用编译过的dojo – &#60;推荐&#62;大多数开发人员 传统方法： 下载编译好的dojo，放在本地服务器使用。 2.1 http://dojotoolkit.org/downloads下载编译最新版本的dojo 2.2 解压到你自己的项目文件夹下，简单起见，把解压后dojo-版本号文件夹改为dojo。Eg.我把解压后的dojo文件夹放在我项目根目录下（apache server）。浏览器中访问http://localhost/dojo/dijit/themes/themeTester.html， 如果能够看到dojo 测试页面，说明安装成功。 3. 编译源代码，DIY版本dojo – &#60;推荐&#62;高级Javascript开发人员 需要更改，维护源程序，使用自定义级别的dojo. IBM, Google很多大公司自己维护自己的dojo版本以及release. 通过repository (http://svn.dojotoolkit.org/src/)下载源程序,自己维护编译。]]></description>
			<content:encoded><![CDATA[<p>One Sentence定义: Dojo是Javascript的一个框架（开源工具包）。</p>
<p>快速安装:</p>
<p>三种方法：</p>
<p>1. 无安装，直接使用AOL’S 的DOJO(Content Distribution Network)或者google api.<br />
2. 本地安装最新的编译后的dojo.<br />
3. 本地维护dojo源码，编译。</p>
<p>总的来说，使用dojo，都需要编译和装载dojo.xd.js.</p>
<p>1. 使用 CDN/Google提供的dojo.  – &lt;推荐&gt;:  想初次体验dojo的初学者</p>
<p>&lt;script type=&#8221;text/javascript&#8221; src=&#8221;http://o.aolcdn.com/dojo/1.0.0/dojo/dojo.xd.js&#8221;&gt;&lt;/script&gt;</p>
<p>&lt;script type=&#8221;text/javascript&#8221; SRC=&#8221;http://ajax.googleapis.com/ajax/libs/dojo/1.3/dojo/dojo.xd.js&#8221;&gt;&lt;/script&gt;</p>
<p>2. 本地使用编译过的dojo – &lt;推荐&gt;大多数开发人员</p>
<p>传统方法： 下载编译好的dojo，放在本地服务器使用。</p>
<p>2.1 http://dojotoolkit.org/downloads下载编译最新版本的dojo</p>
<p>2.2 解压到你自己的项目文件夹下，简单起见，把解压后dojo-版本号文件夹改为dojo。Eg.我把解压后的dojo文件夹放在我项目根目录下（apache server）。浏览器中访问http://localhost/dojo/dijit/themes/themeTester.html， 如果能够看到dojo 测试页面，说明安装成功。</p>
<p>3. 编译源代码，DIY版本dojo – &lt;推荐&gt;高级Javascript开发人员</p>
<p>需要更改，维护源程序，使用自定义级别的dojo. IBM, Google很多大公司自己维护自己的dojo版本以及release.</p>
<p>通过repository (http://svn.dojotoolkit.org/src/)下载源程序,自己维护编译。</p>
]]></content:encoded>
			<wfw:commentRss>http://kissnote.com/2009/05/16/dojo%e5%bf%ab%e9%80%9f%e5%ae%89%e8%a3%85/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
