[Sugar-devel] Using the DojoToolkit in a Sugar WebService ?

Manuel Quiñones manuq at laptop.org
Wed Oct 2 20:53:30 EDT 2013


2013/10/2 laurent bernabe <laurent.bernabe at gmail.com>:
>
>
>
> 2013/10/3 Manuel Quiñones <manuq at laptop.org>
>>
>>
>> False.  A variable declared with 'var' is visible in the object
>> private methods and privileged methods too.  This is worth reading:
>>
>> http://javascript.crockford.com/private.html
>
>
>
> Thanks, I've read this page before, maybe too fast. I am reading it again in
> order to understand what I misunderstood before.
>
>>
>>
>>
>> > so it seems to me less flexible that Java approch. And
>> > that is because I want to use a framework.
>> >
>> > Unfortunately, Dojo ... is heavy in size (around 3Mb). And I can't
>> > afford
>> > relying on this weight.
>>
>> So, no independient modules as their homepage say?  Can you show how
>> they do OOP?
>>
>
> I thought Dojo can be used to make OOP simpler as it has been suggested by a
> discussion on Stackoverflow :
> http://stackoverflow.com/questions/907225/object-oriented-javascript-best-practices
> " For instance, the Dojo Toolkit provides a robust framework to write object
> oriented JavaScript codes which even supports multiple inheritance."

OK, I suggest you give a try to Dojo and come back later to tell us
how it went.  Your investigation can be valuable for future activity
developers.

The only thing you'll have to manage is how to use the Dojo loader
together with the RequireJS loader.  We use RequireJS for AMD.  But
according to this link, it is possible, and the bug mentioned is fixed
http://requirejs.org/docs/dojo.html

>
> Regards
>



-- 
.. manuq ..


More information about the Sugar-devel mailing list