SharePoint 2013 introduced a ton of new features for the end user. It also brought about a lot of changes for SharePoint developers, particularly in terms of the new SharePoint App Model. I’ve been a core SharePoint developer for seven years now, through both the 2007 and 2010 releases, and so I thought it might be beneficial to share some lessons learned from my own transition from core SharePoint developer to a SharePoint 2013 app programmer.

My previous experiences with SharePoint development focused heavily on MOSS code with workflows, InfoPath, Lists, Content Types and developing front end applications using these features. I had almost no JavaScript experience, especially Async programming, and no clue what SharePoint apps are or what they look like.

My two immediate realizations when faced with SharePoint 2013 were that:

  1. I had to learn lot of new terms: SharePoint Hosted, Provider Hosted, Auto Hosted, On Prem, O365, Host web, App web and many more.
  2. Your working hand is tied behind your back and your head hurts more than ever before, because in the realm of client-side coding you have to think differently, about a 180 degree twist. It gets better after a week or two of JavaScript immersion.

For my current SharePoint 2013 project, we are using Durandal and RequireJs for creating user interface screens and the SharePoint Javascript object model (JSOM) for backend service code. You don’t need Durandal and RequireJs to do SharePoint 2013 programming, but we chose them for creating user screens as single page application. Read More…

Over the last couple months, I’ve been working on a SharePoint app in my spare time. The app, which is SharePoint hosted, requires site collection permissions and reaches back to the Host App to inspect lists and other objects to identify common issues that impact the performance of SharePoint.

One of the first things I struggled with, though, was how to access the data through the SharePoint Client Object Model in the Host Web. Every code sample out there just works with data within the app, and doesn’t try to go back to the Host Web to get the data. Since there is a security barrier between the app and the Host Web, you can’t access data in the Host Web through the client context of the app. You must retrieve the site through a special method in the SharePoint API called AppContextSite.

Read More…