Ning Developer Docs

IMPORTANT ANNOUNCEMENT Regarding the Dojo Javascript Framework

Hi everyone,

We want to let you know about an important change we'll be making in our next release. We will be transitioning away from using the Dojo JavaScript framework. If you’ve done custom development on your network that touches this code, you will need to make changes.

Currently, we are using version 0.3.1, and we will be replacing it with jQuery 1.2.6. This change is scheduled for September 25, 2008. There are a couple of reasons for this. The primary one is that Dojo 0.3.1 is an older version and, for various backward-compatibility reasons, we had not been able to upgrade to newer versions that include their popular Dojo Widget Library.

At this point, we’ve made the decision to move from Dojo to jQuery. jQuery, along with having a lighter footprint, also has a more extensive community and documentation with a higher amount of plug-ins and extensions.

What this means for Network Creators:
Hopefully nothing. Any of the Ning-authored developer hacks and Javascript tutorials don't use the Dojo libraries, although if you're using a third-party service that actively uses the Dojo-based libraries on Ning, this could be an issue. If you're using a third-party application or non-Ning code, check with the third party application provider to see whether their code will be impacted.

What this means for Developers:
If you've been using Dojo, you should start transitioning your JavaScript to jQuery. That said, we've developed a thin code layer called the Dojo-adapter that maps existing Dojo calls to the corresponding jQuery calls so your applications will still work. Here is the list of most commonly used functions that we have mapped:

  • dojo: byId, provide, require, addOnLoad, declare, render.html.*
  • dojo.event: connect, browser.stopEvent
  • dojo.io: bind
  • dojo.string: trim, escape
  • dojo.lang: filter, forEach, extend, hitch, inArray, isEmpty, map, mixin
  • dojo.html, dojo.style, dojo.dom: a lot of useful methods to work with DOM nodes, CSS classes and browser-specific behavior.
  • dojo.json: evalJson, serialize
  • dojo.lfx: wipeIn, wipeOut, fadeIn, fadeOut, highlight
  • dojo.widget: implemented a light-weight (but fully functional) custom widget engine

In a later Ning release, we will likely remove the Dojo adapter (Dojo-adapter) layer, so we highly encourage everyone to start using jQuery as quickly as possible.

Important note for developers that start using jQuery:
Because we don't want to break existing code that already uses prototype.js or jQuery, so the jQuery library is available thru the "x$" shortcut instead of "$" to avoid any conflicts. If you have a lot of code that is written using "$", just wrap it as follows:

  (function($){    ...  })(jQuery);

Let us know if you have any questions!

[Note: This release has been pushed back a week to September 25th. Please see this note on the Network Creator forums for more details.]

Views: 22

Replies to This Discussion

Hey Chris & Catman,

I'm noticing a lot of references to smiley files with .php and .js extensions in this message thread. Are these files created by a third party provider specifically for Ning?

Taking a cursory look, because we don't want to break existing code that already uses prototype.js or jQuery, so the jQuery library is available thru the "x$" shortcut instead of "$" to avoid any conflicts. I'll need to take a look at this in some closer detail, however.

Thanks,
- Ernie
I just noticed, on the site I was actually running the emotes, and were being served off my catman1.com (along with the jquery 1.2.1 so,, as to take no chances of a conflict with the ning server). They were working well and throwing no errors.
I even had someone from ning take a look and they said it looked fine.

Soo.. that being said, in showing you the file path I was using to access the php.js, I made a typo.
I didn't notice it here.. my bad.

http://www.catman1.com/emotes/smilies.php.js

It ran off catman1.com, not catmat1.com. Can you forgive me? ;)
Hi Catman,

OK. So the JS source file has been replaced in the tracking code box and at least the script is running, but from a cursory glance it seems that the textboxes aren't adding the smileys, which is what I've kinda gathered what the JS file is supposed to do.

It sounds like someone else is having a similar problem as well - is this an S4N script? Do you know if any other networks are having similar issues? They may be a good sources to ask.

Thanks, Ernie
Nope, not an S4N. They don't have emotes yet, to my knowledge.
These were very light and fast loading (great for dial uppers, like me)
There was not a single error ever observed.

The php.js file references the jquery (1.2.1) which was running from my own web host (again, to avoid any possible conflicts with jquery running in Ning)

If you check the php.js file off my webhost (above), you will note references to 'length' in the codes to make the emotes show in the Comment Box, so people could click and create the file path to the .gifs appear in their post.

The reason I mention this, is I get this error since the Ning maintenance.
Line 13
Char. 9
Error 'length' is null or not an object
Code 0

It may be totally unrelated.

Please keep in mind, that what I was doing in our "working community", was operating off my host, through Analytics.

The work being done in the "test community" was an attempt to run them using the webdav, from xn_resouces folder.

Two different methods.

If there is a correct jquery file in the network, accessable through webdav, what should this line of code be changed to in the php.js file to access the proper jquery file?

jq.src = 'http://static.ning.com/tigermansaga/xn_resources/emotes/jquery.js';
Bom, para ter colocado outra text box na area de "MY PAGE" tive que apelar no layout_helper que fica na pasta "lib" do widget ( Incrivel mas é lamentavel a documentação do ning). Então, lá eu coloquei que haveria mais um html na coluna 2 assim :

Percebam que o embedInstanceId tem que ser diferente de qualquer outro que esteja no arquivo em questão. Feito isto, para qualquer novo usuario ira aparecer mais um embed text_box.

Att.,
Boa Sorte Brasileiros. Qualquer coisa me chama aew.....

RSS

© 2026   Created by Ning Developer Admin.   Powered by

Badges  |  Report an Issue  |  Terms of Service