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

laurent bernabe laurent.bernabe at gmail.com
Wed Oct 2 18:45:46 EDT 2013


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) : 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 I keep looking for a better solution.

Regards.


2013/10/3 Manuel Quiñones <manuq at laptop.org>

> 2013/10/2 laurent bernabe <laurent.bernabe at gmail.com>:
> > Hi,
> >
> > Has anyone tried to use the DojoToolkit in a web activity ?
> > Because, as the documentation says that it should be used in a web
> server.
> > Otherwise some functionnalities may not be available.
>
> What do you want to archive?  I don't know Dojo, but acoording to
> their website there are independient modules that are AMD-ready, so
> you might be able to use them.  See our docs:
>
>
> http://developer.sugarlabs.org/activity.md.html#using%20other%20javascript%20libraries
>
> > So, is using DojoToolkit safe inside a sugar web activity ?
> > Otherwise, I'll look for another javascript POO library. (Prototype.js is
> > not fine according to me : too similar to normal javascript).
>
> You want to archive object oriented programming? You can do it in
> straight JavaScript.  The Mozilla documentation is nice:
>
>
> https://developer.mozilla.org/en-US/docs/Web/JavaScript/Introduction_to_Object-Oriented_JavaScript
>
> If you still feel very unconfortable with JS, you could try other
> languages that compile to JS.  See http://altjs.org/ .  Note that this
> adds some complexity and the compilation step.  Some that I have tried
> are CoffeScript (in Gears activity) and TypeScript.  And one I'm
> looking at lately with attention is ClojureScript.
>
> --
> .. manuq ..
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20131003/493719ba/attachment-0001.html>


More information about the Sugar-devel mailing list