SharePoint Apps is a new concept introduced in SharePoint 2013 that invents a new way to extend the functionality of SharePoint by creating reusable and self-contains apps. A SharePoint App is basically a web application that is registered with SharePoint using an XML file that declares its basic properties called an app manifest. There are a number of SharePoint apps available online and developers are frequently creating their own.
Now, developing a SharePoint App is not the same as developing for SharePoint. There are a number of limitations that must be understood first:
- Server-side code cannot be run
- Server-side object model cannot be accessed
- Apps can be executed in the client machine or cloud
- Cannot change the standard definitions
- Not every component in SharePoint is available in a SharePoint App
- Apps are standalone and cannot execute administrative tasks
Our Experience with Creating a SharePoint App
AllianceTek recently made a SharePoint app for a mortgage client with the purpose of saving mortgage information and related documents. We began with deciding on the type of SharePoint App to make. After failing to find a way to create an autohosted app, we decided to build the app using a SharePoint-hosted app.
However, there are a number of restrictions that made development of the SharePoint App less than ideal. JQuery became problematic since jQuery is only made available to one page at a time. Since we could not create a database from SharePoint itself, we instead used lists to manage information at the backend. We then created lists to serve the needs of the database using the Contact template. But unlike in SharePoint, the Contact template did not have the option to add custom fields. We had to divulge and choose the Custom Fields List Template to create lists. Once the lists were done, we manually coded the function to update and delete records from the list. Since we could not devise a way to perform a batch update or delete, this action could only be performed with a single fetch.
Here is a summary of the issues we encountered with SharePoint App development and the alternative method we devised:
Q: How can we create an auto-hosted app for Office 365 online?
A: We created a SharePoint-hosted app instead.
Q: Was there any other alternative to managing records in the app?
A: We created custom lists in SharePoint to manage the data.
Q: How do we add custom fields to the Contact template in SharePoint?
A: We used a custom field template instead of the Contact template.
Q: How can the user update or delete batch records?
A: No answer. Currently only single records can be updated or deleted at a time.
Q: How can we add a lookup or update value in the app? Will it update on its own or do we have to write a query for that?
A: We added a lookup with manual coding. Updating values is also handled through manual coding.
Hopefully, our experience in developing SharePoint apps can benefit others who are new to SharePoint app development. We would appreciate hearing from other SharePoint app developers on their issues with dealing with these restrictions. Let us know if you devised any alternative approaches that we missed.