Microsoft has in the last few years been working hard to woo the development community over to the Office 365 platform. The last 6-12 months have been particularly interesting with lots of news and announcements about the Office 365 API and SDK. One of the big pushes, and clearly something new CEO Satya Nadella is very keen on, has been a more multi-platform approach. Things are no longer “Microsoft only”, SDK’s for Android and iOS were released back in October (see more on this in the official announcement).
I remember years ago when developing for SharePoint was much more difficult. SharePoint 2003 had no official APIs to speak of, and it was very hard to deploy extensions to Office products, let alone think about cross mobile support. Microsoft has learnt its lessons from the past and is now providing developers with a rich set of tools to develop great applications for Office 365.
In this post I am going to look more closely at the Office 365 API and what it offers.
Choose your development platform
The Office 365 API’s are in fact REST services, but there are a lot of different SDK’s available. These SDK’s will manage the transformation from (managed) code to REST calls. There are SDK’s for iOS, Android, and of course for Visual Studio projects. These are available for MVCASP.NET MVC, ASP.NET Web Forms, WPF, Win Forms, Universal App, Cordova and Xamarin project types. Calling the REST endpoints directly is of course also possible.
Examples, starter kits and more examples
Learning by looking at examples is often the easiest way to get a better understanding of new technology, and it is no different with these APIs.
For each of the different development platforms Microsoft has provided starter kits and code samples. Start here over at MSDN, choose your development platform and have a look at some of the great stuff available. For SharePoint development Microsoft has released an open source repository, the Office 365 Patterns and Practices repository. This is turning into a really nice resource and I recommend you take a look.
The Office Dev Center
All of the great resources published by Microsoft are available via the central portal Office Dev Center. For example, a link to the detailed description of the API is provided prominently on the home page. This page covers Mail, Contacts, Calendar, Discovery Service, Files and more. It is very comprehensive.
The main portal is split up in two parts, one for the Office 365 API, and a separate tab for SharePoint and Office Apps. It’s good to know the difference between these two options:
- The API’s will allow to write an app on any development platform, loosely coupled from Office 365. It does not necessarily extend the Office 365 experience.
- An Office or SharePoint App will be deployed to either Office or SharePoint and extends the user experience by adding extra functionality to Office 365.
And, a lot of (free) training material is also available in Microsoft’s Virtual Academy. Watch some excellent videos and presentations and you can learn even more on how to develop using the Office 365 API.
An exciting future
Microsoft is improving the developer experience for Office 365 constantly. New functionality is added to the Office 365 API’s all the time.
I personally am looking forward to easier authentication methods in Office 365. Right now only OAuth2 is supported, which can be quite complicated, especially when you haven’t worked with it before. Also OAuth2 isn’t a uniform standard, every implementation tends to differ. I hope in a future release of the Office 365 API, Microsoft looks at some easier ways to authenticate. Until then, have a look at this lab at Microsoft Virtual Academy (exercise 3) and enjoy the Office 365 API’s!