[Cosmo-dev] Dojo 0.9 (was Re: [Fwd: Re: HSV conversion code])
Nicola Piccinini
pic at superfluo.org
Tue Aug 21 13:17:23 PDT 2007
Hi,
I'm still lurking sometimes in your list, especially when "dojo" is in
the subject.
> Preface: Moving conversation to the list per Matthew's suggestion. For
> those that didn't see, Dojo released their latest and greatest today, a
> large, backwards incompatible change that will definitely require a
> non-trivial chunk of developer time when we do upgrade. Now onto the
> meat...
I've just ported a bunch of code from 0.4 to 0.9 and I like to share
some brief considerations, in the hope that they could be interesting:
* most of the job consists of searching and replacing some common
patterns, for example: widget declaration and creation, second argument
in topic publishing method (that now is an array), etc.. It's boring but
easy;
* "exotic" usage of the dom node used in widget creation can cause
problems because it seems that dojo 0.9 substitutes it with a new source
dom node. In such cases a slightly refactoring is usually needed;
* what I initially missed more was the unavailability of
debugAtAllCosts and writeIncludes() but luckily the same problem
(debugging evaled code) is solved in a better way by Fireclipse (
http://fireclipse.xucia.com/ );
* some features are missing in dojo 0.9 but usually they could be done
in another way or one can solve the problem copying and adapting the
right functions from 0.4.
After (to be honest) a lot of work I've completely refactored my
application that consists approximatively in 15 widgets and 25 other
javascript source file (divided into two modules).
Unfortunately I can't yet evaluate any performance gain because I'm
having problem with the build system and the flattening of localization
bundles and I'm not able to build a working release :-( . Anyway:
* the size of the new release file is about 30% less than with dojo
0.4 (but the optimization used by default in dojo 0.9 is better than the
one used by dojo 0.4 and the comparison isn't completely fair).
* rendering seems a lot faster in 0.9 respect to 0.4 (no numbers, just
feelings).
In conclusion, it seems that the porting to dojo 0.9 has improved my
application performance but the gain isn't so impressive. In my opinion
it's better to promptly follow the evolution of the library, so I
believe that it's worth to upgrade anyway.
Bye,
Nicola
PS: for who is curious: I discontinued the development my application
based also on Cosmo. It's not a definitive stop, I'm reorganizing the
project but I can't do any prevision.
More information about the cosmo-dev
mailing list