[dojo-contributors] 3-rd party compatibility as acceptance criteria?
eugene at lazutkin.com
Mon Jun 4 00:58:32 EDT 2012
On 06/03/2012 11:17 PM, Sasha Firsov wrote:
> Dear all,
> From Ticket #14546 <http://bugs.dojotoolkit.org/ticket/14546>one of
> reasons to reject was:
> "it seems more important to be consistent with the other AMD loaders."
> Now question goes to what level we should follow other libs?
> I made require+Deferred compatible with DTK and require.js to the level
> they overlap:
> | sources <http://simulationlabs.com/dojo/DojoPlay2012/lib/AMD/test/>
> original require() functionality reused and has not been changed.
> Unfortunately AMD error handling is not in agreement yet and DTK
> implementation differs. The plugin actually allows to hide the
> difference on AMD loaders implementation. But it will need additional
> conditional code to be cross-platform.
I would suggest to follow RequireJS in this respect --- its handling of
errors appears sane to me and I can't fathom a simpler implementation.
See details here:
Yes, RequireJS' implementation is based on callbacks (errbacks), but if
you want to use Deferred/Promisehere, you can easily augment the
> Question is: should the code to get accepted include the peace dedicated
> to serve 3-rd party libraries? Which ones?
It depends on our goals. One of our goals is to be interoperable with
other libraries, and we decided to do it the AMD way. Obviously we have
to take into account popular AMD implementations, and trends.
> IMO code should be enough extendable to be supported as branch for other
> environments but contributed code should be clean of foreign logic.
> Another question, what to do with neat code so it will not get lost?
Create a github repository for them, so they are not lost and can be
reused when needed? That's what I do.
> W/ respect,
> dojo-contributors mailing list
> dojo-contributors at mail.dojotoolkit.org
More information about the dojo-contributors