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

Manuel Quiñones manuq at laptop.org
Wed Oct 2 18:00:44 EDT 2013


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 ..


More information about the Sugar-devel mailing list