Pieter van der Westhuizen

Office 365 from a developer point of view

In my last post we looked at what Office 365 means to end-users and companies as well as the services that are available to them. Now, I’m sure like me, a lot of developers out there are asking just what exactly Office 365 means to us. Also, how would we integrate with Office 365? What exactly can we integrate with? Will my existing Office add-ins still work?

Let’s start by looking at the different components of Office 365 and what they mean to the developer.

SharePoint Online

The SharePoint component of Office 365 is the most customizable and will probably be the most used component for developers. Existing SharePoint developers will be extremely comfortable with SharePoint Online as it will allow them to reuse their existing skills to develop for the platform. Although there are a few limitations due to the fact that SharePoint online solutions can only run as sandboxed solutions.

Sandbox solutions

Sandboxed solutions cannot access certain security-related functionality and can also not access any data outside of the SharePoint site collection in which they were deployed.

This is done to restrict any poor performing or malicious code from adversely affecting the SharePoint Online environment. It is also the only way to run custom code on SharePoint Online. Certain SharePoint item templates will not be compatible with SharePoint Online, please refer to the chart below for a list of compatible item templates:

Item Template Compatible with SharePoint Online
Web Part Yes
Visual Web Part (Sandboxed) Yes
Event Receiver Yes
Module Yes
Content Type Yes
List Definition from Content Type Yes
List Definition Yes
List Instance Yes
Empty List Yes
Visual Web Part No
Sequence Workflow No
State Machine Workflow No
Application Page No
User Control No
Business Data Connectivity Model No

As I’ve mentioned before, a sandboxed solution is not allowed to access any data outside its site collection. This means that you cannot make web service calls via the internet or access any code that is not marked to allow a partial trusted caller; you can also not access the hard drive to read or write files. Deploying files to disk and adding assemblies to the Global Assembly Cache (GAC) is also not allowed for sandboxed solutions.

You should be careful though when developing a sandboxed solution, by not using too much of the server’s resource as each sandbox solution has a resource quota. If your solution exceeds that quota it may be disabled. The quota is measured in the following metrics:

  • Process abnormally terminated
  • Number of threads in overall process
  • Unhandled exceptions
  • Unresponsive process

These are just some of the metrics, and each one has a score that will contribute to your solutions’ quota.

For those of us unfamiliar with SharePoint development, never fear. Visual Studio 2010 comes with a host of project and item templates to help you. I do recommend you download and install the Visual Studio 2010 SharePoint Power Tools, which provides compilation support for Office 365 sandboxed solutions and a Visual Web Part (Sandboxed) project item template.

Visual Studio 2010 SharePoint Power Tools

SharePoint Ribbon

SharePoint shares a UI element that all Office developers will recognize and that is the Server Ribbon, which provides a familiar user interface for working in SharePoint. The SharePoint Online Server Ribbon can also be customized by developers.

SharePoint Online Server Ribbon

SharePoint dialog boxes

If you’ve used SharePoint you would’ve noticed that it does use a lot of fancy looking dialog boxes to display information to the user and to help the user perform certain tasks. This dialog box platform will also be available to help developers create fast and responsive UI’s. A major benefit of using a dialog box is that it can improve performance in many instances by reducing the number of round trips to the server and for page requests.

SharePoint dialog box

Silverlight WebPart

SharePoint 2010 provides a Silverlight Web Part that developers can use to add a Silverlight application to a page in their SharePoint site. It is relatively easy to deploy as you simply need to upload it to your SharePoint site. It is also an effective way to overcome some of the limitations of the SharePoint Sandbox as Silverlight will be allowed to make web service calls. For an example of an embedded Silverlight web part in SharePoint, click on the Add Web Part button on the Page edit ribbon as illustrated in the following image:

Silverlight Web Part

LINQ to SharePoint

A LINQ to SharePoint provider is included in SharePoint 2010 which enables developers to query SharePoint lists using the LINQ syntax instead of the Collaborative Application Markup Language (CAML) which is used by SharePoint internally. Another scenario of skill-reuse!

Client object model

The SharePoint object model exposes SharePoint 2010 server-side objects and data on client computers and enables developers to develop solutions that run on a client computer using familiar .Net programming concepts such as object, properties, methods and events. The client object model works in .Net applications and Silverlight applications as well as in JavaScript.

Custom Branding

Developers would be able to add custom branding to their SharePoint Online sites. There are a variety of options available for adding custom branding, which includes:

  • Master Pages
  • Page Layouts
  • Custom CSS
  • Custom and built-in themes

Microsoft Exchange Online

Microsoft Exchange Online is a hosted/cloud-based version of Microsoft Exchange Server and provides a message (e-mail) and calendar solution. It also provides many of the same programmability interfaces of the on-premise version of Microsoft Exchange.

Developers have a choice of using either the Microsoft Exchange Web Services (EWS) Managed API 1.1 or the Exchange Web Services (EWS) to develop a variety of solutions for Exchange Online. A short list of what tasks can be performed using the Exchange API or web service is:

  • Search mailboxes;
  • Work with message attachments;
  • Create, Read, Update and Delete Contacts, E-mails, Tasks and Appointments
  • Create Inbox rules.

Microsoft Lync

Microsoft Lync is a cloud communication service that enables people to connect from anywhere and in different ways including instant messaging, audio/video calling and audio/video and web conferencing.

Using the Microsoft Lync 2010 Managed API, a full-featured client API that combines the Unified Communications Client (UCC) API with the Office Communicator Automation API, developers are able to develop solutions that start instant messaging, audio, desktop sharing and file transfer conversations. Using the Lync Controls included in the Lync SDK, developers can also embed presence and click-to-communicate functionality into their applications.

Microsoft Office Professional Plus

If you have written an add-in for Microsoft Office, it will most likely still work with the offline versions of Microsoft Office. Users will still have the rich and featured Microsoft Office experience they are used to when using the offline version of Office.

The Microsoft Outlook Web App available on Office 365 can be customized to a certain degree and if you can believe what is written here, it sounds like developers would finally be able to add entries to the navigation pane.

Developers would also be able to publish pieces of Excel workbooks to SharePoint Online and interact with excel data using the REST API and JavaScript Object Model. It is also possible to convert Microsoft Access databases to SharePoint lists and forms enabling a lot of small businesses still using Microsoft Access to migrate their solutions to the cloud.

Phew! This is just a relatively short introduction to the vast developer ecosystem which is Office 365 and I’m sure you would agree that Office 365 will provide developers with a much larger audience and market for their solutions. Exciting stuff!

Thank you for reading. Until next time, keep coding.

You may also be interested in:

4 Comments

  • https://secure.gravatar.com/avatar/8e9464fc67ae31f933d59d8456ca2e5b?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G Eric says:

    Pieter,

    Thanks for posting this.

    I see you can integrate with Exchange Web Services, but the issue I haven’t figured out is how to leverage Exchange Web Services without asking the user for their username/password and not retaining it.

    Example,

    I write a web application which I would like to integrate with a company’s Office 365 deployment (external web app, not deployed in the organization, completely separate). Now in order for the app to integrate with Exchange Web Services, I need to ask the user for their Office 365 username/password and retain this information, either that, or ask this information every time.

    I’ve looked for an oauth solution of sorts, but I have yet to see one. Google Apps seems to have this functionality, allowing external web apps to seamlessly integrate with gmail for instance.

    Am I missing something here? How do we as developers achieve this level of integration.

  • https://secure.gravatar.com/avatar/e1a4c2b21a5186e0b27c1c601f418b76?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G Pieter van der Westhuizen says:

    Hi Eric,

    I know exactly what you mean. I had a similar requirement.
    The closest thing I could find to a solution was to use impersonation. You can create a group in Exchange that has the ApplicationImpersonation role and then add one user to this role. You then use this one user to log in and then impersonate the other users using their e-mail addresses. This way you only need to store one users’ credentials.

    It’s not perfect but it is the only way I could fine around this for now. You can read more about it at http://msdn.microsoft.com/en-us/library/gg194011%28v=exchg.140%29.aspx

    Thank you for your comment!

  • https://secure.gravatar.com/avatar/af0c34b85a3a11c8d0e281088771e00a?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G Mario says:

    Hi Pieter,
    The company I work in is planning to migrate to Office 365.
    I’m in charge of an application which uses an Outlook add-in to create tasks under certain conditions.
    Will this Outlook add-in still work after migrating to Office 365?

    Thanks.

  • https://secure.gravatar.com/avatar/e1a4c2b21a5186e0b27c1c601f418b76?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G Pieter van der Westhuizen says:

    Hi Mario,

    I don’t see any reason it should’nt work with Office 365. If you connect Outlook to Office 365 you’re actually connecting to Microsoft Exchange(Hosted in the cloud).
    So if your add-in is currently working with Outlook connected to MS Exchange you should not have any problems. However if your add-in is not currently running against MS Exchange connected Outlook i.e. only using POP3/IMAP accounts, and you save the StoreID property in a database you should double check the field size as the StoreID property does increase in length when connecting to MS Exchange.

    Thanks for your comment! Please do not hesitate to drop us a line if you have any more questions. Good luck!

Post a comment

Have any questions? Ask us right now!