Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Hdv309 - Real World Sandboxed Solutions
1. This session runs on code available at http://bit.ly/SC12Sandbox
Real World Sandboxed
Solutions
Wouter van Vugt
wouter@code-counsel.net
@woutervugt
http://woutersdemos.codeplex.com
http://blogs.code-counsel.net/wouter
2. What you will learn
• The right approach to sandbox
development
• The intricacies of the sandbox
– Choice of Client or server side code
– Limits in the available APIs
– Known issues
3. What you will get
• Visit http://bit.ly/SC12Sandbox
Visual Studio 2010
4. From 0 to 100
Setup a Visual Studio project
Build the feature structure
Define the web template
Make it locally installable
Structure the data
Add chrome
Apply business logic
...
6. 2) Define activation structure
Web Template
Template Feature
Site Web
Feature Feature
• Root Features visible
• Activation dependencies for ordering
of content activation ... Core Lists
• Web template for one click activation
of a new site
• Web template for declarative
configuration ... ...
• Masterpage
• CSS
• Script
7. 3) Local installation
• Load SharePoint Snapin
• Build the project with MSBuild
• Delete the old test site
collection
• Create a new test site
collection
• Upload the solution package
• Activate the solution package
• Apply the site template
• Install sample data
8. 4) Defining the data structure
Fields Content Types List Templates Lists
• Lookup fields can be created
declaratively
• Content Type Inherits attribute
works differently in sandbox
• <ContentTypeRef> in list
templates will not work