@jthake #SPLive360
Getting Started with Microsoft Office 365 SharePoint Online
DevelopmentJeremy Thake
Chief Architect
Level: Intermediate
@jthake #SPLive360
Speaker
Jeremy Thake
Author
AvePoint Labs
Chief Architect
@jthake www.made4the.net [email protected]
@jthake #SPLive360
Agenda
• Application Development Platform• Getting Started • Sandboxed Solutions• App Model• Migrating Apps
@jthake #SPLive360
Application Development Platform
@jthake #SPLive360
Building Blocks
• Authentication & Authorization• Customization & Personalization• Branding• Disaster recovery• Availability• Site collections & Sub sites
@jthake #SPLive360
No more…
• installing SQL• configuring IIS• deploying components to server• writing service level agreements• writing disaster recovery plans
@jthake #SPLive360
List Building Blocks
• Attachments• Metadata• Versioning• Views• Full API: Web services, REST, RSS…• Security• Event Receivers• Workflow• Publishing
@jthake #SPLive360
What to worry about
• UI pattern consistency• Don’t bend it the wrong way
– If you question whether its right, it probably isn’t
• Performance considerations• Monitoring
– Resource Usage– No ULS logs, Event Viewer
@jthake #SPLive360
Getting Started
@jthake #SPLive360
Approaches
Web UI
• Web parts on pages• Site / List Settings
SharePoi
nt Designer
• Branding• Business Connectivity Services
NAPA
• Visual Studio “Lite”
Visual
Studio
2010
• Not a web browser!• Debugging
@jthake #SPLive360
Don’t work directly on Production
• Develop in Development environments!!!• Great for version 1.0, not so great for 1.1
whilst live users in environment– 24 hour SLA on recovering a site collection
• SharePoint Designer encourages this
@jthake #SPLive360
Development Environment
• Must have Visual Studio where SharePoint installed for server side development
• Use a “development” site collection in your Office 365 SharePoint 2010 Online environment– Client Object Model
• Install SharePoint 2010 locally on Windows 7
@jthake #SPLive360
Use a virtual machine
• VMWare Workstation/Sun VirtualBox on Windows 7
• HyperV on dual boot Windows Server 2008 R2/Windows 7
• HyperV on Windows 8 RC• Steal some of IT private cloud to run
one ;-)• Azure, CloudShare, fpWeb, Rackspace
@jthake #SPLive360
Visual Studio 2012
• Create Silverlight Web Parts• Publish SharePoint Solutions to Remote
SharePoint Servers• Test SharePoint Performance by Using
Profiling Tools• Create Sandboxed Visual Web Parts• Support for JavaScript Debugging and
IntelliSense for JavaScript
http://msdn.microsoft.com/en-us/library/ee290856(VS.110).aspx
@jthake #SPLive360
Development Machine
Cloud-hosted Apps dev environment
SharePoint 2013 Azure Development env
Web application
Visual Studio 2012
SQL 2012
IIS Web Server
Site Collection
Root Site
App 1 App 2 App 3
App 2Web Sites
App 2SQL
App 3Web
App 3Windows Service
App 3SQL
@jthake #SPLive360
SharePoint2007
SharePoint2010
SharePoint 2013
Services (IIS, Apache, …)
Services (Azure, IIS, Apache, …)
Services(Azure, IIS, Apache, …)
SP2007 SP2010 SP2013
Declarative Applications & Workflow Events
Custom Code
Custom Code
CSOM
_vti_bin_vti_bin
_api
_api
Evolution of customizations in SharePoint
CSOM
@jthake #SPLive360
Sandboxed solutions
@jthake #SPLive360
Sandboxed Solutions
• Restricted API due to multi-tenant environment
• No LOB: Web Services, ATOM, ODBC• No file access• Current site collection scope only• No Page object (JavaScript reg)• Deployed via Site Collection Site Settings
http://msdn.microsoft.com/en-us/library/gg615454.aspx
@jthake #SPLive360
*smile*
• Office 365 customizations• Faster deploys
– Doesn’t require IISRESET as assemblies not in GAC
• No Farm access required
@jthake #SPLive360
WARNING
• No “Full trust proxies” in Office 365• Only Site Collection Admins can activate if
managed code in packages• Site Collection Admins can deploy these!• Can use Silverlight to overcome some
restrictions
@jthake #SPLive360
TIPS
• Use Sandbox Solutions (default) as can’t use Full-Trust Solutions in SharePoint 2010 Online
• Won’t get compile time warnings on incorrect API usage, only on upload to SharePoint– Use the FxCop rules http
://o365fxcoprules.codeplex.com/
@jthake #SPLive360
Web Part example
• displayed data from a list• perform a SharePoint database query• 20 database queries = 1 resource point• displayed 20 times• site collection would have used 1
resource point of 300 points available• could be displayed 6,000 times in a 24
hour period
the sandbox is turned off until daily
reset
@jthake #SPLive360
App Model
@jthake #SPLive360
App Model scenarios
SharePoint
SharePoint Azure
Web application
IIS Web Server
Site CollectionRoot Site
App 1SP
Hosted
App 2Auto
Hosted
App 3Provider Hosted
App 2Website
s
App 2SQL
App 3Web
Sub Site
App 3Provider Hosted
App 3SQL
@jthake #SPLive360
App Versioning
SharePoint
SharePoint Azure
Web application
IIS Web Server
Site CollectionRoot Site
App 1V1.0
App 2V1.0
App 3V1.0
App 2Website
sV1.0
App 2SQLV1.0
App 3WebV1.0
Sub Site
App 3V1.0
App 2Website
sV1.1
App 2SQLV1.1
App 2Website
sV2.0
App 2SQLV2.0
App 3V1.1
App 3WebV1.1
App 3SQL
App 3SQLV1.1
@jthake #SPLive360
• Information from SharePoint
• Interaction with SharePoint
Application IFRAME
APPLICATION
@jthake #SPLive360
OAuth Authentication
SharePoint
SharePoint Azure
Web application
IIS Web Server
Site CollectionRoot Site
App 1 App 2 App 3
App 2Website
s
App 2SQL
App 3Web
Site CollectionRoot Site
App 3
App 3SQL
@jthake #SPLive360
Deployment
Model Office 365 Permissions On-Prem Permissions
SharePoint
Sandbox YES YES
Full Trust NO YES
SharePoint Hosted YES OAuth via ACS YES High-Trust (S2S)
Remote
Provider Hosted• Developer
hosts app• Could be in
Azure
YES OAuth via ACS YES High-Trust (S2S)
Auto-Hosted• App can deploy
website and SQL Azure db
• Hosted in Office 365 Azure Cloud
YES OAuth via ACS NO
@jthake #SPLive360
Compare customization models
Full trust WSP Sandboxed WSP Apps
Where does server-side code run?
Farm (w3wp.exe)Farm (User Code
Service)Anywhere but farm
Scalable Based on farm Limited Highly
Who installs and removes Farm admin Site collection admin Users
Supported in SP2013 Yes Yes Yes
SharePoint Online compatible No Yes Yes
Auto-hosting compatible No No Yes
Requires local farm for developers
Yes Yes No
Remote deployment and debugging from Visual Studio
No No Yes
@jthake #SPLive360
Migrating Apps
@jthake #SPLive360
Web UI
• Side by side windows– Site Settings– List Settings– Page content
• Windows Explorer– Document Content
@jthake #SPLive360
SharePoint Designer
• Side by side across windows– Business Connectivity Services– Web Parts– Content Types
• Copy & Paste across windows– Master Pages– Page Layouts– Workflows (no custom activities)
@jthake #SPLive360
Sandboxed Solutions
• Will work in SharePoint 2010 Online just like Standard or Enterprise
@jthake #SPLive360
Full-Trust Solutions
• APIs used• Switch to “Sandboxed” and just try it• Run FxCop against it• Change assembly target for Visual Studio
2010
@jthake #SPLive360
Custom crap!
• Remember, no access to servers AT ALL• So everything must be in Solution
Package• No manual deployment of files to file
server• We’ve been teaching you this since ‘06
@jthake #SPLive360
3rd Party Tools
• Graphical User Interface to move Site Collection artifacts and content
• Lots of players– AvePoint– Axceler– MetaVis– MetaLogix
@jthake #SPLive360
References
• Sandboxed Solutions• App Model
• Office 365 Developer Hub• NothingButSharePoint.com• Critical Path setup guide
– Configure apps in your dev environment
• SharePoint 2013 Developer site sign up
@jthake #SPLive360
Q&AJeremy Thakewww.NothingButSharePoint.com
THU 09:15
Acing Application Lifecycle Management
@jthake
www.linkedin.com/in/jeremythake