📄 part 1 life with dojo - dojo and dijit application examples the dojo toolkit.mht
字号:
From: <由 Windows Internet Explorer 7 保存>
Subject: Part 1: Life With Dojo - Dojo and Dijit Application Examples | The Dojo Toolkit
Date: Sun, 2 Dec 2007 16:24:20 +0800
MIME-Version: 1.0
Content-Type: multipart/related;
type="text/html";
boundary="----=_NextPart_000_0085_01C834FF.CB23E050"
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
This is a multi-part message in MIME format.
------=_NextPart_000_0085_01C834FF.CB23E050
Content-Type: text/html;
charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Content-Location: http://dojotoolkit.org/book/dojo-book-0-9/part-1-life-dojo-0
=EF=BB=BF<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" =
"http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML lang=3Den xml:lang=3D"en" =
xmlns=3D"http://www.w3.org/1999/xhtml"><HEAD><TITLE>Part 1: Life With =
Dojo - Dojo and Dijit Application Examples | The Dojo Toolkit</TITLE><!--=0A=
section: docs -->
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dutf-8"><LINK=20
href=3D"/book/dojo-book-0-9/introduction/why-dojo" rel=3Dprev><LINK=20
href=3D"/book/dojo-book-0-9-0" rel=3Dup><LINK href=3D"/node/600" =
rel=3Dnext><LINK=20
href=3D"/sites/all/themes/dtk/favicon.ico" type=3Dimage/x-icon =
rel=3D"shortcut icon">
<META content=3Den name=3Dlanguage>
<STYLE type=3Dtext/css media=3Dall>@import url( =
/files/css/4538c7b86f5ddf0e20fe837f59d90fef.css );
</STYLE>
<SCRIPT src=3D"http://dojotoolkit.org/dojo/config/6"=20
type=3Dtext/javascript></SCRIPT>
<SCRIPT=20
src=3D"http://dojotoolkit.org/sites/all/modules/dojo/dtk_build/dojo/dojo.=
js"=20
type=3Dtext/javascript></SCRIPT>
<SCRIPT =
type=3Dtext/javascript>dojo.addOnLoad(function(){dojo.addClass(dojo.body(=
),"tundra");});</SCRIPT>
<SCRIPT type=3Dtext/javascript>dojo.require("dojo.parser");</SCRIPT>
<SCRIPT =
type=3Dtext/javascript>document.documentElement.className=3D"js";</SCRIPT=
>
<SCRIPT src=3D"http://dojotoolkit.org/sites/all/themes/dtk/js/common.js" =
type=3Dtext/javascript></SCRIPT>
<SCRIPT type=3Dtext/javascript>
dojo.require("dijit._base.sniff");
</SCRIPT>
<META content=3D"MSHTML 6.00.6000.16544" name=3DGENERATOR></HEAD>
<BODY class=3D"" id=3Dbdy>
<DIV id=3Dpage-block><!-- region_user_header.php -->
<DIV id=3Dlogin-block><SPAN id=3Duser-header> </SPAN> <SPAN =
id=3Dlogin-prompt><A=20
href=3D"http://dojotoolkit.org/user">Login</A></SPAN> <SPAN =
id=3Dregister-prompt><A=20
href=3D"http://dojotoolkit.org/user/register">Register</A></SPAN> =
</DIV><!-- /region_user_header.php -->
<DIV id=3Dbody-block><!-- region_header.php -->
<DIV id=3Dlogo-block>
<DIV id=3Ddojo-logo><A title=3DHome =
href=3D"http://dojotoolkit.org/"><IMG=20
id=3Ddojo-logo-img alt=3D"The Dojo Toolkit"=20
src=3D"http://dojotoolkit.org/sites/all/themes/dtk/img/banner-logo-text.g=
if"></A>=20
</DIV>
<DIV id=3Dsearch-block>
<FORM id=3Dsearch-theme-form action=3D/search/node method=3Dpost>
<DIV>
<H6 class=3Dhidden><LABEL =
for=3Dsearch_theme_form_keys>Search</LABEL></H6>
<DIV class=3Dcontainer-inline id=3Dsearch>
<DIV class=3Dform-item><INPUT class=3Dform-text =
id=3Dedit-search-theme-form-keys=20
title=3D"Enter the terms you wish to search for." maxLength=3D128 =
size=3D25=20
name=3Dsearch_theme_form_keys><BUTTON class=3Dform-submit =
id=3Dedit-submit-1 name=3Dop=20
type=3Dsubmit><SPAN class=3Dhidden>Search</SPAN></BUTTON> <INPUT=20
id=3Dedit-search-theme-form type=3Dhidden value=3Dsearch_theme_form =
name=3Dform_id>=20
<INPUT id=3Da-unique-id type=3Dhidden =
value=3D3edd3b3e8d53e72372c703564104486c=20
name=3Dform_token> </DIV></DIV></DIV></FORM></DIV></DIV><!-- =
/region_header.php -->
<DIV id=3Dglobal-menu-block>
<UL id=3Dglobal-menu>
<LI id=3Dnav-about><A class=3Dplink =
href=3D"http://dojotoolkit.org/about">About</A>=20
<LI id=3Dnav-demos><A class=3Dplink =
href=3D"http://dojotoolkit.org/demos">Demos</A>=20
<LI id=3Dnav-downloads><A class=3Dplink=20
href=3D"http://dojotoolkit.org/downloads">Downloads</A>=20
<LI id=3Dnav-documentation><A class=3Dplink=20
href=3D"http://dojotoolkit.org/docs">Documentation</A>=20
<LI id=3Dnav-support><A class=3Dplink=20
href=3D"http://dojotoolkit.org/support">Support</A>=20
<LI id=3Dnav-community><A class=3Dplink=20
href=3D"http://dojotoolkit.org/community">Community</A>=20
<LI id=3Dnav-fullmenu><A onclick=3D"return false;"=20
=
href=3D"http://dojotoolkit.org/book/dojo-book-0-9/part-1-life-dojo-0#full=
menu">Full=20
Menu</A> </LI></UL></DIV><!-- region_banner.php -->
<DIV class=3Dbanner-docs id=3Dbanner-block>
<DIV id=3Dsection-heading>
<P>Documentation</P></DIV>
<DIV id=3Dsection-subheading>
<P>learn about the dojo toolkit</P></DIV></DIV><!-- /region_banner.php =
-->
<DIV id=3Dtop-breadcrumb-block>
<DIV class=3Dbreadcrumb><A href=3D"http://dojotoolkit.org/">Home</A> =
=C2=BB <A=20
href=3D"http://dojotoolkit.org/book/dojo-book-0-9-0">The Book of =
Dojo</A> =C2=BB Part=20
1: Life With Dojo - Dojo and Dijit Application Examples</DIV></DIV>
<DIV id=3Dcontent-block>
<DIV class=3Dcols-narrow-wide>
<DIV class=3D"col-a content-region-container" =
id=3Dsidebar-left-container>
<DIV class=3Dcontent-block><!-- Block: menu -->
<DIV class=3D"block block-menu" id=3Dblock-menu-572>
<H2 class=3Dtitle>The Book of Dojo</H2>
<DIV class=3Dcontent>
<UL class=3Dmenu>
<LI class=3Dexpanded id=3Dmenu-item-296><A=20
href=3D"http://dojotoolkit.org/book/dojo-book-0-9-0">The Book of =
Dojo</A>=20
<UL class=3Dmenu>
<LI class=3Dleaf id=3Dmenu-item-312><A=20
=
href=3D"http://dojotoolkit.org/book/dojo-book-0-9/part-1-life-dojo/quick-=
installation">Quick=20
Installation</A>=20
<LI class=3Dleaf id=3Dmenu-item-652><A=20
=
href=3D"http://dojotoolkit.org/book/dojo-book-0-9/hello-world-tutorial">H=
ello=20
World</A>=20
<LI class=3Dleaf id=3Dmenu-item-651><A=20
=
href=3D"http://dojotoolkit.org/book/book-dojo/part-4-meta-dojo-making-you=
r-dojo-code-run-faster-and-better/debugging-facilities/deb">Debugging=20
Tutorial</A>=20
<LI class=3Dcollapsed id=3Dmenu-item-297><A=20
=
href=3D"http://dojotoolkit.org/book/dojo-book-0-9/introduction">Introduct=
ion</A>=20
<LI class=3Dexpanded id=3Dmenu-item-324><A class=3Dactive=20
=
href=3D"http://dojotoolkit.org/book/dojo-book-0-9/part-1-life-dojo-0">Par=
t 1:=20
Life With Dojo</A>=20
<UL class=3Dmenu>
<LI class=3Dcollapsed id=3Dmenu-item-325><A=20
href=3D"http://dojotoolkit.org/node/600">Example 1: Why Doesn't =
Anyone Fill=20
Out Their Tax Forms?</A>=20
<LI class=3Dcollapsed id=3Dmenu-item-542><A=20
href=3D"http://dojotoolkit.org/node/3151">Example 2: The Postman =
Always=20
Clicks Twice</A>=20
<LI class=3Dcollapsed id=3Dmenu-item-643><A=20
=
href=3D"http://dojotoolkit.org/book/book-dojo/part-1-life-dojo-dojo-and-d=
ijit-application-examples/example-4-chatting-tech-support">Example=20
3: Chatting with Tech Support</A> </LI></UL>
<LI class=3Dcollapsed id=3Dmenu-item-298><A=20
=
href=3D"http://dojotoolkit.org/book/dojo-book-0-9/part-2-dijit-0">Part =
2:=20
Dijit</A>=20
<LI class=3Dcollapsed id=3Dmenu-item-299><A=20
=
href=3D"http://dojotoolkit.org/book/dojo-book-0-9/part-3-programmatic-dij=
it-and-dojo-0">Part=20
3: JavaScript With Dojo and Dijit</A>=20
<LI class=3Dcollapsed id=3Dmenu-item-300><A=20
=
href=3D"http://dojotoolkit.org/book/dojo-book-0-9/part-4-meta-dojo-0">Par=
t 4:=20
Testing, Tuning and Debugging</A>=20
<LI class=3Dcollapsed id=3Dmenu-item-301><A=20
=
href=3D"http://dojotoolkit.org/book/dojo-book-0-9/part-5-dojox-extensions=
-dojo-0">Part=20
5: DojoX</A> </LI></UL>
<LI class=3Dcollapsed id=3Dmenu-item-54><A title=3D"The Dojo Book, =
0.4"=20
href=3D"http://dojotoolkit.org/book/dojo-book-0-4">The Dojo Book, =
0.4</A>=20
</LI></UL></DIV></DIV></DIV></DIV>
<DIV class=3D"col-b content-region-container">
<DIV id=3Dmain-container><!-- main_content region -->
<H2>Part 1: Life With Dojo - Dojo and Dijit Application =
Examples</H2><!--Node: -->
<DIV class=3Dnode>
<DIV class=3Dsubmitted>Submitted by leesakcp on Wed, 04/18/2007 - =
22:41.</DIV>
<DIV class=3Dcontent>
<P>
<P>Dojo applications look good, but their primary benefit is in helping =
real=20
people solve real interaction problems in real web application. Dojo =
makes it=20
easy to design a more usable web experience for the intended =
audience.</P>
<P>The following personas illustrate how people with different goals and =
skill=20
sets can make Dojo work for them. We will follow them working through an =
example. The personas and examples are made-up, but broadly represent =
who the=20
toolkit is built for and each section of the book is designed to help =
solve=20
problems for each of them, sometimes more for one than the others, but =
always=20
for their users:</P>
<P><B>John Walsh</B> is a Web Developer. He=E2=80=99s been out of =
college for 3 years=20
and he works for a small company that creates web sites for clients. He =
lives=20
and breathes HTML and CSS. He has some basic JavaScript experience, for =
example=20
with click handlers. He knows a lot about Photoshop, but if you =
ask him=20
most days, he doesn=E2=80=99t really consider himself to be a Designer. =
Several of his=20
older co-workers would call themselves Designers and only incidentally =
Web=20
Developers. John and his co-workers care greatly about how an interface =
looks,=20
they are completely sold on CSS, and they want their tools to work the =
way they=20
think they should. </P>
<P><B>Andy Tso</B> has been doing the "startup thing" for nearly a =
decade. He's=20
seen it all and is a very discerning consumer of technology. He couldn't =
get=20
enough of his CS and math courses when he was at Stanford. After =
graduation Andy=20
didn't really know where he wanted to go, so he started on an advanced =
CS degree=20
at MIT but dropped when some of his other friends left to found an =
e-commerce=20
thing in '98. It imploded quickly but by that time he'd caught the =
startup bug.=20
His current startup is pushing the edges of what you can (or should) do =
in a=20
browser and when they started investigating Dojo, they saw it wasn't =
everything=20
they needed, but certainly a good starting point. Andy is the kind of =
guy who=20
could have written Dojo but is wise enough not to. He might contribute =
patches,=20
though. Andy's main problem is getting through the gunk to the hard tech =
docs=20
and giving his junior Developers something to work from.</P>
<P><B>Laura Allen</B> is an Enterprise IT Developer. She has worked for =
the same=20
(medium sized) company over the past 15 years as it has been bought out =
twice=20
and renamed three times. She supports internal development sites and =
relies on=20
tools and frameworks all day long. For her, Web2.0 is tremendously =
exciting. She=20
didn't know you could do much of anything in a browser, but things that =
aren't=20
Java/PHP scare her a bit. She=E2=80=99s heard that Microsoft mentioned a =
toolkit too but=20
her manager saw a Dojo demo at a conference and now he=E2=80=99s pushing =
his teams to=20
investigate Dojo.</P>
<DIV class=3Dbook-navigation>
<UL class=3Dmenu>
<LI class=3Dcollapsed><A =
href=3D"http://dojotoolkit.org/node/600">Example 1: Why=20
Doesn't Anyone Fill Out Their Tax Forms?</A>
<LI class=3Dcollapsed><A =
href=3D"http://dojotoolkit.org/node/3151">Example 2: The=20
Postman Always Clicks Twice</A>
<LI class=3Dcollapsed><A=20
=
href=3D"http://dojotoolkit.org/book/book-dojo/part-1-life-dojo-dojo-and-d=
ijit-application-examples/example-4-chatting-tech-support">Example=20
3: Chatting With Tech Support</A></LI></UL>
<DIV class=3D"page-links clear-block"><A class=3Dpage-previous=20
title=3D"Go to previous page"=20
href=3D"http://dojotoolkit.org/book/dojo-book-0-9/introduction/why-dojo">=
=E2=80=B9 Why=20
Dojo?</A><A class=3Dpage-up title=3D"Go to parent page"=20
href=3D"http://dojotoolkit.org/book/dojo-book-0-9-0">up</A><A =
class=3Dpage-next=20
title=3D"Go to next page" =
href=3D"http://dojotoolkit.org/node/600">Example 1: Why=20
Doesn't Anyone Fill Out Their Tax Forms? =E2=80=BA</A></DIV></DIV></DIV>
<DIV class=3Dlinks>
<UL class=3D"links inline">
<LI class=3D"first book_printer"><A class=3Dbook_printer=20
title=3D"Show a printer-friendly version of this book page and its =
sub-pages."=20
href=3D"http://dojotoolkit.org/book/export/html/823">Printer-friendly=20
version</A>=20
<LI class=3Dcomment_forbidden><SPAN class=3Dcomment_forbidden><A=20
=
href=3D"http://dojotoolkit.org/user/login?destination=3Dnode/823%2523comm=
ent-form">Login</A>=20
or <A=20
=
href=3D"http://dojotoolkit.org/user/register?destination=3Dnode/823%2523c=
omment-form">register</A>=20
to post comments</SPAN>=20
<LI class=3D"last subscriptions_add_node"><A =
class=3Dsubscriptions_add_node=20
title=3D"Receive an e-mail whenever a comment is posted to this Book =
page."=20
href=3D"http://dojotoolkit.org/subscriptions/add/node/823">Subscribe =
post</A>=20
</LI></UL></DIV></DIV>
<DIV id=3Dcomments><A id=3Dcomment-5747></A>
<DIV class=3Dcomment>
<H3 class=3Dtitle><A class=3Dactive=20
href=3D"http://dojotoolkit.org/book/dojo-book-0-9/part-1-life-dojo-0#comm=
ent-5747">Debugging=20
Dojo</A></H3>
<DIV class=3Dsubmitted>Submitted by nileshbansal on Fri, 09/07/2007 - =
16:19.</DIV>
<DIV class=3Dcontent>
<P>Shouldn't this chapter contain a subsection on "debugging dojo". For =
example,=20
dojo 0.3 had dojo.debug(""), methods. For 0.9, I think you need to use =
Firebug,=20
but I am not sure.</P></DIV>
<DIV class=3Dlinks>
<UL class=3Dlinks>
<LI class=3D"first last comment_forbidden"><SPAN =
class=3Dcomment_forbidden><A=20
=
href=3D"http://dojotoolkit.org/user/login?destination=3Dnode/823%2523comm=
ent-form">Login</A>=20
or <A=20
=
href=3D"http://dojotoolkit.org/user/register?destination=3Dnode/823%2523c=
omment-form">register</A>=20
to post comments</SPAN> </LI></UL></DIV></DIV>
<DIV class=3Dindented><A id=3Dcomment-5868></A>
<DIV class=3Dcomment>
<H3 class=3Dtitle><A class=3Dactive=20
href=3D"http://dojotoolkit.org/book/dojo-book-0-9/part-1-life-dojo-0#comm=
ent-5868">Debugging=20
</A></H3>
<DIV class=3Dsubmitted>Submitted by criecke on Mon, 09/10/2007 - =
23:59.</DIV>
<DIV class=3Dcontent>
<P>... is covered in Part 4: Meta-Dojo. But we'll consider putting a =
subsection=20
in one of the upcoming examples. It is a handy thing to know =
early.</P></DIV>
<DIV class=3Dlinks>
<UL class=3Dlinks>
<LI class=3D"first last comment_forbidden"><SPAN =
class=3Dcomment_forbidden><A=20
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -