Microsoft SharePoint 2010
Overview of SharePoint Development & Management ToolsSandboxed Solutions, Visual Studio 2010 Feature, Package & Deployment DesignerDeveloping Web Parts
• Overview of SharePoint 2010 Development & Management Tools
• Sandboxed Solutions• Visual Studio 2010 Feature, Package and
Deployment Designer• Developing Web Parts• Hands-on-Lab: Building Visual Web Part – C#
Agenda
Overview of SharePoint 2010 Development & Management
Tools
Development Tools
• Visual Studio 2010• MS Visio 2010• SharePoint Designer to some extent
Visual Studio 2010• Visual Studio Project Templates– Sequential Workflow– State Machine Workflow– Event Receiver– Modules (Files)– Business Connectivity Services Model– Content Type– List Definition– Site Definition– Visual Web Part– Import SharePoint Solution (WSP) Package– Import Reusable Workflow
Visual Studio 2010• Visual Studio Item Templates– List Instance– Web Part– Application Page– Workflow Association Page– Workflow Instantiation Page– Global Resource
Visual Studio 2010
Developer Dashboard
LINQ-To-SharePoint• Entity based programming
– Strong Types and Intellisense
• Supports List Joins and Projections– Join lists on lookup field between them– Join multiple lists (A->B->C)– Project any field from joined list in a query without changes in
list schema• Example– from o in data.Orders
where o.Customer.City.Name == "London“
select o;
Client Object Model• Simple API to Add, Retrieve, Update
and Manage Data in SharePoint• Commands batched for Performance
.NET CLR.NET CLR Silverlight Silverlight CLRCLR JavaScriptJavaScript
ConsistentConsistent EfficientEfficient
SharePoint DataSharePoint Data
Visio 2010
Visio 2010
Management Tools
• Central Administration• STSADM• PowerShell• SharePoint Designer 2010
STSADM
PowerShell
PowerShell
• Is a command-line scripting tool that provides an administrator:– full access to applicable application programming
interfaces (APIs)– ability to interact directly with SharePoint 2010
Products to manipulate Web applications, site collections, sites, lists etc.
– ability to script cmdlets
PowerShell• Show the commands available via SharePoint
2010 Management Shell
Sandboxed solutions
Solutions - Changes
• Two types of solutions– Farm solutions
• Features deployed to front end
– Sandboxed solutions• End-user submitted solution• Features deployed to database – usable in site collection level
• Solution dependencies• Upgrade infrastructure to support life cycle
management of deployed functionalities
Solution deployment options
• Full trust deployment– Local deployment only– More or less the same as in 2007
• Sandboxed solution deployment– Deployed to a specific site collection
by site collection administrators– Code runs in a rights-restricted process
with limited CAS permissions– Server resource usage is monitored against
a quota managed by the service administrators
Sandbox Setup and Deployment
• Start on selected server to run sandbox processes
Site Collection Administration
• Solution Gallery -- _catalogs/solutions• Empower SC Admins
Sandbox ArchitectureFRONT ENDFRONT END User Code ServerUser Code Server
Visual Studio 2010 Feature, Package and Deployment Designer
SharePoint 2010 Project Structure
• Standard Project Nodes– Properties– References
• SharePoint 2010 Nodes– Features– Package– SharePoint Project Items (SPI)– Mapped Folders
Feature Node and Feature Designer• Feature node contains one or more features
– Customize feature properties in designer and/or property grid– Use Context menu of Feature node to add feature event receiver and
feature resource files– Feature designer allows adding/removing SPIs– Customize feature activation dependencies– Feature designer provides design mode and XML text Mode
Project Packaging• Project Packaging Designer
– Modify package properties using property grid– Designer allows you to add/remove features and SPIs– Modify package properties with designer or XML
Mapped Folders• Mapped Folders used to deploy to SharePointRoot
– Layouts folder maps to virtual path /_layouts– Images folder maps to virtual path /_layouts/images– You can map other folders inside SharePointRoot directory
• Layouts folder key to creating application pages– Best practice to create solution-specific folder inside Layouts
Deployment Options• Two Deployment configuration by default– Default– No Activation
Developing Web Parts
Two Types of Web Parts
• Visual Web Part– Allows to drag & drop controls
• Standard ASP.NET Web Part– Allows to build a logic of the web part embedded
into class file
Visual Web Part
Visual Web Part
Standard ASP.NET Web Part
Standard ASP.NET Web Part
Hands-on-Lab