Which API to use? (REST API, SDK, CSModules)

rated by 0 users
Answered (Not Verified) This post has 0 verified answers | 2 Replies | 2 Followers

Not Ranked
Female
15 Posts
Points 285
Tara posted on Thu, Oct 9 2008 7:54 AM

I've been able to get the REST API to work with a small .NET console application. I've created a new user, a new blog, and deleted a blog.

There is also the other SDK which is a separate set of libraries and has a different download. In the documentation there are Common Code Examples but no description as to how to build and deploy the project. Would this work as a .NET lib or web application which would become a CSModule and get dropped in the CS bin?

I'm trying to understand the difference between using the REST API, the other SDK, and/or creating CSModules. Any advantages/disadvanteges to one over the other. For example REST API does not sopport WIKI's and seems to only work with a separate .exe you create.

Thanks,

Tara

  • | Post Points: 35

All Replies

Top 25 Contributor
Male
2,208 Posts
Points 30,885
CS Developers
Answered (Not Verified) alowe replied on Thu, Oct 9 2008 8:34 AM
Suggested by alowe

Tara,

The common code examples are really just meant to give you an idea of how you can manipulate the underlying CS code base. With the SDK, you can do anything you want (the SDK is a Visual Studio solution with all of the Visual Studio projects/code needed to build CS from source). That is, you can add a new project to the solution and make use of the APIs exposed by all of the Community Server assemblies.  Adding a project to the solution from the SDK though can be a good way to write your own libraries, etc. alongside the CS projects. Changing the core source code is not recommended for most situations because of the issue with future upgrades.

I think we should define things a bit. What is the difference betwen an API, SDK, and CSModule.

An API is simply an interface to a library of code. You can use an API to make the software perform actions it was created to perform. The REST API is very useful if you want to do things outside of the CS UI and in general you are more protected from future changes to the underlying CS codebase.

An SDK, generally speaking, is a more elaborate and it can range from full source for an application to some source but is generally provides the developer with the ability to actually modify the behavior of the software. In Community Server's case, the SDK is the full set of Visual Studio projects needed to build Community Server. You have to thnk long and hard about using the SDK to change core source code though. Changing the core source code of CS sets you up for challenging upgrades down the road.

CSModules are part of the Community Server API. That is, there are events in the CS API that allow you to write bits of code to be executed when those events are raised. CSModules allow you to add, change, or remove behavior inside CS without changing core CS code. However, you are limited to the events defined by the CS API. Check out the CSModule events in the developer's guide for a better look at exactly where you can plug in your own code.

  • | Post Points: 5
Top 25 Contributor
Male
2,208 Posts
Points 30,885
CS Developers
alowe replied on Thu, Oct 9 2008 8:42 AM

Oh, and we do not yet have REST API support for wikis. We are looking at that for future releases.

  • | Post Points: 5
Page 1 of 1 (3 items) | RSS
Powered by Community Server (Commercial Edition), by Telligent Systems

Copyright© 2008 Telligent Systems Inc. All rights reserved
CommunityServer.com  •  Telligent.com