Sharing the goodness…
Beth Massi is a Senior Program Manager on the Visual Studio team at Microsoft and a community champion for business application developers. Learn more about Beth.
More videos »
I’ve dabbled in SharePoint 2010 development in the past by using Visual Studio. In fact, I wrote a fair share of articles and samples about it. However I’ve been slacking when it comes to really learning the new app model in SharePoint 2013. I’ve got a good understanding of the architecture, have played with Napa a little, but I just haven’t really had the time to dig into the details, get dirty, and build some real SharePoint apps.
Luckily, one of my favorite products has come to save me! In the latest LightSwitch Preview, we have the ability to enable SharePoint 2013 on our LightSwitch projects. This gives us access to SharePoint assets as well as handling the deployment of our application into the SharePoint app catalog. In no time you can create a business app using the LightSwitch HTML client, deploy it to SharePoint 2013, and run it from a variety of mobile devices.
So why would you want to deploy a LightSwitch app to SharePoint? I mean, I can just host this app on my own or in Azure, right? Yes, you can still host LightSwitch apps yourself, however, enabling SharePoint in your LightSwitch apps allows you to take advantage of business data and processes that are already running in SharePoint in your enterprise. Many enterprises today use SharePoint as a portal of information and applications while using SharePoint’s security model to control access permissions. So with the new SharePoint 2013 apps model, this makes running LightSwitch applications from SharePoint / Office 365 very compelling for many businesses.
The easiest way to get started is to sign up for a free Office 365 Developer account. Head to dev.office.com to get started. When you sign up, you’re required to supply a subdomain of .onmicrosoft.com and a user ID. After signup, you use the resulting user ID (i.e. email@example.com) to sign in to your portal site where you administer your account. Your SharePoint 2013 Developer Site is provisioned at your new domain: http://yourdomain.onmicrosoft.com.
You can see your developer site by selecting SharePoint under the Admin menu on the top of the page. This will list all your site collections. Make sure you use this developer site for your LightSwitch apps otherwise when you debug your application you will get an error “Sideloading of apps is not enabled on this site.”
In order to get LightSwitch SharePoint & HTML functionality, you’ll need to have Visual Studio 2012 Update 2 installed.
Install: Microsoft LightSwitch HTML Client for Visual Studio 2012
Now you’re ready to build an app! We’ve got a tutorial that walks you through building a survey application using LightSwitch that runs in SharePoint. I encourage you to give it a try, it should take under an hour to complete the tutorial, and in the end you’ll have a fully functional modern app that runs on a variety of mobile devices.
LightSwitch SharePoint Tutorial
This tutorial demonstrates how LightSwitch handles the authentication to SharePoint using OAuth for you. It also shows you how to use the SharePoint client object model from server code, as well as writing WebAPI methods that can be called from the HTML client. Check out my finished SharePoint app! (click images to enlarge)
If you’ve got questions and/or feedback, please head over to the LightSwitch Forum and let the team know.
This is great application I am using, now I am a fan of light switch
Got it working. Very nice app. Thanks for your help, Beth (and Chris Rummel on the forums with my WCF issue)
Tutorial does not say how to run it and zip file link is broken. No binaries included in download either. Projedt will not build. Not a good show guys!
The ZIP link on the sample works for me. Here's the direct link: code.msdn.microsoft.com/.../LightSwitchSurveyApplicationTutorial.zip
No there are no binaries. The walkthrough is meant to be completed by you on your own Office 365/SharePoint site. Once you complete the walkthrough then you will have a deployable project.