We've built Ning from the ground-up to be a programmable platform for Network Creators and developers alike to customize their social networks as well as create their own web applications using the APIs provided by us on the Ning Platform. Unlike other services or even other online platforms today, the Ning Platform is unique in that we support arbitrary code execution inside our own backend. We love Network Creators and developers using our APIs to experiment and create on Ning. The only parameters that we lay out are the boundaries of our
Terms of service, which we've aimed to make pretty reasonable. Here are some excerpts:
To enable a great experience for all Users on the Ning Platform, you, as a Network Creator/Developer, must ensure your Network(s) don't unduly degrade the performance of the Ning Platform. If your Network(s) exceed the quotas and limitations set by Ning (e.g., API calls or bandwidth) or otherwise degrade performance of the Ning Platform or other services in any way, we may suspend your Network(s) at our sole discretion. Additionally, we prohibit social networks and application developers from:
- Collecting Personal Data about other Users for commercial or unlawful purposes
- Using automated means, including spiders, robots, crawlers, data mining tools, or the like to download data from Social Networks and the Ning Platform - except for Internet search engines (e.g. Google) and non-commercial public archives (e.g. archive.org) that comply with our robots.txt file, or "well-behaved" web services/RSS/Atom clients. We reserve the right to define what we mean by "well-behaved"
- Posting non-local or otherwise irrelevant Content, repeatedly post the same or similar Content or otherwise impose an unreasonable or disproportionately large load on Ning's infrastructure
- Attempting to gain unauthorized access to Ning's computer systems or engage in any activity that disrupts, diminishes the quality of, interferes with the performance of, or impairs the functionality of, the Ning Platform
- Developing, invoking, or utilizing any code to disrupt, diminish the quality of, interfere with the performance of, or impair the functionality of the Ning Platform or any Network
Additionally:
Ning may establish general polices and limits concerning use of the Ning Platform ("Ning Platform Policies"), including (and without limitation) the maximum number of days that Social Networks and uploaded Content will be retained, the maximum number of and size of Content files and objects (including email messages), the maximum disk space allotted to you (as a Network Creator) and to Users on your behalf by Ning, the maximum number of times and duration for which you may access the Ning Platform or Social Networks in a given period of time, the maximum bandwidth used by your Networks or Content, and the maximum CPU power used by your Social Networks or Content. Here are some specific guidelines for developing on Ning within the parameters of our Terms of Service:
- Require user interaction for information/data reload. Scripts or other types of mechanisms (including Flash widgets, META refresh tags, and similar) generate load regardless of whether a user is navigating the site or not. For example, at this time, we do not support polling applications running on the platform. Pull of information based on user actions should be the default behavior of your code on Ning.
- Use the Ning Content Store for persistent information. While your application running on Ning has access to its own filesystem and disk space, we do not support using the file system for mutable data storage. The problems created by filesystem-based storage (including significant use of SQLlite for example) are many, starting with the very limited space available. Use the Ning Content Store for your storage needs.
- Avoid N+1 queries. N+1 queries (where the first query obtains a list of values, and then one query is required to fetch each subsequent value) tend to degrade performance. Watch for N+1 queries and rewrite them as one query, which should be possible in nearly every case.
- Persist data judiciously. As with any database system, write operations are more expensive than read operations. Pages that create content for every read are not recommended, since they would unnecessarily degrade performance for users. Similarly, creating three objects when just one would do is a similarly easy optimization.
- Make use of xn_resources. If you use the file system of your social network to serve static content including images, CSS, JavaScript, video files, or music files upload them to the xn_resources folder and access them via static.ning.com. See this tutorial for instructions.
- Avoid queries across many content types. Atom API or PHP API queries that search across all of the content types on your social network (such as
http://restaurants.ning.com/xn/atom/1.0/content) are very convent for exploring your data, but do not integrate or develop features that make continuous or rapid requests using these types of queries.
Hopefully, these serve as helpful guidelines for developing applications and networks that are consistent with our Terms of Service. While it is not a definitive list of best practices and we’ll continue to use our best judgment – consistently applied – to ensure the overall performance and scalability of the Ning Platform, it should be helpful in your development efforts going forward. Thanks and please let us know if you have any questions, comments, or feedback on all of this!