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

Manuel Quiñones manuq at laptop.org
Wed Oct 2 19:41:11 EDT 2013


2013/10/2 laurent bernabe <laurent.bernabe at gmail.com>:
> Apologizes, for POO in javascript, I did not want to talk about
> encapsulation, but about fields visibilty (public/protected/private).
> I've read the mozilla page link that Manuel gave me, but they don't talk
> about that OOP feature.
>
> And I know that a field declared with 'var' rather than 'this' is private,
> but only visible in the function where it has been defined (commonly the
> class constructor) :

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

 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?

-- 
.. manuq ..


More information about the Sugar-devel mailing list