Lync Development: Picking the Right API
Lync is wonderful, and enabling, and rich and a dozen other things – but that can make it complicated. Complicated to set up, complicated to keep running, and complicated to develop on. One of the first problems anyone coming to Lync development has to deal with is: I want to do Lync Development, what is it I should be downloading? What’s the “thing” I need to get started with Lync development? What is it called, where do I find it on StackOverflow, and what do I need to install?
Hopefully I can help you out with making those decisions, with my set of “I want to…” headings below.
I want to… create desktop apps that interact with Lync
You need the Lync Client SDK. This is an MSI which contains DLLs, Visual Studio templates for creating WPF applications, and a ton of useful controls to help you Lync-ify up your applications. With the DLLs you can hook into the running Lync instance on the user’s computer and interact with their Contact list, answer calls, change their presence, whatever. It’s important to note that the user MUST have the Lync client installed and running on their machine otherwise the SDK won’t work. There are versions for Lync 2010 and Lync 2013 so make sure you get the right one.
For an example of this sort of application, have a look at AutoAssist.
I want to… create full-screen kiosk-style applications
There’s a special trick you can perform with the Client SDK. It’s called UI Suppression and it means that when you run your application, the Lync process (lync.exe) will still run, but you won’t see the Lync Client. It’s then down to your application to handle logging in, processing incoming IMs or calls, doing all the UI. It’s a lot more work: but it does enable you to present a full-screen, immersive experience. Blog post coming soon, but in the meantime you can read up about it on MSDN.
I want to… show context or information within Lync conversations
Microsoft has you covered, in the form of Conversation Window Extension (CWEs). These come in different sizes and will let you add an extra “window” to the right hand side of a conversation, where you can present contextual information to the user. You need to download the Lync Client SDK (see above) to get the DLLs you need. They’re written in Silverlight and using the DLLs provided you can also attach to the existing conversation (the one in which your window is operating), see who it’s with, control it etc. as well as doing all the normal things such as reading and changing contact lists, presence etc.
For an example CWE application, check out Information Dashboard.
I want to… create back-end (server) applications to perform XYZ in Lync
So, this is no longer client-only territory. There’s a SDK for Lync called the Unified Communications managed API (UCMA) which allows you to write programs which can interact with Lync. These do not require the Lync client to be present, and are designed to be highly scalable and reliable. To write UCMA applications you’ll need the UCMA SDK. There’s a 2010 and a 2013 version, which are designed to target the version of the Lync server, not client.
I want to… filter / control / act on Lync traffic
You need to get familiar with the Microsoft SIP Processing Language (MSPL) which is a light-weight scripting language allowing you to create modules which sit on your Lync server and react to different types of SIP traffic. There’s nothing to download (because you can write the scripts in Notepad) but be sure to check out the list of tools I recommend you have in place before you start. There’s more blog posts on this coming your way, but in the meantime the script syntax and a sample script are on MSDN.
I want to… run Lync in crazy places
Arguably the most ubiquitous communication standard today is HTTP – and Microsoft have an API for Lync that only requires HTTP Request-Response to work. It’s called the Unified Communications Web API (UCWA) and it’s a REST interface for Lync. It’s limited at the moment to things like changing presence, getting presence updates from other people, sending & receiving IM – but if that’s all you need, it’s simple enough that it can run in many places where the Lync client can’t. Lync-enabled washing machine? Go for it! Again, there’s nothing to download, but you’ll need something that can process HTTP traffic, and there are some prerequisites on the server.
I want to… run Lync in the browser
I want to… write applications that interact with Lync Persistent Chat
Because Persistent Chat was introduced late to the party, it has its own SDK. It follows the same structure and patterns as UCMA though, so if you’re familiar with UCMA development crossing over isn’t too bad. Download the Microsoft Persistent Chat SDK to get the API DLLs, documentation and redistribute parts.
Hopefully now you have a better idea of what to download, install and search Google for.
Now that you know what technology you’re using, make sure you have all the tools you need before you start.