SharePoint Mobile: Web Site, Native App, or Something In-Between?

One of the things we struggle with as SharePoint developers is that we have worked long and hard to master the techniques of server-side SharePoint development and keep up with the rise and fall of technologies and products like Sandbox Solutions and SharePoint Designer. We built up our portfolio of custom web parts that we could compose into solutions for our clients. Maybe we started mixing a bit of AJAX and JavaScript in there to spice up the user experience.

But then, with alarming speed, the rest of the web development world moved to rich client-side JavaScript with HTML5 and CSS3 and REST. Microsoft responded, and now the SharePoint App model is pushing our code completely off the server and we have to start to treat our JavaScript as first-class code that we need to engineer properly. It’s all been a bit of a Tsunami of change.

Another wave is coming!

Well, brace yourselves, because there’s an even bigger wave coming: Mobile is the new Web! Users now want to get their SharePoint data on mobile devices. Morgan Stanley show mobile Internet users overtaking desktop users globally in January 2014 – er, wait, so that’s already happened. And according to IDC, 87% of connected devices sold in 2017 will be tablets and smartphones. That means that as a minimum our sites need to support mobile phones and tablets. But users don’t want websites any more – they want Apps!

So what can we do? Do we need to learn how to write native apps for Windows 8, Windows Phone, Android and iOS? Can we get away with responsive websites? Or is there a middle ground? What’s the best approach?

Going native

Well, the first question to ask is whether all your users have the same device or range of devices. If that is the case you have the option of writing native apps for that platform, or using device channels to build a web experience for that specific device. But frankly, the days of telling people what device they can use and locking it down are gone for all except the highest security environments. So unless you work for an intelligence agency the chances are its “Bring Your Own Device”. There has been some talk about the problems of BYOD and how organizations are moving back to the old way, but in my view the genie is already out of the bottle and I don’t think IT departments will be able to get it back in. People love their iPhones and Android devices and increasingly (and against all the odds) Windows Phones. Building and maintaining a native app for a range of devices is prohibitively expensive unless you are in the business of selling apps.

There are a few commercial products that can help you build native apps for different platforms, either using cross-compilers or emulators. Xamarin will let you re-use your .NET skills to build apps in C# and then run them on other devices using a .NET compatible runtime. If you are already building native apps across different platforms these tools can reduce your development costs. But not enough to make the native option viable for most custom business solutions.

Responsive by design

An alternative to building a native app for each platform is to try to make a web site that looks good on mobile devices. If you go for the web approach you can use responsive design to make your site adapt to small screen sizes using CSS media queries, or you can present different HTML tailored to mobile devices based on the user-agent string.

The new Device Channels publishing feature in SharePoint 2013 has made it a lot easier to target special master pages at specific devices or categories of device. Again, the reality is likely to be a diversity of devices that need to be supported which may make this approach impractical. And while responsive web sites offer much better usability for mobile users, it still doesn’t give them an app with a native feel.

Either way, users will perceive it as a website rather than a “real” app, which has positives and negatives. This is particularly a problem on smaller devices where UI and navigation become a challenge. This is where the native style of UI components are a huge advantage and will tend to be consistent with other applications on the device. On the other hand a web site makes deployment and updating easier, but users will need a reliable connection to the server which can’t be guaranteed for mobile devices.

HTML5 hybrid apps

There is a middle ground – you can use the modern browser technology that is already in most mobile devices to build native apps using HTML5, CSS3 and JavaScript. That’s right, the same technology you are already using to build SharePoint web sites, assuming you got up to speed on the SharePoint App Model.

All you need is a very simple native app as a framework that contains a browser control. You could build this yourself, but an easier way is to use an open-source technology called Cordova. This used to be known as PhoneGap until Adobe bought the rights to the name. Cordova provides the wrapper application for your HTML5 and also a bridge to many of the hardware features of the device.

One of the big problems with cross-platform development is the range of development environments you need to maintain. So one of the benefits of Cordova is that it also provides a degree of standardization of your project structure that allows for cloud-based builds. PhoneGap Build from Adobe and AppBuilder (formerly Icenium) from Telerik are both commercial subscription services but they allow you to build for iOS and Android using their servers in the cloud. This means you don’t have to maintain a special build environment or, in the case of iOS, be forced to use Apple hardware, or learn languages like Objective C or Java.

You still have some more decisions about SPA (Single Page Application) frameworks, data-binding, UI frameworks and whether to use REST or JSOM, and the degree of customization for each class of device. That will have to wait for another blog post, or you could come to my session at ESPC14.

Decisions, decisions

So you still have a few choices when it comes to your mobile solutions. First you need to decide whether to build a website as usual and adapt it to look good on mobile devices, or whether to go for a “real” app and use the HTML5 Hybrid App approach in order to get some re-use of your existing SharePoint solutions. Unless we are in the business of selling mobile applications we can probably rule out building a fully native mobile app because of cost.

With all these rich client approaches it may seem that SharePoint itself is no more than a content storage service, or hub. But SharePoint comes with an enormous amount of functionality that makes it very good at this. The skill of the SharePoint specialist is to understand that functionality and surface the information in a useful way on whatever device the user chooses. Right now the best way of doing this at reasonable development cost, and re-using our existing skills, is the HTML5 Hybrid approach. The good news is that if you are building SharePoint solutions with HTML5 and JavaScript and using REST then you are already in a good place when it comes to building mobile apps.

Business users are starting to ask for mobile apps for SharePoint, so I am really looking forward to talking about “Delivering SharePoint to Portable Devices with Mobile Apps” at the European SharePoint Conference. Feel free to ask questions or leave a comment below, or better still come along to my conference session and let’s talk in person!

If you have any questions or feedback on Bill’s article please leave a comment below. We would love to hear from you.

SharePoint Mobile

Bill Ayers

Bill Ayers is a consultant developer and software architect who has been working on SharePoint since the 2003 version of the product, and is a Microsoft Certified Master and MCSM, SharePoint. He specializes in web content management and Intranet portals. He has over 20 years’ experience in the software industry, and speaks regularly at international conferences and user groups. He is also a moderator on SharePoint.StackExchange.com.

Share this on...

Rate this Post:

Share: