[dojo-contributors] Update on Dojo Storage/Dojo Flash Patches

Adam L. Peller adam at peller.org
Thu Aug 16 23:15:04 EDT 2007


I appreciate your thoughts and I'm thrilled to see the patch for #4040
integrated.  However, is there a reason you cannot commit the other
patch?  Does it leave us any worse off than before?  It's not ideal,
as we should be working with fully ported code, but the improvements
are clear and some were already integrated into 0.4 (originally
submitted against 0.3.1), so it would seem wise to keep them
consistent, at least.  Letting this patch miss a release cycle and get
stale a third time would seem unfair to Julian.

I do hope that someone takes on the challenge you've outlined.
Committing this patch might encourage Julian or someone else to pursue


On 8/16/07, Brad Neuberg <bradneuberg at gmail.com> wrote:
> Adam, here is an update on the three bugs/patches you asked me to look at:
> 3213 - [patch][ccla]Flash get/putMultiple API -
> http://trac.dojotoolkit.org/ticket/3213
> 3266 - [patch][ccla]flash performance degrades with storage size -
> http://trac.dojotoolkit.org/ticket/3266
> 4040 - [patch][ccla]batch API for gears to improve performance -
> http://trac.dojotoolkit.org/ticket/4040
> First, I just want to say I definently appreciate the work Julian has done
> in the patches he has submitted - - Julian, thank you for your hard work. I
> apologize that I have not been able to focus much on the Flash storage
> system for the last half year since I have had my hands full with other
> work. Your patches look great.
> For patch #4040, I applied it to the Dojox tree today. I ran the
> dojox/storage/tests/test_storage.html page after the patch,
> which works fine. However, I don't have any code which uses
> putMultiple/getMultiple, so didn't directly test those functions. Everything
> is in SVN now however and bug #4040 is closed.
> However, for bugs 3213 and 3266, the Dojo Flash Storage Provider is not
> currently working on 0.9; I tested it out against the current version of SVN
> today -- I thought that someone else might have patched it to work for 0.9,
> but this is not so. Like I said I don't have the bandwidth to focus on
> porting Dojo Flash/Flash Storage Provider to 0.9 right now -- I must focus
> on paying work and other priorities right now. I can't apply any Flash
> related patches or bugs until the underlying system works.
> Here are the tasks for Dojo Flash/Dojo Flash Storage Provider that remain to
> be done if someone wants to tackle this issue; this is perhaps about 2 1/2
> weeks of work, especially if there are unknown issues that must also be
> solved, which is common to working with Flash/JavaScript interaction -- if
> someone depends on this code commercially, I am available to do it under a
> consulting contract so as to focus on it:
> 1) In dojox/storage/_common.js, we pull in our different storage providers
> (Gears, Flash, WhatWG). When I do a build for Dojo Offline, I _don't_ want
> to pull in the Flash or WhatWG provider since they bloat the size of the
> Dojo Offline offline.js profile file; however, I couldn't get the Dojo build
> system to dynamically not include FlashStorageProvider.js and
> WhatWGStorageProvider.js -- you will see that I had to comment out the
> following lines in _common.js:
> // FIXME: Find way to set isGears from offline.profile.js file; it didn't
> // work for me
> //dojo.requireIf(!dojo.isGears,
> "dojox.storage.FlashStorageProvider");
> //dojo.requireIf(!dojo.isGears, "
> dojox.storage.WhatWGStorageProvider");
> I hardcoded just pulling in the GearsStorageProvider if you say
> dojo.require("dojox.storage"); from your JavaScript file. This means that
> JavaScript code that depends on the old Flash storage provider will not
> work, since a call to dojo.require("dojox.storage") will only pull in the
> GearsStorageProvider.
> This task therefore involves figuring out how to get the Dojo Offline
> profile build to only include the GearsStorageProvider, while also somehow
> keeping the requireIfs() in there if Gears is not part of the build so that
> older code that depends on the Flash/WhatWG stuff will work.
> 2) Dojox Flash itself needs to finish being ported -- it is partially ported
> (special thanks to Alex for helping with that). This will involve getting
> mtasc, which you can download from http://www.mtasc.org/ . This is just a
> simple command line tool that you place within your path.
> For Dojox Flash, the unit test file is not in the 0.9 file layout yet -- it
> is in the 0.4.1 layout and can be found in tests/flash/. There are two unit
> test files in here; they do a variety of tests across the Flash/JavaScript
> boundry. All the tests should pass, except one will fail -- Flash
> asychronously calling JavaScript I think -- this never passed originally,
> because I didn't need it for Dojo Storage. These files should move into
> dojox/flash/tests and be adapted for the 0.9 syntax.
> You must also port the Dojo Flash build system, which is currently only in
> 0.4.1 and which consists of the following tasks: 'buildFlash',
> 'buildDojoFlash', and 'buildStorageFlash'. These need to be ported to the
> new 0.9 JavaScript based build system (which should be relatively
> straightforward -- if you look at those tasks they basically run mtasc in
> different ways -- just do this from JavaScript).
> Getting Dojox Flash to work is a necessary precondition to the next step.
> 3) WhatWGStorageProvider already works in 0.9 -- I got that working a few
> months ago. The actual provider works, just not the issues with _common.js I
> identified above. Inside of the FlashStorageProvider (and possibly inside of
> Dojox Flash), you might have to update how it finds the resources it needs,
> since paths have changed from the move to 0.4 to 0.9 (for example, the path
> to the flash6_gateway.fla might be different, since it is inside
> dojox/flash/flash6/ now instead of in the root of the Dojo tree, like in
> 0.4.1).
> 4) QA across supported platforms and fix any bugs you might find from the
> 0.9 port or platform/Flash drift:
> Mac - Safari/Flash 6
> Mac - Safari/Flash 8+
> Mac - Firefox 1.4 (not Firefox 2 since that is WhatWG provider)/Flash 8
> Mac - Firefox 2 - Should go to WhatWG provider
> Windows - IE 6/Flash 8
> Windows - IE 7/Flash 8
> Windows - Firefox 1.4/Flash 8
> Linux (testing on Ubuntu usually) - Firefox 1.4/Flash 8
> Linux - Firefox 2 - Should go to WhatWG provider
> I have opened a bug, #4198, to track the above tasks if someone wants to
> take a stab at it.
> Best,
>   Brad

More information about the dojo-contributors mailing list