Date post: | 11-May-2015 |
Category: |
Technology |
Upload: | rob-windsor |
View: | 8,478 times |
Download: | 2 times |
About Me
• Senior SharePoint Architect with Portal Solutions
• Technical Contributor to the Pluralsight On-Demand Library
• Microsoft MVP, MCPD, MCT
• Founder and Past-President of the North Toronto .NET UG
• Co-author of Prof. Visual Basic 2012 and .NET 4.5 (Wrox)
SharePoint is a Platform
• SharePoint is a platform that sits on top of ASP.NET
• The platform provides business services
• The first step in learning SharePoint development is to get a
solid understanding the platform
This is a BIG step
It’s the same order of magnitude as getting a solid understanding of
the .NET Framework
• You need to understand the platform so you can determine
when custom development is, and is not, necessary
The goal of any SharePoint developer is to solve business problems
using the platform – that is, without custom development
SharePoint Architecture
2007 2010 2013
OS Server 2003 or 2008 Server 2008
Server 2012 (SP2)
Windows Vista or 7
Server 2008 R2 or 2012
.NET 3.0 or 3.5 3.5 SP1 4.5
Package Farm Solutions Farm Solutions
Sandbox Solutions
Farm Solutions
Sandbox Solutions *
SharePoint Apps
APIs Server OM
ASMX Services
Server OM
ASMX Services
Client OM
REST API
Server OM
ASMX Services *
Client OM
REST API
Notes:
• Operating systems for SharePoint 2010 and 2013 must by 64-bit
• Sandboxed solutions and ASMX web services have been deprecated in
SharePoint 2013
SharePoint Architecture (con’t)
Farm
Web App
Site Collection
Content Type
Web Part
Site
List
Library
SharePoint System Folders
SharePoint Database
SharePoint Editions
• SharePoint Foundation
Free
Core collaboration features and developer APIs
• SharePoint Server
Standard and Enterprise editions
Adds enterprise features valuable to mid to large size
organizations
• Office 365/SharePoint Online
Most of the collaboration features of Foundation
Some of the enterprise features of Server
Limited options for custom development
SharePoint Developer Enviroment
• SharePoint must be installed on developer
machine
Unless you only want to build Apps for Office 365
• Also have: SQL Server, Visual Studio, SharePoint
Designer, Office
• Suggested RAM requirements
SP 2010 Foundation: 2GB
SP 2010 Server: 6GB
SP 2013 Foundation or Server: 10GB+
SharePoint Developer APIs
• Server Object Model
Used by client apps running on SP server
• Client Object Models (CSOM)
Remote API
Three entry points: .NET Managed, Silverlight, JavaScript
Façade layer on top of WCF service
Uses batching model to access resources
• REST Web Services (API)
SP 2010: CRUD on list data only
SP 2013: API expanded to be more like CSOM
• SharePoint Web Services
“Legacy” SOAP-based web services
Package Models
• Farm Solutions
Full access to Server Object Model
Files deployed to SharePoint server file system
• Sandboxed Solutions
Access to a subset of the Server Object Model
Files deployed to SharePoint content database
Code executes in isolated worker process
• SharePoint Apps
No access to Server Object Model
Code executes on client or on remote server
Deployment location depends on App type
DEMO Building a Solution
Features and Elements
• SharePoint component model
• Define logical units of functionality
• Contain elements e.g. menu items, links, list types and list instances
Many other element types possible
• Support activation/deactivation by end-users and administrators Activation scoped to: Farm, Web Application, Site, or
Web
Events raised during activation and deactivation
User’s View of Features
• Features support concept of activation and deactivation
Feature Manifest
• Features defined in using Collaborative Application
Markup Language (CAML)
<Feature Id="B2CB42E2-4F0A-4380-AABA-1EF9CD526F20" Title="A Sample Feature: Hello World" Description=“This is a hand crafted Feature manifest" Scope="Web" Hidden="FALSE" xmlns="http://schemas.microsoft.com/sharepoint/"> <ElementManifests> <ElementManifest Location="elements.xml" /> </ElementManifests> </Feature>
Element Manifest
• This element defines a Site Actions menu item
• There are many other types of elements
<Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <CustomAction Id="SiteActionsToolbar" GroupId="SiteActions" Location="Microsoft.SharePoint.StandardMenu" Sequence="100" Title="Hello World" Description="A custom menu item added using a feature" ImageUrl="_layouts/images/crtsite.gif" > <UrlAction Url="http://msdn.microsoft.com"/> </CustomAction> </Elements>
Solution Packages
• Work done in Visual Studio packaged into a
solution for deployment
• Package is a CAB file with a WSP extension
• Package contains manifest with deployment
instructions
• Two types of solutions:
Farm solutions
Sandboxed solutions
DEMO Revisit the Project
What is the App Model?
• New development/deployment/hosting model for
extensions to Office and SharePoint
• Conceptually similar to apps for phones/tablets
Find / Try / Buy concept
Public and private App stores (catalogs)
Apps for SharePoint are self-contained pieces of
functionality that extend the capabilities of a SharePoint
website. Apps integrate the best of the Web and SharePoint;
they are targeted and easy-to-use, and do a great job at
solving a user need.
App Characteristics
• All custom code executes outside SharePoint
JavaScript in client browser
.NET (or other) code on external server
Code communicates with SharePoint via web services
• Apps have identity and permissions
App requests permissions when installed
Permissions have both scope and rights
App permissions are independent of user permissions
App Experiences
• Full Page
All apps must have a full page experience
• App Part
UI from full-page experience can be added to
SharePoint pages like a web part
Hosted in an IFrame
• Custom Actions
Can add options to ribbon or menus
App Hosting
• SharePoint Hosted
App hosted in SharePoint farm
• Externally Hosted
Also known as Developer, Provider or Cloud Hosted
App hosted in website external to SharePoint
Can be implemented using any Web technology
• Hybrid
App could a combination of two hosting models above
• Auto-Hosted
SharePoint Online and Azure
• Services
App support depends on two service applications
App Management and Site Subscription Management
SharePoint Hosted App Isolation
• Apps are isolated from the SharePoint site that hosts
them and from other Apps
• The SharePoint site where you install an App is called the
Host Web
• The SharePoint site where the App is deployed is called
the App Web
Lives in an isolated domain on SharePoint farm
Base URL is partially generated, partially configured
• Example: Host Web: www.contoso.com/sites/demo
App Name: Test
App Web: app-bdf2016ea7dacb.apps.contoso.com/sites/demo/Test
SharePoint Hosted App Capabilities
• Cannot use server-side code
• Can create many SharePoint elements
Lists, fields, content types, etc.
• Can provision content pages
Pages can use ASP.NET and SharePoint controls
No code-behind
• Elements and Pages provisioned in App Web
• Can only communicate with Host Web if granted
permissions
Communicate with Host Web using CSOM or REST
App Development Tools
• “Napa”
SharePoint App that enables App development
Only requires a browser
Designed for leaning and prototyping
• Visual Studio 2012
App development tools require download
Tools are still in Beta (Preview 2)
DEMO Building an App
Thank You
• Big thanks to the organizers, sponsors and you for making
this event possible
• Please fill out your evaluation
• Please keep in touch
@robwindsor
msmvps.com/blogs/windsor