Note: This post makes reference to my employment activities at IBM, please see the Disclaimer.
In my professional capacity I spend most of my time working in product management at IBM for a product called IBM Cognos Disclosure Managment. Long story short, it’s a windows application that embeds Microsoft Office and allows users to collaborate on creating large documents by breaking the document down into “objects” with security and workflow. It also connects to various data sources and can embed/refresh the data in said objects. Since it integrates with desktop Office, there’s always been talk of somehow creating a browser version. When Microsoft released OWA (Office Web Apps) Server, I thought I’d play around with it.
Note that OWA server is a totally stand alone re-distributable instance of the exact same technology that runs Office 365 (or whatever Microsoft is calling it these days). Everything is being hosted locally, no content is flowing through Microsoft servers at any point.
Step One: Installing OWA Server
This took a fair bit of time just to provision the environment.
- Must be installed on Windows Server (I used 2012)
- Server must be joined to a domain (no idea why)
- Nothing else “server-y” may be installed like SQL Server.
Anyway, I used these two documents to get me there:
Step Two: Open a Document
Not as easy as it sounds. Actually installing the server doesn’t get you anything. There’s no URL to navigate to where you can just open a file, you have to implement a WOPI (Web Application Open Platform Interface) web service to provide information about documents that OWA can actually open. Fine, I used these two documents to get me most of the way there:
Building an Office Web Apps (OWA) WOPI Host
If I remember rightly this didn’t actually get me all the way there. I had to do a fair bit of debugging on the OWA server, this article describes where the logs are. They are very verbose, so I just searched for “error” and “exception”. Also you’ll need to understand what ASP.NET Web API is.
Step Three: Integrate with CDM
I decided to write an MVC 4 web application that would simply talk to the CDM application server on it’s existing web service endpoints. Since CDM already has a desktop client, I thought this should look like a mobile app, luckily MVC4 has some really nice and easy routes to building a mobile app.
The toughest part for me was actually coming to grips with MVC’s “fuzzy” routing. I found this routing debugger to be insanely helpful, remember, the order that you set up your routes in matters! That one caused me to tear my hair out for a few hours.
Step Four: Profit?
Here’s a quick video of the app in action, running inside Chrome emulating a Nexus 5.