Login Register

Book of Dojo: Bigger, Better, Faster, MORE!

Navigating Dojo requires a good map, and we work hard to continually improve ours. Just dig our latest enhancements...

  • Bigger! - Sections on popular 1.0 features like Grid, DTL, and QueryFileReadStore, expanded real-world examples.
  • Better! - Expanded coverage on dijit.Tree and dojo.18n, working demos on each and every Dijit widget page.
  • Faster! - New Hello World and Debugging Tutorials that get you up and running in minutes.
  • MORE! - Insightful comments from the community have now been folded into the text. There's more clarification, more code snippets, more pictures ... more, more, more!

A special thanks go to Adam Peller, Shelita Overton, Pete Higgins and Sam Foster, and all the other editors, writers and contributors for their contributions in this latest cycle. Writing is tough work, but many hands make it lighter.

As for your comments on book details, please keep them coming. The more you contribute, the more time you save your peers. It pays forward!

Your homework: Dojo is huge. The Book is now huge too, and we'd like to make it faster and easier to get from a question to "enlightenment." How do we do that? A different structure? A different navigation system? Split the book into How-to and Reference sections? Provide more hyperlinks and cross-references? Bottle the Book of Dojo in an IV bottle so you don't even have to read it? Let's not get carried away ... but what are your thoughts?

Dojo 1.0 Book

I would prefer an API Reference by section (dojo, dijit, dojox).

With and extermination of each function, all parameters, what is returned.

Then a short code example(s) of how it can be used.

The api from 0.4.3 is great!

The api from 0.4.3 is great! you can instantly access any code or any function you want, you shoudl use something pretty similar to this new book. Of course the examples will be perfect too and of course should be separated by sections (dijit, dojo, dojox)

Thanks

Greetings,

Pancu

Dojo Book

The dojo book is great! But the quick installation section is missing the CDN install info(the provided link merely points back to the page you are already looking at). I'm not a newbie I'm a few weeks in but I always come here when starting a new project(and for reference). Would be great help not having to dig through the old news for it.

Rest of it's great, keep those grid examples coming! :)

Dojo Book

Examples for all in Dojo:

-Programatically or no;
-Examples on-line linked too (as Yui);
-Documentation in english with language more simple as possible (even if the words are repetitive), to facilitate the reading of users with less experience in english and facilitate future translations.

Thanks,

Rodrigo

API+Examples+Dojo Book

IMHO, I would like to see a more extensive API reference, with more examples and cross references to the Dojo book. The Dojo book should be more like a "first steps" with Dojo, as it is today, but it can always be interesting with more examples in it too.

Since you asked for my thoughts.....

While the documentation is improving, it's far from perfect. I'm relatively new to Dojo and have not fully committed to it because so much is left to trial and error. I've found that there are almost no programmatic examples or documentation and what does exist are only partial examples - nothing that can be quickly cut and pasted in order to play. Declarative examples are more plentiful, but some don't run under IE 6 or 7 (i.e. the Mail Demo on the demo page). Since almost no commercial documentation is available at this time, this site is pretty much the only source of information. Full API and bullet proof examples that work in all browser are needed.

Most adopters need the API AND examples in BOTH forms: Declarative and Programmatic. It's always nice to start with a working script and the adapt it to your application. Anything that can be done using the declarative approach, should be repeatable using the programmatic approach - so show both.

It would also be useful to see screen shots taken in all of the major browsers in order to see what is expected. This process would also assure that the code actually works in all browsers. I'm still seeing many things that don't work in IE. Since I can't control my users browser selection, I need know how a feature is going to work across all platforms.

Fully annotated/commented examples please. Year's ago I had an instructor who thought every line of code should have at least a comment and major sections should have a paragraph explaining what's suppose to be happening and why. Too many programmers shortcut this process in the production environment, but it's an essential step for documentation that is intended for a wide audience. Don't assume a certain level of knowledge. Everyone starts out with no knowledge and builds from there. The examples should be documented with sufficient detail that a beginner can understand the thought process without having to call for help.

Finally, I could envision a "Learning to Program with Dojo" document for the absolute beginner. This document could teach "best practices" and cover some of the more common techniques needed in order to build a simple website application using Dojo. This document could be a step by step tutorial for those just learning to program. It doesn't have to be a huge example. After all, in programming there are really only a few techniques that are repeated over and over again. Most books of this sort teach how to build a page with a menu and perhaps dynamically update a page from some data source. Perhaps a simple form with a Add/Modify/Delete example updating a database table would be useful. This idea of this document is help the student exercise most of the Diji controls for the first time.

Those are my thoughts. Thanks for asking.

I agree wholeheartedly.

I am working on just such a document, and will be making a tutorial out of a script I wrote to parse the huge page partitioned by various h1 h2 h3 tags and turn it into a dynamic navigation / stackcontainer using dijit. I am also slowing adding programatic examples to the test cases in dijit, with inline comments like you suggest. (i personally learn best that way) though so many people have a preference as to how this kind of information is presented. The API is coming along, and as soon as some of the remaining kinks are worked out of the associated drupal module (the parser works more or less great), it will be live, full of examples to copy/paste, and allow user comments, much like the coveted php API pages.

the mail demo breakage is fixed

it was a 1.0.1 regression and will be fixed in the 1.0.2 release

I fully agree

Can't say it better. The documentation and API are as frustrating as trying to get antarctica ice free.

Dojo Book

I'm new to Dojo and have since shared the site with some of my other developer colleagues looking to spice up their next web project. I'd sure like to see some of the following in the new Dojo book:

a) Reference API:
- by full object name (with namespace): defined sections for properties, events, methods, styles
- fully working example code listing for the api being addressed: with popup to execute and demonstrate (wouldn't that be something?)

b) How-to articles: would be nice if this is initially provided by Dojo team and then with some protocol in place for contributors to keep it growing.

c) Please, more documentation on rolling your own dojo widget (from scratch and by composition with existing widgets): I'm now trying to do a three state checkbox and it's been though going. I'm surprised that there's not already an existing one out there--well at least it is not published.

The book is a book....

It will contain book stuff, API will be available in the API tool. If the Book were to swallow the API... it would bloat and be impossible to navigate.

as for C) even browsers don't support 3 state radio/checkboxes.... which is why the Dojo ones dont as far as I know.

-Karl

The Book and IE7

Great Job! I love the book and direction it is taking.

My only complaint is that the pages with real examples do not work in IE7 (Vista or XP).
Get: Internet Explorer Cannot open the internet site Operation Aborted.

Is everyone with IE7 having the same results?

IE cannot open documentation

We use IE6 at work. I get the "Internet Explorer Cannot open the internet site Operation Aborted" also.

So I tried it at home where I have IE7 and I get the same error. I installed Firefox at home and I can open the documentation without error. Unfortunately I have to deal with corporate IST department which will not allow the installation or Firefox or IE7 for that matter.

The operating system at work and at home are both Windows XP.

Same problem

I am seeing the same problem with my IE7 and Windows XP. Very embarrassing, I was proposing to use the rich text editor for a .NET application and sent a link out to the RTE Demo. I checked the "Known Issues" before but failed to check IE compatibility.

Dojo is my favorite JavaScript resource by far. I really like this control over the MS AJAX equivalent.

appears to be an issue with the book

Rest assured, the Editor component is IE compatible. This appears to be an issue with the book itself, or perhaps something to do with the xd installation of dojo used by the book. We will investigate.

peller, don't know if that

peller, don't know if that page has the same problem, but, a month ago, I filed a ticket on code on one of the book pages that identifies the cause of the problem (parsing a div, where the call to parse is within the div). The ticket points to a forum discussion where several pages are identified, and has an attached file showing how the problem occurs and how to fix it. Ticket 5482.

doesn't seem to fix the editor example

I moved the script tag, but I still see that failure with the editor example in IE7.

Yes, I see. And the test

Yes, I see. And the test case to the Ticket no longer fails... Something was probably fixed/updated in the last 4 weeks.

For the Editor demo, the IE7

For the Editor demo, the IE7 error is (can't find it now) similar to: no overflow property: invalid argument.

I wonder if this isn't some kind of timing issue. When I take the failing test case on the Ticket, but leave the parse statement inside the code1 closing div instead of outside, it fails. When I modify it as below, but still inside the closing div, it works fine. Could you try something like that on the Editor page?

dojo.parser.parse(dojo.byId("code1"));
dojo.addOnLoad(function(){dojo.parser.parse(dojo.byId("code1"));});

It makes sense, I guess, that, like most other dojo functions, it shouldn't be called until we're positive that all aspects of the page, DOM, and dojo have loaded.

thank you

right... that's exactly what it was. and that code, like just about any dojo code (especially in xd mode) shouldn't be called prior to onload.

so the book basically needs some IE love. All the examples have to be changed to look like this, but the formatting in general is still off in IE...

IE7

I totally agree: awesome book, that helped me a lot to get started with dojo. IE7 still seems to be an issue, right? Well, not a big problem, but worth to work on, I think
Tagesgeld