Login Register

Dojo 1.0 Beta released

Dojo released a beta of the 1.0 toolkit, and have made it available for download.

Using revision 11006 as the tag, and [as of this writing] currently at rev 11100, the release is still under heavy last minute love. Fixes, optimizations, enhancements, etc ... Perhaps the release was not formally announced because many of the core devs will be in Boston this week, at the Ajax Experience. I suspect much quality code will come from bored hotel-hacking sessions and the fact so many dojo'ers will be floating about. There a lot of nitpicky things I am looking forward to having some time to delve into before the formal 1.0 release myself.

well well

some integer finally, was tired of floats:)

well, I personally prefer

well, I personally prefer floats. 1.1 is scheduled tentatively for "six months" (as per Alex's TAE session "Double Down on the Open Web" comments), though trac has the date somewhere around Jan 1 2008 (much less than six months) . I like a dot-release. It's comforting. something about round numbers (integers) bothers be.

i always wanted to be a

i always wanted to be a cook, 3 ounces of xx, 1 spoon of yy, that i believe, is my way of thinking.
well you ask me if i am a cook, no i d say, did not have the luck :)

1.1

I think 1.0.1 or 1.0.2 is more likely for Jan 1 than 1.1.

bugs

sory for my english :(

i found some bugs, in dojo version from svn

file: dojox/grid/_data/model.js
171 copyRow: function() {
172 this.getRow(inRowIndex).slice(0);
173 },
new:
171 copyRow: function(inRowIndex) {
172 this.getRow(inRowIndex).slice(0);
173 },

file: dojox/grid/_data/editors.js
192 getValue: function(inRowIndex){
193 var n = this.getNode(inRowIndex);
194 if(n){
195 var i = n.selectedIndex, var o = n.options[i];
196 return this.cell.returnIndex ? i : o.value || o.innerHTML;
197 }
198 }
new:
192 getValue: function(inRowIndex){
193 var n = this.getNode(inRowIndex);
194 if(n){
195 var i = n.selectedIndex;
196 var o = n.options[i];
197 return this.cell.returnIndex ? i : o.value || o.innerHTML;
198 }
199 }

with best regards, Pavel

Testing/Stability measures versus 0.9?

Not to be a simpleton but is there some qualitative measure of 0.9 (Beta?) versus 1.0 Beta?

Please...

Post bug reports on http://trac.dojotoolkit.org user:guest pass:guest and any support questions should be in the Forums.

sjs: I'll see if we can get that data posted, typically its included on release notices, but typically Alex does that part ;)

-Karl

Formal 1.0 release

When will the formal 1.0 release date?

Supposed to be Oct. 31, but...

I'm not sure how far along they are toward the milestone. I think it may be delayed a few days anyway. I use the SVN version anyway, so it doesn't much matter to me, as I grab the updates as they happen. The best thing to happen to this version is the Grid.

What about documentation?

The Dojo book for 0.9 is incomplete. I hope we will have some descent documentation for 1.0. Documentation for dojox is not present at all in the book. At least, documentation of each component should link to its test files (e.g., http://archive.dojotoolkit.org/nightly/checkout/dijit/tests/test_Toolbar...) since these pages provide excellent examples to start with.

I think, the documentation process should open up more. May be a wiki where everyone can contribute. Currently, the book can not be edited (except by developers). Also there is no easy way to see the latest version of the Dojo book (nightly version from svn?).

Dojo is a great library, but documentation needs a *lot* of work.

doc process

The documentation process is as open as we can make it. If you send in a CLA, we an give you editing perms on the book, and until then you can comment on any page. The editing process is outlined in the book itself, and getting started as a contributor to the book is as simple as sending Craig an email.

Regards

Documentation

I agree with nileshbansal. Dojo is wonderful, but is missing a good documentation. Good documentation diminish support and more users would help in the forums.

Congratulations to the team of developers DOJO 1.0!

I found and fixed a but on ver 0.9.0

I found and fixed a bug on the last version how can i submit this "sugestion" fix?

it's inside dojo.data.ItemFileWriteStore.saveCompleteCallback:
workaround:

If you delete an item from ItemFileWriteStore the internal array _arrayOfAllItems keeps a entry null so if you have a intensive delete / insert item process like a pagination based on dojo tree _arrayOfAllItems keep growing bigger and bigger and your pagination became slow...slow..

so suggested fix on ItemFileWriteStore:

var saveCompleteCallback = function(){
self._pending = {
_newItems:{},
_modifiedItems:{},
_deletedItems:{}
};
var size = 0;
for (i = 0 ; i < self._arrayOfAllItems.length;i++){
if (self._arrayOfAllItems[i] == null){
size++;
i = self._arrayOfAllItems.length;
}
}
if (size > 0){
newArrayAllitems = new Array();
count = 0;
for (i = 0 ; i < self._arrayOfAllItems.length;i++){
if (self._arrayOfAllItems[i] != null){
newArrayAllitems.push(this._arrayOfAllItems[i]);
}
}
delete self._arrayOfAllItems;
self._arrayOfAllItems = newArrayAllitems;
}
....
thanks
Bruno

bug still persists on ver 1.0 beta

to make me more clear:
bug still persists on ver 1.0 beta

trac.dojotoolkit.org

As referenced by the bug tracker link on the left menu
-Karl

reshape on the code

var hasnull = false;
for (i = 0 ; i < self._arrayOfAllItems.length;i++){
if (self._arrayOfAllItems[i] == null){
hasnull= true;
i = self._arrayOfAllItems.length;
}
}
if (hasnull){
newArrayAllitems = new Array();
for (i = 0 ; i < self._arrayOfAllItems.length;i++){
if (self._arrayOfAllItems[i] != null){
newArrayAllitems.push(this._arrayOfAllItems[i]);
}
}
delete self._arrayOfAllItems;
self._arrayOfAllItems = newArrayAllitems;
}

Thank you for the interest in dojo.data!

First thing I want to say is thank you for the interest in dojo.data! I do appreciate your time to look at it. The second is what you think is a bug actually isn't. That's an intentional store design decision for ItemFileWriteStore (Just one of many datastores that exist). Yes, it may seem odd as to why we're using an ever growing array, but there is a reason. Let me explain; it all has to do with the dojo.data.api.Identity interface. (http://dojotoolkit.org/book/dojo-book-0-9/part-3-programmatic-dijit-and-...)

The dojo.data.api.Identity interface is intended to allow for unique identiication of an item. This means that if you know the identity of an item, you can look that specific item back up without having to do a query (fetchItemByIdentity). ItemFile*Store supports the identity interface and it does so in two ways.

1.) Users can specify an 'identifier' in their dataset handed to the store. The identifier is nothing more than the name of an attribute that will have a unique value for that item alone out of all the items in the store.

2.) If users do not set an identifier, the store assigns you one so that the store can still meet the identity interface. The simplest and least code implementation determined at the time for that was index position in the _arrayOfAllItems array. Using the array position in that case allowed us to not have another associative map to track it. But, the caveat is ... you cannot ever change the array position of an item in _arrayOfAllItems, as that would change the identity of the item (which is supposed to be an immutable lookup key). So ... while your suggested patch does indeed compress the array back down ... you break Identity support with it. Ultimately, the reason we chose this implementation path at the time for this store was that is was minimal code to do (And size does matter. Dojo does a lot to keep things small). It was a trade off between what looked like more code (code to calculate a unique id, which probably would have just been a counter), plus maintaining the map, and so on. We (the implementors of that store) figured that for 95% of users the fact that it grows the array wouldn't even be noticeable. And for the other 5%, honestly, if you are creating and deleting thousands upon thousands of items (when you'd actually start noticing it) without closing the browser even once or relogging back in ... ItemFile*Store isn't really the datastore you would want to be using. You would want one that works with a back end service, such as a database or the like and doesn't keep everything in the browser, or do sorting in thebrowser, or querying. Huge numbers of items really are best handed by a backend server, where the datastore is just a small shim layer ontop of the service interface.

The whole purpose of the dojo.data API was to define a generic interface to write a datastore to. And as long as people conformed to the API, it should work well with dojo.data enabled widgets with little to no change to widget code (http://dojotoolkit.org/book/dojo-book-0-9/part-3-programmatic-dijit-and-...). Also, it's effectively impossible to write one store implementation that works for every case people would want. ItemFile*Store is not the 'ultimate' store for all use cases; it's just one of many implementations (there are others in dojox.data for example), and even others provided by companies like SnapLogic. The best thing to always do is look at what your ultimate goal is and how much creation/deleting of items you need to do (and how much data in general you are working with), when deciding on what datastore to use, or if you should write one specific to your data services. ImtemFile*Store is a great store for prototyping and working with moderate data sizes fairly well. It performs decently, implements every API defined by Dojo.data, and is pretty flexible ... but again, it's not the ultimate store and there will be cases you have to write a custom one for your application and data services. Now, if your services are generic and you're willing to sign a CLA and contribute your implementation to dojo with Unit Tests, we are more than happy to receive contributions! The Dojo Toolkit lives off the good work of its contributors and we're always hoping for more good contributors. :-)

Anyway, I'll cut this comment off and say again thank you for your interest in dojo.data, but your suggested fix to what was an accepted performance limitation at the time of the store design would actually break the store. A more complete fix would have to remove the dependency on the index position in the store as the identifier in the case where the dataset had no identifier attribute specified.

Sincerely,
-- Jared Jurkiewicz

One more thing...

I'm also not saying we aren't always looking for improvements, either. This internal detail and dependency may very well be redone to remove the index position dependency as identifier at some point, of course. We just have to be careful to not destabilize the existing store. Following the general rules of development:

1.) Make it work.
2.) Make it work correct.
3.) Make it work fast and correct.

I like to believe we're between 2 and 3 with ItemFile*Store. We'll really need to see just how much the growing array does cause problems (or not) as more usage of that store is done. If it does become a serious performance issue, it can certainly be reworked. Or, if any contributor also wants to take a shot at reworking it (there are 100 UT cases for ItemFile*Store, so it's pretty easy to tell if something breaks), that too is also welcome! If I can get some free time once things settle down at my job, I'll probably be looking at this again, myself. I was never 100% happy with it as the solution, but it worked well enough.

Again, thanks for the feedback and I hope my response helped clarify things.

Sincerely,
-- Jared Jurkiewicz

thanks.

Hi Jared

thanks very much for your long explanation on the choices made to the store.
I have a page using ajax to paginate on backend data it's around 57 items per page and i notice a degradation as i delete all 57 items and add 57 to the next page when i paginate it after 10 pages it gets kind of slow.

As you said i should look for or build a store more specific to my app.
thanks for all help.
Bruno