<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>The SharePoint Guys</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/uksharepoint/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/uksharepoint/feed.xml</link>
    <description>The blog of the SharePoint Guys from Microsoft Consulting Services, UK.</description>
    <lastBuildDate>Sat, 04 Apr 2015 02:17:13 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Luke Bailey</title>
      <link>https://docs.microsoft.com/archive/blogs/uksharepoint/luke-bailey</link>
      <pubDate>Fri, 16 Aug 2013 06:41:26 GMT</pubDate>
      <dc:creator><![CDATA[Luke Bailey]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/uksharepoint/2013/08/16/luke-bailey/</guid>
      <description><![CDATA[Luke&nbsp;Bailey is a recent&nbsp;graduate from the University of York with an MEng in Electronic...]]></description>
      <content:encoded><![CDATA[<p><span style="font-size: small;" lang="en-gb"><span style="color: #000000; font-family: Arial;">Luke&nbsp;Bailey is a recent&nbsp;graduate from the University of York with an MEng in Electronic Engineering. He is&nbsp;now&nbsp;an Associate Consultant at Microsoft Consulting Services. Having previously working in the film industry, Luke&nbsp;now specialises in SharePoint and Enterprise Social with a strong focus on&nbsp;empowering businesses to reach their potential through Microsoft technologies.</span></span></p>
<p><span style="font-size: small;" lang="en-gb"><span style="color: #000000; font-family: Arial;"><span style="font-size: x-small;"><a href="https://twitter.com/lkbail">Twitter</a></span></span></span></p>
<p><span style="font-size: small;" lang="en-gb"><span style="color: #000000; font-family: Arial;"><span style="font-size: x-small;"><a href="https://www.linkedin.com/in/lkbail">LinkedIn</a></span></span></span>&nbsp;</p>
<p><span style="font-size: small;" lang="en-gb"><span style="color: #000000; font-family: Arial;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/16/10/0523.Profile%20Picture.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-16-10/0523.Profile-Picture.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/16/10/0523.Profile%20Picture.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/200x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-16-10/0523.Profile-Picture.jpg" alt="" border="0" /></a></span></span></p>]]></content:encoded>
    </item>
    <item>
      <title>Scripted Installation of SharePoint 2013 and Office Web Apps Server – From the Field (Part 4)</title>
      <link>https://docs.microsoft.com/archive/blogs/uksharepoint/scripted-installation-of-sharepoint-2013-and-office-web-apps-server-from-the-field-part-4</link>
      <pubDate>Tue, 06 Aug 2013 01:51:00 GMT</pubDate>
      <dc:creator><![CDATA[Luke Bailey]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/uksharepoint/2013/08/06/scripted-installation-of-sharepoint-2013-and-office-web-apps-server-from-the-field-part-4/</guid>
      <description><![CDATA[This is fourth post in the scripted installation of SharePoint 2013 and Office Web Apps Server blog...]]></description>
      <content:encoded><![CDATA[<p>This is fourth post in the scripted installation of SharePoint 2013 and Office Web Apps Server blog series, covering the installation, deployment and configuration of an Office Web Apps Server Farm</p>
<p>For SharePoint farm topology, installation and provisioning of all required service applications please see blog one, two and three of this series.</p>
<ol>
<li><a href="https://blogs.msdn.com/b/uksharepoint/archive/2012/12/07/scripted-installation-of-sharepoint-2013-and-office-web-application-components-from-the-field-part-1.aspx">Farm Topology and Prerequisites</a></li>
<li><a href="https://blogs.msdn.com/b/uksharepoint/archive/2013/03/18/scripted-installation-of-sharepoint-2013-and-office-web-apps-server-from-the-field-part-2.aspx">SharePoint Installation, Configuration and Basic Service Applications Deployment</a></li>
<li><a title="User Profile, Search and Distributed Cache Service Applications Deployment" href="https://blogs.msdn.com/b/uksharepoint/archive/2013/05/24/scripted-installation-of-sharepoint-2013-and-office-web-apps-server-from-the-field-part-3.aspx">User Profile, Search and Distributed Cache Service Applications Deployment</a></li>
<li><strong>Office Web Apps Server farm Implementation and Configuration</strong></li>
</ol>
<div><strong><br /></strong></div>
<h2>OWA Overview</h2>
<p>Office Web Apps is the online companion to Office Word, Excel, PowerPoint, and OneNote applications. It enables users to view and edit documents through a browser by providing a representation of an Office document. A SharePoint 2013 farm can be configured to use the Office Web Apps Server farm and provide Office Web Apps functionality to users who create or open Office files from SharePoint libraries.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/16/10/1602.SharePoint%20Topology.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-16-10/1602.SharePoint-Topology.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/16/10/1602.SharePoint%20Topology.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-16-10/1602.SharePoint-Topology.jpg" alt="" border="0" /></a></p>
<p>Office Web Apps (OWA) Server supports two primary installation scenarios: a single-server Office Web Apps Server farm, and a multi-server load-balanced Office Web Apps Server farm. For this blog series, continuing with the desire for high availability, OWA will be implemented in a two-server load-balanced mode, utilising the same hardware load balancing solution as the SharePoint web front end servers. The OWA traffic will be encrypted and the solution will be implemented over HTTPS. The OWA Server will not run any other server applications including Exchange Server, SharePoint Server, Lync Server, and SQL Server. Also no other services or roles that depend on the Web Server (IIS) role on port 80, 443, or 809&nbsp;should be installed on the OWA servers, as OWA Server periodically removes web applications&nbsp;For this blog series,&nbsp;</p>
<h2>Prerequisites and Assumptions</h2>
<ol>
<li>Ensure that ports 443 (HTTPS traffic), 80 (HTTP traffic) and 809 (private traffic between the servers that run Office Web Apps Server in the farm) are not blocked by firewalls on the two Office Web Apps Servers.</li>
<li>All Office Web App servers have an additional drive to host Data and Log flies.</li>
<li>Copy the <strong>OWAScripts.zip </strong>to the&nbsp;E:\Install\scripts directory.</li>
<li>Download and mount the OWA installation media ISO to drive D:\ on both servers</li>
<li>The two OWA servers have Windows Server 2012 installed and are called OWA1 and OWA2 respectively</li>
</ol>
<div>
<h2>Request an Internal SSL Certificate</h2>
<p>The internal URL used to provision the certificate is <strong>officeweb.sharepoint.company.com </strong>&nbsp;</p>
<p>Ensure that the certificate meets the following requirements:</p>
<ul>
<li>The certificate must come from a trusted Certificate Authority (CA) and include the fully qualified domain name (FQDN) of the Office Web Apps Server farm in the SAN (Subject Alternative Name) field (if the FQDN is not in the SAN when you try to use the certificate, the browser will either show security warnings or won&rsquo;t process the response).</li>
<li>The certificate must have an exportable private key.</li>
<li>The Friendly name field must be unique within the Trusted Root Certificate Authorities store (OfficeWeb).</li>
<li>The FQDN in the SAN field must not begin with an asterisk (*).</li>
<li>The certificate properties and extensions do not matter. Office Web Apps Server requires no particular certificate property or extension</li>
<li>The FQDN of the certificate resolves to the IP address assigned to the load balancer for the Office Web Apps Server farm.&nbsp;</li>
</ul>
<p>The SSL offloading is set to off by default as part of the setup. When SSL is offloaded, it allows each Office Web Apps Server in the farm to communicate by using HTTP with the load balancer. However, all references to resources in the HTML are HTTPS references. If this is not set and HTTP is used, users will not be able to see resources or they will see security warnings. When offloading is set to off, SSL terminates at the individual servers that run Office Web Apps Server instead of the hardware load balancer.</p>
<p>The SSL will be terminated at the load balancer instead, due to the following advantages:</p>
<ul>
<li>Simplified certificates management</li>
<li>Improved soft affinity</li>
<li>Improved performance</li>
</ul>
<div>
<h2>Install Windows Roles and Features</h2>
<p>Execute the following PowerShell script to install the required windows components on both servers followed by a server restart:</p>
<div>
<pre class="scroll"><code class="js">Import-Module ServerManager<br />Add-WindowsFeature Web-Server,Web-Mgmt-Tools,Web-Mgmt-Console,Web-WebServer,Web-Common-Http,Web-Default-Doc,Web-Static-Content,Web-Performance,Web-Stat-Compression,Web-Dyn-Compression,Web-Security,Web-Filtering,Web-Windows-Auth,Web-App-Dev,Web-Net-Ext45,Web-Asp-Net45,Web-ISAPI-Ext,Web-ISAPI-Filter,Web-Includes,InkandHandwritingServices</code></pre>
<pre class="scroll"><code class="js"><br /></code></pre>
</div>
<h2>Install Office Web Apps Server</h2>
<p>Launch the installation from mounted ISO image on both servers and define the installation location as illustrated below:</p>
<p><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/16/10/8372.werwe.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-16-10/8372.werwe.png" alt="" border="0" /></p>
<p>&nbsp;</p>
<h2>Create the Office Web Apps Server Farm</h2>
<p>Validate the following variables defined in the WAC_ConfigureOWAFarm.xml using the following table:</p>
<br />
<table summary="OWA Configuration Options" border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="123">
<p><span style="font-size: x-small;"><strong>Variable</strong></span></p>
</td>
<td valign="top" width="170">
<p><span style="font-size: x-small;"><strong>Value</strong></span></p>
</td>
<td valign="top" width="307">
<p><span style="font-size: x-small;"><strong>Description</strong></span></p>
</td>
</tr>
<tr>
<td valign="top" width="123">
<p><span style="font-size: x-small;"><strong>CacheLocation</strong></span></p>
</td>
<td valign="top" width="170">
<p><span style="font-size: x-small;">E:\Program Files\Microsoft\OfficeWebApps\Working\d\</span></p>
</td>
<td valign="top" width="307">
<p><span style="font-size: x-small;">Specifies the location of the global disk cache that is used to store rendered image files. The default location is%programdata%\Microsoft\OfficeWebApps\Working\d\.</span></p>
</td>
</tr>
<tr>
<td valign="top" width="123">
<p><span style="font-size: x-small;"><strong>CacheSizeInGB</strong></span></p>
</td>
<td valign="top" width="170">
<p><span style="font-size: x-small;">50</span></p>
</td>
<td valign="top" width="307">
<p><span style="font-size: x-small;">Specifies the maximum size of the global disk cache in gigabytes</span></p>
</td>
</tr>
<tr>
<td valign="top" width="123">
<p><span style="font-size: x-small;"><strong>CertificateName</strong></span></p>
</td>
<td valign="top" width="170">
<p><span style="font-size: x-small;">&lt;INSERT FRIENDLY NAME&gt;</span></p>
</td>
<td valign="top" width="307">
<p><span style="font-size: x-small;">Specifies the friendly name of the certificate that Office Web Apps Server uses to create HTTPS bindings.</span></p>
<p><span style="font-size: x-small;">In the production environment it is not a requirement to specify the CertificateName parameter as the SSLOffloaded parameter is being used and the certificates are installed on the load balancer</span></p>
</td>
</tr>
<tr>
<td valign="top" width="123">
<p><span style="font-size: x-small;"><strong>EditingEnabled</strong></span></p>
</td>
<td valign="top" width="170">
<p><span style="font-size: x-small;">True</span></p>
</td>
<td valign="top" width="307">
<p><span style="font-size: x-small;">Enables support for editing in the browser</span></p>
</td>
</tr>
<tr>
<td valign="top" width="123">
<p><span style="font-size: x-small;"><strong>InternalURL</strong></span></p>
</td>
<td valign="top" width="170">
<p><span style="font-size: x-small;">https:// officeweb.&lt;FQDN&gt;</span></p>
</td>
<td valign="top" width="307">
<p><span style="font-size: x-small;">Specifies the URL root that SharePoint use to access the Office Web Apps Server farm</span></p>
</td>
</tr>
<tr>
<td valign="top" width="123">
<p><span style="font-size: x-small;"><strong>LogLocation</strong></span></p>
</td>
<td valign="top" width="170">
<p><span style="font-size: x-small;">E:\Program Files\Microsoft\OfficeWebApps\Data\Logs\ULS\<strong></strong></span></p>
</td>
<td valign="top" width="307">
<p><span style="font-size: x-small;">Specifies the location on the local computer where activity logs are stored.</span></p>
</td>
</tr>
<tr>
<td valign="top" width="123">
<p><span style="font-size: x-small;"><strong>LogRetentionInDays</strong></span></p>
</td>
<td valign="top" width="170">
<p><span style="font-size: x-small;">30</span></p>
</td>
<td valign="top" width="307">
<p><span style="font-size: x-small;">Specifies the number of days that log entries are stored. Log entries older than the configured date are trimmed.</span></p>
</td>
</tr>
<tr>
<td valign="top" width="123">
<p><span style="font-size: x-small;"><strong>MaxMemoryCacheSizeInMB</strong></span></p>
</td>
<td valign="top" width="170">
<p><span style="font-size: x-small;">5000</span></p>
</td>
<td valign="top" width="307">
<p><span style="font-size: x-small;">Specifies, in megabytes, the maximum amount of memory that the rendering cache can use.</span></p>
</td>
</tr>
<tr>
<td valign="top" width="123">
<p><span style="font-size: x-small;"><strong>RenderingLocalCache</strong><strong>Location</strong></span></p>
</td>
<td valign="top" width="170">
<p><span style="font-size: x-small;">E:\Program Files \Microsoft\OfficeWebApps\Working\waccache</span></p>
</td>
<td valign="top" width="307">
<p><span style="font-size: x-small;">Specifies the location of the temporary cache for use by the Word and PowerPoint Viewing Services.</span></p>
</td>
</tr>
<tr>
<td valign="top" width="123">
<p><span style="font-size: x-small;"><strong>SSLOffloaded</strong></span></p>
</td>
<td valign="top" width="170">
<p><span style="font-size: x-small;">True</span></p>
</td>
<td valign="top" width="307">
<p><span style="font-size: x-small;">Indicates to the servers in the Office Web Apps Server farm that SSL is offloaded to the load balancer. When SSLOffloaded is enabled, web applications are bound to port 80 (HTTP) on the local server. However, HTML that references other resources, such as CSS or images, uses HTTPS URLs for those references.</span></p>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>Login to the first OWA server (OWA1) and launch <strong>PowerShell</strong> as administrator. Execute the following command to create the OWA farm:</p>
<div>
<pre class="scroll"><code class="js">Set-ExecutionPolicy Unrestricted &ndash;force <br />E:\Install\scripts\WAC_ConfigureOWAFarm.ps1 -configLocation E:\Install\scripts\WAC_ConfigureOWAFarm.xml</code></pre>
<pre class="scroll"><code class="js"><br /></code></pre>
</div>
<h2>Join Server to the Office Web Apps Farm</h2>
<p>Login to &nbsp;the second OWA server (OWA2) and launch <strong>PowerShell</strong> as administrator. Execute the following command to join the server to the farm:&nbsp;</p>
<div>
<pre class="scroll"><code class="js">Set-ExecutionPolicy Unrestricted &ndash;force <br />Import-Module OfficeWebApps <br />New-OfficeWebAppsMachine &ndash;MachineToJoin OWA1.&lt;FQDN&gt; -Confirm:$false</code></pre>
<pre class="scroll"><code class="js"><br /></code></pre>
</div>
<h2>Create SharePoint Binding</h2>
<p>Login to the SharePoint Application Server hosting the Central Administration site and launch <strong>SharePoint Management Shell</strong> as administrator. Execute the following command to start consuming WAC service:&nbsp;</p>
<div>
<pre class="scroll"><code class="js">WACServer = "officeweb.&lt;FQDN&gt;"<br />$WOPIZone = "internal-https" <br /> <br />#Configure SP Farm to OWA Farm<br />New-SPWOPIBinding -ServerName $WACServer <br /> <br />#Set the WOPI Zone<br />Set-SPWOPIZone &ndash;zone $WOPIZone<br />Get-SPWopiZone <br /> <br />$config = (Get-SPSecurityTokenServiceConfig)<br />$config.AllowOAuthOverHttp = $true<br />$config.Update()</code></pre>
</div>
</div>
</div>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Components.PostAttachments/00/10/43/96/40/OWAScripts.zip" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-43-96-40/OWAScripts.zip">OWAScripts.zip</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Scripted Installation of SharePoint 2013 and Office Web Apps Server – From the Field (Part 3)</title>
      <link>https://docs.microsoft.com/archive/blogs/uksharepoint/scripted-installation-of-sharepoint-2013-and-office-web-apps-server-from-the-field-part-3</link>
      <pubDate>Thu, 23 May 2013 16:50:00 GMT</pubDate>
      <dc:creator><![CDATA[Ashkan Jabbari]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/uksharepoint/2013/05/23/scripted-installation-of-sharepoint-2013-and-office-web-apps-server-from-the-field-part-3/</guid>
      <description><![CDATA[This is third post in the Scripted Installation of SharePoint 2013 and Office Web Apps Server blog...]]></description>
      <content:encoded><![CDATA[<p>This is third post in the Scripted Installation of SharePoint 2013 and Office Web Apps Server blog series, covering the following service applications deployment:</p>
<ul>
<li>User Profile</li>
<li>Search</li>
<li>Distributed Cache</li>
</ul>
<p>For SharePoint farm topology, installation and provisioning of the basic service applications please see blog one and two of this series.</p>
<ol>
<li><a href="https://blogs.msdn.com/b/uksharepoint/archive/2012/12/07/scripted-installation-of-sharepoint-2013-and-office-web-application-components-from-the-field-part-1.aspx">Farm Topology and Prerequisites</a></li>
<li><a href="https://blogs.msdn.com/b/uksharepoint/archive/2013/03/18/scripted-installation-of-sharepoint-2013-and-office-web-apps-server-from-the-field-part-2.aspx">SharePoint Installation, Configuration and Basic Service Applications Deployment</a></li>
<li><strong>User Profile, Search and Distributed Cache Service Applications Deployment</strong></li>
<li>Office Web Apps Server farm Implementation and Configuration</li>
</ol>
<h2>Prerequisites and Assumptions</h2>
<ul>
<li>Please download and extract the <a title="attached files" href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Components.PostAttachments/00/10/42/10/29/SPServices.zip" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-42-10-29/SPServices.zip" target="_blank">attached files</a> onto a local directory on each SharePoint Server. For the purposes of this blog the directory is suggested to be: E:\Scripts\Install.</li>
<li>From the downloaded files, update the SPUserProfile.xml file with environment specific information such as, SQL server alias name, service account details, database name, service application name, etc. This will be self-explanatory once you open the file.</li>
<li>Also update the SPSearchService.xml file with environment specific information such as, SQL server alias name, service account name and password, database name, service application name, Index Location, etc.</li>
</ul>
<h2>Configure Distributed Cache</h2>
<p>The Distributed Cache service can be deployed in two modes: dedicated mode or collocated mode. In dedicated mode, all services other than the Distributed Cache service are stopped on the application server that runs the Distributed Cache service. In collocated mode, the Distributed Cache service runs together with other services on the application server. Dedicated mode is the recommended mode in which to deploy the Distributed Cache service if the total number of users exceed 10,000.</p>
<p>When more than one server is used for Distributed Cache, all the servers must have the same cache size configured.</p>
<p>Please see <a href="https://technet.microsoft.com/library/jj219572(office.15).aspx">Planning for Distributed Cache service in SharePoint Server 2013</a> for more information.</p>
<p><strong>Provision Distributed Cache Service in dedicated mode:</strong></p>
<p>Launch <strong>SharePoint Management Shell</strong> as administrator and execute the following PowerShell script on all Application, Search and Web Application Servers (all servers <strong><span style="text-decoration: underline;">apart from</span></strong> Distributed Cache servers SPDCache01 and SPDCache02) to remove them from the Distributed Cache cluster and stop the services:</p>
<div>
<pre class="scroll"><code class="cplusplus"> $instanceName ="SPDistributedCacheService Name=AppFabricCachingService" <br /> $serviceInstance = Get-SPServiceInstance | ? {($_.service.tostring()) -eq $instanceName -and ($_.server.name) -eq $env:computername} <br /> $serviceInstance.Unprovision() <br /> Stop-SPDistributedCacheServiceInstance -Graceful <br /> Remove-SPDistributedCacheServiceInstance </code></pre>
</div>
<p><strong>Change the Memory Allocation of the Distributed Cache Service</strong></p>
<p>When SharePoint Server 2013 is installed, it assigns the Distributed Cache service 10 percent of the total memory on the server. It is recommended to allocate sufficient amount of memory on each Distributed Cache server. Please see <a href="https://technet.microsoft.com/en-us/library/jj219613.aspx#memory">Change the memory allocation of the Distributed Cache service</a> to calculate how much memory can be assigned to the Distributed Cache service. It is important to note that the allocated memory on each server should not exceed 16 GB.</p>
<p>Use the following procedure to update the memory allocation accordingly:</p>
<p>Launch <strong>SharePoint</strong> <strong>Management Shell</strong> as Administrator on SPDCache01 and SPDCache02 and run the following scripts:</p>
<p>Stop the Distributed Cache service:</p>
<div>
<pre class="scroll"><code class="cplusplus"> $instanceName ="SPDistributedCacheService Name=AppFabricCachingService" <br /> $serviceInstance = Get-SPServiceInstance | ? {($_.service.tostring()) -eq $instanceName -and ($_.server.name) -eq $env:computername} <br /> $serviceInstance.Unprovision() </code></pre>
</div>
<p>Reconfigure the cache size of the Distributed Cache service:</p>
<div>
<pre class="scroll"><code class="cplusplus"> Update-SPDistributedCacheSize -CacheSizeInMB 7168 </code></pre>
</div>
<p>Restart the Distributed Cache service:</p>
<div>
<pre class="scroll"><code class="cplusplus"> $instanceName ="SPDistributedCacheService Name=AppFabricCachingService" <br /> $serviceInstance = Get-SPServiceInstance | ? {($_.service.tostring()) -eq $instanceName -and ($_.server.name) -eq $env:computername} <br /> $serviceInstance.Provision() </code></pre>
</div>
<p><strong>Change Service Account </strong></p>
<p>When the server farm is first configured, the server farm account is set as the service account of the AppFabric Caching service. The Distributed Cache service depends on the AppFabric Caching service. For security purposes it is advised to change the service account from the farm account. To change the service account of the AppFabric Caching service to a managed account, set the Managed account as the service account on the AppFabric Caching service.</p>
<p>At the Windows PowerShell command prompt, run the following command:</p>
<div>
<pre class="scroll"><code class="cplusplus"> $farm = Get-SPFarm <br /> $cacheService = $farm.Services | where {$_.Name -eq "AppFabricCachingService"} <br /> $accnt = Get-SPManagedAccount -Identity DomainName\SVC_SPFabric <br /> $cacheService.ProcessIdentity.CurrentIdentityType = "SpecificUser" <br /> $cacheService.ProcessIdentity.ManagedAccount = $accnt <br /> $cacheService.ProcessIdentity.Update() </code></pre>
</div>
<p>Where the &lsquo;DomainName&rsquo; is the NetBIOS domain name.</p>
<h2>Configure User Profile Services</h2>
<p>Login to SPAPP01 (Application Server hosting the Central Administration site) and launch <strong>SharePoint Management Shell</strong> as administrator. Execute the following command to start and configure User Profile Service:</p>
<div>
<pre class="scroll"><code class="cplusplus"> E:\Scripts\Install\SPUserProfile.ps1 -configLocation E:\Scripts\Install\SPUserProfile.xml </code></pre>
</div>
<p>When prompted provide the My Site Application Pool account variable &ldquo;$MySiteAppPool&rdquo;</p>
<h2>Start User Profile Synchronisation</h2>
<ol>
<li>Ensure that the Farm Admin account (SVC_SPFarm) is a member of local administrators group on SPAPP01.&nbsp;<br /><strong>Please note</strong> this is only required while configuring User Profile synchronisation Settings. However, when a backup of the User Profile application is initiated, the synchronization service provisions the User Profile application again. During the course of provisioning the User Profile application, the farm account must stop and start the synchronization service. To do this, the farm account must be a member of the Administrators group on the computer that is running the synchronization service. Due to this you may decide that the farm account will remain a member of the Administrators group on SPAPP01.</li>
<li>Ensure that the Farm account is able to logon locally on both SPAPP01 and SPAPP02 (Please see <a href="https://technet.microsoft.com/en-us/library/ff182925(v=office.15).aspx#permission)">https://technet.microsoft.com/en-us/library/ff182925(v=office.15).aspx#permission)</a></li>
<li>Reboot SPAPP01 after granting above permissions</li>
<li>Starting the user profile synchronisation service introduce the same challenge as we had in SharePoint 2010. This needs to be done under the farm account. There are a number of options:</li>
<ol>
<li>Login to SPAPP01 using the Farm Admin account (SVC_SPFarm). Navigate to Central Administration Site and click on Services on Server and start User Profile Synchronization Service.</li>
<li>Launch the SharePoint Management Shell as the SVC_SPFarm account and use <a href="https://technet.microsoft.com/en-us/library/ff608036.aspx">New-SPProfileServiceApplication</a> Cmdlet.</li>
<li>Use the third option described in: <a title="Title of this entry." href="https://www.harbar.net/archive/2010/10/30/avoiding-the-default-schema-issue-when-creating-the-user-profile.aspx">Avoiding the Default Schema issue when creating the User Profile Service Application using Windows PowerShell</a> by <a title="Title of this entry." href="https://www.harbar.net/articles/about.aspx">Spencer Harbar</a>.<strong></strong></li>
<li>Perform an IIS reset on SPAPP01 server</li>
</ol></ol>
<p>The following activities are recommended however are out of scope of this blog post:</p>
<ol>
<li>Add a new synchronisation connection</li>
<li>Define exclusion filters for a synchronisation connection</li>
<li>Map user profile properties</li>
<li>Start profile synchronization and configure Import Schedules</li>
</ol>
<p>&nbsp;</p>
<h2>Configure Search Service</h2>
<p>Login to SPAPP01 (Application Server hosting the Central Administration site) and launch SharePoint Management Shell as administrator. Execute the following command to start and Search Services and configure the search topology:</p>
<div>
<pre class="scroll"><code class="cplusplus"> E:\Scripts\Install\SPSearchService.ps1 -configLocation E:\Scripts\Install\SPSearchService.xml </code></pre>
</div>
<p>Please note the following Search post configuration steps are required to be carried out; however, are out of scope of this blog post:</p>
<ol>
<li>Provide the location of the global Search Centre</li>
<li>Setup People Search</li>
<li>Configure result sources</li>
<li>Configure Search Result Exclusions</li>
<li>Configure Search Alert Settings</li>
<li>Configure Search Crawling Schedule</li>
</ol>
<p>Lookout for the next blog post, where we implement Office Web Application Components and its integration with SharePoint.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Components.PostAttachments/00/10/42/10/29/SPServices.zip" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-42-10-29/SPServices.zip">SPServices.zip</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Uploading Files Using the REST API and Client Side Techniques</title>
      <link>https://docs.microsoft.com/archive/blogs/uksharepoint/uploading-files-using-the-rest-api-and-client-side-techniques</link>
      <pubDate>Sat, 20 Apr 2013 12:51:00 GMT</pubDate>
      <dc:creator><![CDATA[James Glading]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/uksharepoint/2013/04/20/uploading-files-using-the-rest-api-and-client-side-techniques/</guid>
      <description><![CDATA[Over the past few months I have, on several occasions, been asked how to upload a file to SharePoint...]]></description>
      <content:encoded><![CDATA[<p>Over the past few months I have, on several occasions, been asked how to upload a file to SharePoint using nothing more than JavaScript, HTML and the REST API. A few weeks ago, on a customer project, I was asked to do exactly that and was astonished to find that there is sparse documentation and even fewer examples out there on the Internet. For this reason, I have decided to write a post on how to use HTML 5 and JavaScript to upload files to a SharePoint 2013 document library.</p>
<p><strong>Please Note:</strong> This technique is only supported in browsers that support the FileReader object of the File API. Currently this includes, but is not limited to, Internet Explorer version 10, Firefox version 3.6 and Chrome version 7 (information about the File API, including the FileReader object can be found <a title="https://msdn.microsoft.com/en-us/library/windows/apps/hh767327.aspx" href="https://blogs.msdn.com/controlpanel/blogs/posteditor.aspx/here">here</a>).</p>
<p>There are two specific areas that I will cover in this article; how to extract the file from the user&rsquo;s machine and how to post this file off to the correct document library (including how to upload into a folder).<span style="line-height: 107%; font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-GB; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;">Please note that this article does not cover the authentication aspect of uploading files over REST. If you are performing the upload from a SharePoint hosted app then this is taken care of by the app model. If you are performing an upload from another source then you will need to include an OAuth token (either as an App or as a user) with the request by setting an additional header (&ldquo;authorization&rdquo;).</span></p>
<h2>Getting the file</h2>
<p>Traditionally, uploading files is achieved by using a form that POSTs off to a web server which then handles the upload. This means that developers do not have to directly reach into the client&rsquo;s file system to obtain the file. However this also means that you need to have access to a web server where you can handle the upload. In some situations, SharePoint hosted apps for example, the developer does not have access to this infrastructure and the upload must be handled inside the client&rsquo;s web browser.</p>
<p>Advancements in the JavaScript <a href="https://www.w3.org/TR/FileAPI/">File API</a> allow developers to access the local file system using a standard input tag. The magical part is that you can access the file contents without having to perform a post back. The JavaScript code below shows how you can read the contents of a file (assuming that you have an input tag of type file inside the HTML document with an ID of <em>fileSelectorInput</em>).</p>
<div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:a8b61072-9122-451f-95a1-83d6a37840fb" class="wlWriterEditableSmartContent" style="margin: 0px; padding: 0px; float: none; display: inline;">
<div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt;">
<div style="background: #ddd; max-height: 300px; overflow: auto;"><ol style="background: #ffffff; margin: 0 0 0 2.5em; padding: 0 0 0 5px; white-space: nowrap;" start="1">
<li><span style="background: #ffffff; color: #0000ff;">var</span><span style="background: #ffffff; color: #000000;"> fileInput = $(</span><span style="background: #ffffff; color: #a31515;">'#fileSelectorInput'</span><span style="background: #ffffff; color: #000000;">)[0];</span></li>
<li style="background: #f3f3f3;"><span style="background: #ffffff; color: #0000ff;">var</span><span style="background: #ffffff; color: #000000;"> reader = </span><span style="background: #ffffff; color: #0000ff;">new</span><span style="background: #ffffff; color: #000000;"> FileReader();</span></li>
<li><span style="background: #ffffff; color: #000000;">reader.onload = </span><span style="background: #ffffff; color: #0000ff;">function</span><span style="background: #ffffff; color: #000000;"> (result) {</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #0000ff;">var</span><span style="background: #ffffff; color: #000000;"> fileData = </span><span style="background: #ffffff; color: #a31515;">''</span><span style="background: #ffffff; color: #000000;">;</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #0000ff;">var</span><span style="background: #ffffff; color: #000000;"> byteArray = </span><span style="background: #ffffff; color: #0000ff;">new</span><span style="background: #ffffff; color: #000000;"> Uint8Array(result.target.result)</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #0000ff;">for</span><span style="background: #ffffff; color: #000000;"> (</span><span style="background: #ffffff; color: #0000ff;">var</span><span style="background: #ffffff; color: #000000;"> i = 0; i &lt; byteArray.byteLength; i++) {</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">fileData += String.fromCharCode(byteArray[i])</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">}</span></li>
<li><span style="background: #ffffff; color: #000000;">};</span></li>
<li style="background: #f3f3f3;"><span style="background: #ffffff; color: #000000;">reader.readAsArrayBuffer(fileInput.files[0]);</span></li>
</ol></div>
</div>
</div>
<p>The example first uses jQuery to obtain a reference to the input tag on the page. A new <em>FileReader</em> object is then created and the <em>readAsArrayBuffer</em> function is called on the <em>FileReader</em> passing in a reference to the first file in the list.</p>
<p>The <em>onload</em> function contains the contents of the file (inside <em>result.target.result)</em> however this is in the format of an <em>ArrayBuffer</em>. To upload the file to SharePoint this must be converted into a string which can then be set as the body of a POST operation. This can be done by iterating through the array and building up a string using the <em>string.fromCharCode()</em> function. Details of this encoding method can be found in <a href="https://msdn.microsoft.com/en-us/library/jj164022.aspx#Files">this</a> MSDN article.</p>
<h2>Performing the upload</h2>
<p>Performing the actual upload is relatively simple. In the example code at the end of this article I will be using the <a href="https://msdn.microsoft.com/en-us/library/fp179927.aspx">cross domain library</a> provided with SharePoint 2013 to perform uploads from within a SharePoint Hosted App. This library allows for cross domain calls from pages in the App web to the parent site. I will also show the endpoints required to upload files without the cross domain library.</p>
<h5>Uploading to the root folder of a document library (without the cross domain library)</h5>
<p>This is probably the simplest endpoint that I will cover. TargetSite needs to be replaced with the URL of the SharePoint site (e.g. <a href="https://sharepoint.com/sites/site">https://sharepoint.com/sites/site</a>). Additionally, the final two parameters (TargetLibrary and TargetFileName) need to be replaced with the appropriate values. The URL is:</p>
<p><span style="font-family: courier new;"><span style="color: #d16349;"><strong><em><span style="color: #c0504d;">TargetSite</span></em></strong>/_api/web/lists/getByTitle(@TargetLibrary)/RootFolder/Files/add(</span><a href="mailto:url=@TargetFileName,overwrite='true')?@TargetLibrary='Library"><span style="color: #d16349;">url=@TargetFileName,overwrite='true')?@TargetLibrary='</span><span style="color: #c0504d;"><strong><em>Library</em></strong></span></a><strong><em></em></strong><a href="mailto:Name'&amp;@TargetFileName='Target"><span style="color: #d16349;"><strong><em><span style="color: #c0504d;">Name</span></em></strong>'&amp;@TargetFileName='</span><span style="color: #c0504d;"><strong><em>Target</em></strong></span></a><span style="color: #d16349;"><strong><em><span style="color: #c0504d;"> File Name</span></em></strong>'</span></span></p>
<h5>Uploading to the root folder of a document library (with the cross domain library)</h5>
<p>If you would like to perform the upload from a SharePoint hosted App you will need to use the cross domain library to overcome cross domain issues. This can be done by modifying the start of the URL and adding an additional parameter (<em>TargetSite</em>) which needs to be replaced with the URL of you target site (e.g. <a href="https://sharepoint.com/sites/site">https://sharepoint.com/sites/site</a>). You will also need to replace the <em>AppWebUrl</em> section with the URL of your <em>AppWeb</em>. All other parameters should stay the same. The URL is:</p>
<p><span style="font-family: courier new;"><span style="color: #d16349;"><strong><span style="color: #c0504d;"><em>AppWebUrl</em></span></strong>/_api/SP.AppContextSite(@TargetSite)/web/lists/getByTitle(@TargetLibrary)/RootFolder/Files/add(</span></span><a href="mailto:url=@TargetFileName,overwrite='true')?@TargetSite='Target"><span style="font-family: courier new;"><span style="color: #d16349;">url=@TargetFileName,overwrite='true')?@TargetSite=&rsquo;</span><span style="color: #c0504d;"><strong><em>Target</em></strong></span></span></a><span style="color: #c0504d; font-family: courier new;"><strong><em> site </em></strong></span><a href="mailto:URL&rsquo;&amp;@TargetLibrary=&rsquo;Library"><span style="font-family: courier new;"><span style="color: #d16349;"><strong><em><span style="color: #c0504d;">URL</span></em></strong>&rsquo;&amp;@TargetLibrary=&rsquo;</span><span style="color: #c0504d;"><strong><em>Library</em></strong></span></span></a><a href="mailto:Name&rsquo;&amp;@TargetFileName=&rsquo;Target"><span style="font-family: courier new;"><span style="color: #d16349;"><strong><em><span style="color: #c0504d;">Name</span></em></strong>&rsquo;&amp;@TargetFileName=&rsquo;</span><span style="color: #c0504d;"><strong><em>Target</em></strong></span></span></a><span style="font-family: courier new;"><span style="color: #d16349;"><strong><em><span style="color: #c0504d;"> File Name</span></em></strong>&rsquo;</span></span>&nbsp;</p>
<h5>Uploading to a folder within a document (without the cross domain library)</h5>
<p>Uploading to a folder in a document library is fairly similar to uploading to the root folder. Again I will show two examples (one with and one without the cross domain library). The simplified version (without the cross domain library) can be performed using the URL below. You will need to replace the various components in the same way as you would for uploading to the root folder (mentioned previously). Also note the addition of a TargetFolder parameter and the change to URL to include the folder. The URL is:</p>
<p><span style="color: #d16349; font-family: courier new;"><strong><em><span style="color: #c0504d;">TargetSite</span></em></strong>/_api/web/lists/getByTitle(@TargetLibrary)/RootFolder/folders(@TargetFolderName)/files/add(</span><a href="mailto:url=@TargetFileName,overwrite='true')?@TargetLibrary='Library"><span style="color: #d16349; font-family: courier new;">url=@TargetFileName,overwrite='true')?@TargetLibrary=&rsquo;<strong><em><span style="color: #c0504d;">Library</span></em></strong></span></a><a href="mailto:Name'&amp;@TargetFolder=&rsquo;Target"><span style="color: #d16349; font-family: courier new;"><strong><em><span style="color: #c0504d;">Name</span></em></strong>&rsquo;&amp;@TargetFolder=&rsquo;<strong><em><span style="color: #c0504d;">Target</span></em></strong></span></a><span style="color: #c0504d; font-family: courier new;"><strong><em> Folder </em></strong></span><a href="mailto:Name'&amp;@TargetFileName=&rsquo;Target"><span style="color: #d16349; font-family: courier new;"><strong><em><span style="color: #c0504d;">Name</span></em></strong>&rsquo;&amp;@TargetFileName=&rsquo;<strong><em><span style="color: #c0504d;">Target</span></em></strong></span></a><span style="color: #d16349; font-family: courier new;"><strong><em><span style="color: #c0504d;"> File Name</span></em></strong>&rsquo;</span></p>
<h5>Uploading to a folder within a document (with the cross domain library)</h5>
<p>You can also use the cross domain library to upload files to a folder within a document library. The URL needs to be modified slightly (in the same way as before) to redirect the message to the AppWeb and to include the TargetSite parameter. The URL is:</p>
<p><span style="color: #d16349; font-family: courier new;"><strong><em><span style="color: #c0504d;">AppWebUrl</span></em></strong>/_api/SP.AppContextSite(@TargetSite)/web/lists/getByTitle(@TargetLibrary)/RootFolder/folders(@TargetFolderName)/files/add(</span><a href="mailto:url=@TargetFileName,overwrite='true')?@TargetSite='Target"><span style="color: #d16349; font-family: courier new;">url=@TargetFileName,overwrite='true')?@TargetSite='<strong><em><span style="color: #c0504d;">Target</span></em></strong></span></a><span style="color: #c0504d; font-family: courier new;"><strong><em> site </em></strong></span><a href="mailto:url&rsquo;&amp;@TargetLibrary=&rsquo;Library"><span style="color: #d16349; font-family: courier new;"><strong><em><span style="color: #c0504d;">url</span></em></strong>&rsquo;&amp;@TargetLibrary=&rsquo;<strong><em><span style="color: #c0504d;">Library</span></em></strong></span></a><a href="mailto:Name&rsquo;&amp;@TargetFolder=&rsquo;Target"><span style="color: #d16349; font-family: courier new;"><strong><em><span style="color: #c0504d;">Name</span></em></strong>&rsquo;&amp;@TargetFolder=&rsquo;<strong><em><span style="color: #c0504d;">Target</span></em></strong></span></a><span style="color: #c0504d; font-family: courier new;"><strong><em> Folder </em></strong></span><a href="mailto:Name&rsquo;&amp;@TargetFileName=&rsquo;Target"><span style="color: #d16349; font-family: courier new;"><strong><em><span style="color: #c0504d;">Name</span></em></strong>&rsquo;&amp;@TargetFileName=&rsquo;<strong><em><span style="color: #c0504d;">Target</span></em></strong></span></a><span style="font-family: courier new;"><span style="color: #d16349;"><strong><em><span style="color: #c0504d;"> File Name</span></em></strong>&rsquo;</span>&nbsp; </span></p>
<h2>Required Headers/Options</h2>
<p>In addition to ensuring you use the correct endpoint and encoding, it is important to ensure that the correct headers/options are set on the request. The actual request should be sent as a POST operation and the content type, headers, content length and binary string request body options must be set.</p>
<h6>Accept: <span style="font-family: segoe ui;">The Accept option must be set equal to &ldquo;application/json; odata=verbose&rdquo; inside the headers of the request.</span></h6>
<h6>Digest Value<span style="font-family: Segoe UI;">: <span style="font-family: segoe ui;">The digest value should be set equal to the digest value obtained from SharePoint. This should also be set in the headers section of the request. The digest value can be read from SharePoint pages or be requested from the app web. More information about digest values can be found </span></span><a href="https://msdn.microsoft.com/en-us/library/jj164022.aspx"><span style="font-family: segoe ui light;"><span style="font-family: Segoe UI;">here</span></span></a><span style="font-family: segoe ui light;"><span style="font-family: Segoe UI;"> under the heading &ldquo;Writing data by using the REST interface&rdquo;.</span></span></h6>
<h6>Content Type: <span style="font-family: segoe ui light;"><span style="font-family: Segoe UI;">The content type of &ldquo;application/json; odata=verbose&rdquo; should be set on the request</span></span></h6>
<h6>Body: <span style="font-family: segoe ui light;"><span style="font-family: Segoe UI;">The body should be set equal to the file contents encoded as per the description in the MSDN article </span></span><a href="https://msdn.microsoft.com/en-us/library/jj164022.aspx#Files"><span style="font-family: segoe ui light;"><span style="font-family: Segoe UI;">here</span></span></a><span style="font-family: segoe ui;"><span style="font-family: Segoe UI;">.</span></span></h6>
<h6>BinaryStringRequestBody: <span style="font-family: segoe ui light;"><span style="font-family: Segoe UI;">The option &ldquo;binaryStringRequestBody&rdquo; should be set equal to true. This informs SharePoint that the body of the message contains binary data.</span></span></h6>
<h6>Content Length: <span style="font-family: segoe ui light;"><span style="font-family: Segoe UI;">The content length of the request should be set equal to the length of the body. <strong>Note:</strong> if you are using the request executor then the content length is optional, if you are uploading directly (without the request executor) then you must set the content length otherwise SharePoint will reject the request.</span></span></h6>
<h2>Conclusion</h2>
<p>In summary, performing uploads via the REST API using only client side technologies is not only possible, but is actually quite simple. We have looked at how to extract the file from the user&rsquo;s machine, generate the correct endpoint and set the correct headers/options on the request. When you put all of this together you can upload binary files to SharePoint from the end users web browser without having to process the files server side. This means that in situations such as SharePoint hosted Apps where developers do not have access to server side code uploads can still be performed. Furthermore in situations where you do have access to server side code you can still use the endpoints mentioned to upload files using the REST API.</p>
<p>The source code below contains a working example (in the form of a SharePoint hosted App).</p>
<p>&nbsp;</p>
<h2>Source Code</h2>
<p>The following downloadable source code contains a working example of uploading files over REST. The sample is contained within a SharePoint hosted app and you will need to have Visual Studio 2012 installed to be able to run it. To run the example you will need to configure the SiteUrl of the project to point to a SharePoint 2013 developer site. To do this click on the project in solution explorer and open up the properties task pane. Enter the URL of your site into the SiteUrl box and then press F5.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Components.PostAttachments/00/10/41/26/64/Upload%20Over%20REST%20Example.zip" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-41-26-64/Upload-Over-REST-Example.zip">Upload Over REST Example.zip</a></p>]]></content:encoded>
    </item>
    <item>
      <title>SharePoint 2013 Development (Apps versus Solutions)</title>
      <link>https://docs.microsoft.com/archive/blogs/uksharepoint/sharepoint-2013-development-apps-versus-solutions</link>
      <pubDate>Mon, 25 Mar 2013 03:37:11 GMT</pubDate>
      <dc:creator><![CDATA[Alaa Mostafa]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/uksharepoint/2013/03/25/sharepoint-2013-development-apps-versus-solutions/</guid>
      <description><![CDATA[SharePoint 2013 is a strong development platform for building solutions and apps addressing...]]></description>
      <content:encoded><![CDATA[<p class="Publishwithline"><span style="font-size: medium;"><span style="font-family: Calibri;">SharePoint 2013 is a strong development platform for building solutions and apps addressing different requirements and needs.</span></span></p>
<p><span style="font-size: medium;"><span style="font-family: Calibri;">There&rsquo;s a plenty of documentation on MSDN and TechNet to get you started with building your first application and how to consume the different capabilities of the platform.</span></span></p>
<p><span style="font-size: medium;"><span style="font-family: Calibri;">But one thing I struggled to find is when and why you would use a SharePoint App rather than using the object model?</span></span></p>
<p><span style="font-size: medium;"><span style="font-family: Calibri;">This blog will walk you through that specific question and how to answer it.</span></span></p>
<p><span style="font-size: medium;"><span style="font-family: Calibri;">Before we start there&rsquo;s no rights or wrongs here, it all depends on what the customer needs and the best way to tackle the requirements </span></span></p>
<p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></p>
<h2><span style="font-size: medium;"><span style="color: #323e4f;"><span style="font-family: Calibri;">The Challenges:</span></span></span></h2>
<p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></p>
<h2><span style="color: #323e4f;"><span style="font-family: Calibri; font-size: medium;">1.</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="font-size: medium;"><span style="font-family: Calibri;">Hosting</span></span></span></h2>
<h3><span style="font-size: small;"><span style="color: #323e4f;"><span style="font-family: Calibri;">Solutions </span></span></span></h3>
<p><span style="font-size: medium;"><span style="font-family: Calibri;">The first factor is where is my code being hosted?</span></span></p>
<p><span style="font-size: medium;"><span style="font-family: Calibri;">If you are using the object model most of your code will be within the SharePoint host environment:</span></span></p>
<ul>
<li><span style="font-size: medium;"><span style="font-family: Calibri;">Managed solutions also known as farm solutions will be hosted within the main SharePoint worker process (w3wp.exe).</span></span></li>
<li><span style="font-size: medium;"><span style="font-family: Calibri;">Sandbox solutions will run within the SharePoint sandbox worker process (SPUCWorkerProcess.exe).</span></span></li>
</ul>
<p><span style="font-size: medium;"><span style="font-family: Calibri;">If you are using Apps:</span></span></p>
<ul>
<li><span style="font-size: medium;"><span style="font-family: Calibri;">App code never runs within the SharePoint host environment.</span></span></li>
</ul>
<p><span style="font-size: medium;"><span style="font-family: Calibri;">So what difference does it make?</span></span></p>
<ol>
<li><span style="font-size: medium;"><span style="font-family: Calibri;">If the custom code is not running within the SharePoint farm this will eliminate any kind of custom operation being done within the farm and hence increase the farm stability.</span></span></li>
<li><span style="font-size: medium;"><span style="font-family: Calibri;">It&rsquo;s easier to upgrade if your code is platform independent, we have seen many cases where the customer will hold all the SharePoint migration until he makes sure that all the custom solution will be working fine on the new version.</span></span></li>
<li><span style="font-size: medium;"><span style="font-family: Calibri;">The deployment, most farm solutions require a Farm Administrator to do the deployment and mostly restarts the IIS on all the WFEs, which causes a disruption in the service. Although the deployment of Sandbox solutions is a lot easier and straight forward but there&rsquo;s no indication on whether or not it&rsquo;s safe to activate this sandbox solution without actually activating it and giving the code inside aces to all the site collection&rsquo;s content.</span></span></li>
<li><span style="font-size: medium;"><span style="font-family: Calibri;">Office 365 Ready, you can always use Sandbox solutions on Off365, but mostly you would develop two versions from your code one that works with On-Premise farms and another one for Office 365. Now the whole point of an App is you don&rsquo;t worry where it&rsquo;s hosted or deployed as it should behave the same on both On-Premise and Cloud environments.</span></span></li>
</ol>
<h3><span style="font-size: small;"><span style="color: #323e4f;"><span style="font-family: Calibri;">Apps</span></span></span></h3>
<p><span style="font-size: medium;"><span style="font-family: Calibri;">Apps are very different from solutions in that they run 100% outside of the SharePoint server, and their custom code executes either within the context of the client browser or on other servers that are not running SharePoint such as Web servers in the cloud. </span></span></p>
<p><span style="font-size: medium;"><span style="font-family: Calibri;">There are three high-level types of SharePoint apps: </span></span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/16/10/8816.hos.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-16-10/8816.hos.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/16/10/8816.hos.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-16-10/8816.hos.png" alt="" border="0" /></a>&nbsp;</p>
<ul>
<li><span style="font-size: medium;"><span style="font-family: Calibri;"><strong>SharePoint-Hosted: </strong>These types of apps are manifested within SharePoint generally without external dependencies. Any custom business logic implemented with custom code must run within the context of the browser client. Some examples of these types of Apps could be an expense calculator or holiday request. Each of these Apps may implement its own business logic using JavaScript, but they can also access and leverage SharePoint lists and libraries.</span></span></li>
<li><span style="font-size: medium;"><span style="font-family: Calibri;"><strong>Provider-Hosted: </strong>These types of apps may have a SharePoint component but the bulk of the business logic is manifested in some other infrastructure, such as an external Web server or in the cloud. These types of apps are a good option when integrating an existing event registration or help desk ticketing solutions within a SharePoint site.</span></span></li>
<li><span style="font-size: medium;"><span style="font-family: Calibri;"><strong>Auto-Hosted: </strong>These types of apps are similar to the Provider-Hosted Apps in that they have the bulk of their business logic and/or data storage manifested externally. What&rsquo;s different with an Azure Auto-Hosted app is that the app package contains the website &amp; database in the package. When the app is installed in a site, SharePoint handles the automatic provisioning of the database (as a SQL Azure database) and website (as an Azure hosted website) using an account that has been setup by the SharePoint farm/tenant administrator.</span></span></li>
</ul>
<p><span style="font-size: medium;"><span style="font-family: Calibri;">One explicit limitation of the SharePoint App Model is that server side code is explicitly prohibited from residing on the SharePoint farm as part of an App. Any server side code that is utilized in the context of an App must be hosted outside of SharePoint either in the cloud or on-premises.</span></span></p>
<p><span style="font-size: medium;"><span style="font-family: Calibri;">The Cloud App Model provides a loosely coupled architecture for building Apps in SharePoint 2013. This loosely coupled architecture gives the freedom of choice for developers in the technologies they use to not only host their applications, but also the tools they use to write them. Apps can leverage industry web standards such as HTML, JavaScript, jQuery, JSON, REST, OData and OAuth to provide an integrated user experience. </span></span></p>
<p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></p>
<h2><span style="color: #323e4f;"><span style="font-family: Calibri; font-size: medium;">2.</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="font-size: medium;"><span style="font-family: Calibri;">Scopes</span></span></span></h2>
<h3><span style="font-size: small;"><span style="color: #323e4f;"><span style="font-family: Calibri;">Solutions</span></span></span></h3>
<ul>
<li><span style="font-size: medium;"><span style="font-family: Calibri;">Full trusted solutions can be installed on any scope (Farm, Web App, Site Collection, Sites).</span></span></li>
<li><span style="font-size: medium;"><span style="font-family: Calibri;">Sandbox solution &nbsp;or partially trust solutions is scope is limited to Site Collections</span></span></li>
</ul>
<h3><span style="font-size: small;"><span style="color: #323e4f;"><span style="font-family: Calibri;">Apps</span></span></span></h3>
<ul>
<li><span style="font-size: medium;"><span style="font-family: Calibri;">Apps has two different scopes :</span></span>
<ul>
<li><span style="font-size: medium;"><span style="font-family: Calibri;">Site Scope: in this case the app is installed and launched within the same scope of the SharePoint site.</span></span></li>
<li><span style="font-size: medium;"><span style="font-family: Calibri;">Tenancy Scope: in this case a special SharePoint site is required called app catalog, once it&rsquo;s installed users from different sites can choose to connect and consume this App. </span></span></li>
</ul>
</li>
<li><span style="font-size: medium;"><span style="font-family: Calibri;">Using the object model whenever we need to scale our solutions either up or out ; We needed to introduce new hardware to the farm that comes with the package of :</span></span></li>
</ul>
<h3><span style="font-size: small;"><span style="color: #323e4f;"><span style="font-family: Calibri;"></span></span></span></h3>
<h2><span style="color: #323e4f;"><span style="font-family: Calibri; font-size: medium;">3.</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="font-size: medium;"><span style="font-family: Calibri;">Scaling </span></span></span></h2>
<h3><span style="font-size: small;"><span style="color: #323e4f;"><span style="font-family: Calibri;">Solutions</span></span></span></h3>
<ol>
<li><span style="font-size: medium;"><span style="font-family: Calibri;">Down time considerations</span></span></li>
<li><span style="font-size: medium;"><span style="font-family: Calibri;">Cost</span></span></li>
<li><span style="font-size: medium;"><span style="font-family: Calibri;">High Availability and Disaster recover changes</span></span></li>
<li><span style="font-size: medium;"><span style="font-family: Calibri;">Monitoring </span></span></li>
</ol>
<h3><span style="font-size: small;"><span style="color: #323e4f;"><span style="font-family: Calibri;">Apps</span></span></span></h3>
<ul>
<li><span style="font-size: medium;"><span style="font-family: Calibri;">Using the App model you can always scale your application without affecting the current SharePoint environment.</span></span></li>
</ul>
<p><span style="font-size: medium;"><span style="font-family: Calibri;">Have a look at windows Azure Scalability options</span></span></p>
<p><span style="font-size: medium;"><a href="https://www.microsoft.com/en-us/download/details.aspx?id=36837"><span style="color: #0563c1; font-family: Calibri;">https://www.microsoft.com/en-us/download/details.aspx?id=36837</span></a></span></p>
<p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></p>
<h2><span style="color: #323e4f;"><span style="font-family: Calibri; font-size: medium;">4.</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="font-size: medium;"><span style="font-family: Calibri;">Integration</span></span></span></h2>
<h3><span style="font-size: small;"><span style="color: #323e4f;"><span style="font-family: Calibri;">Solutions</span></span></span></h3>
<ul>
<li><span style="font-size: medium;"><span style="font-family: Calibri;">Previously our only options to integrate with other applications was rather through BCS (Business Connectivity Service), Web Services or build your own service application, this provided the end users with limited experience integrating with external applications.</span></span></li>
</ul>
<h3><span style="font-size: small;"><span style="color: #323e4f;"><span style="font-family: Calibri;">Apps</span></span></span></h3>
<ul>
<li><span style="font-size: medium;"><span style="font-family: Calibri;">Using the new App model there are too many options for the integration from Services to actually implementing a fully customized applications against different products SDK.</span></span></li>
<li><span style="font-size: medium;"><span style="font-family: Calibri;">All the web skills are reusable in building the Apps, to a very good extent you can write a SharePoint app without needing to know a lot about SharePoint 2013.</span></span></li>
<li><span style="font-size: medium;"><span style="font-family: Calibri;">Fully supported templates from visual studio 2012.</span></span></li>
<li><span style="font-size: medium;"><span style="font-family: Calibri;">Device free in terms of the device on which the code runs. The possibilities include a server in the SharePoint farm, an external server such as a server in the cloud, a client computer, and a mobile device.</span></span></li>
</ul>
<p>&nbsp;</p>
<h1><span style="color: #323e4f;"><span style="font-family: Calibri;">Conclusion</span></span></h1>
<p><span style="font-size: medium;"><span style="font-family: Calibri;">Always develop Apps whenever it&rsquo;s possible rather than developing a classic Full Trust or Partially trust solution.</span></span></p>
<p><span style="font-size: medium;"><span style="font-family: Calibri;">Bear in mind that sandbox solutions are still supported but they will be deprecated.</span></span></p>
<p><span style="font-size: medium;"><span style="font-family: Calibri;">But first understand that the client object models and the REST endpoints that are available in the App model do not duplicate all of the APIs of the server object model that are accessible in a classic SharePoint solution.</span></span></p>
<p>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/16/10/6355.com.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-16-10/6355.com.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/16/10/6355.com.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-16-10/6355.com.png" alt="" border="0" /></a></p>
<p><span style="font-size: medium;"><span style="font-family: Calibri;">For more Information :</span></span></p>
<p><span style="font-size: medium;"><strong><span style="font-family: Calibri;">Reference documentation</span></strong></span></p>
<p><span style="font-size: medium;"><a href="https://msdn.microsoft.com/en-us/library/sharepoint/jj163114.aspx"><span style="color: #0563c1; font-family: Calibri;">Apps for SharePoint compared with SharePoint solutions</span></a></span></p>
<p><span style="font-size: medium;"><strong><span style="font-family: Calibri;">Choose the right API set in SharePoint 2013</span></strong></span></p>
<p><span style="font-size: medium;"><a href="https://msdn.microsoft.com/en-us/library/jj164060.aspx#Factors"><span style="color: #0563c1; font-family: Calibri;">https://msdn.microsoft.com/en-us/library/jj164060.aspx#Factors</span></a></span></p>
<p><span style="font-size: medium;"><strong><span style="font-family: Calibri;">SharePoint 2013 Development</span></strong></span></p>
<p><span style="font-size: medium;"><a href="https://msdn.microsoft.com/en-us/library/jj162979.aspx"><span style="color: #0563c1; font-family: Calibri;">https://msdn.microsoft.com/en-us/library/jj162979.aspx</span></a></span></p>
<p><span style="font-family: Calibri; font-size: medium;">&nbsp;</span></p>
<p><span style="font-family: Calibri; font-size: medium;">&nbsp;</span></p>]]></content:encoded>
    </item>
    <item>
      <title>Scripted Installation of SharePoint 2013 and Office Web Apps Server – From the Field (Part 2)</title>
      <link>https://docs.microsoft.com/archive/blogs/uksharepoint/scripted-installation-of-sharepoint-2013-and-office-web-apps-server-from-the-field-part-2</link>
      <pubDate>Mon, 18 Mar 2013 05:35:00 GMT</pubDate>
      <dc:creator><![CDATA[Ashkan Jabbari]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/uksharepoint/2013/03/18/scripted-installation-of-sharepoint-2013-and-office-web-apps-server-from-the-field-part-2/</guid>
      <description><![CDATA[This is the second post in the Scripted Installation of SharePoint 2013 and Office Web Apps Server...]]></description>
      <content:encoded><![CDATA[<p>This is the second post in the Scripted Installation of SharePoint 2013 and Office Web Apps Server series. If you have not already done so, please see part one of this blog series: <a href="https://blogs.msdn.com/b/uksharepoint/archive/2012/12/07/scripted-installation-of-sharepoint-2013-and-office-web-application-components-from-the-field-part-1.aspx">Farm Topology and Prerequisites</a>.</p>
<ol>
<li><a href="https://blogs.msdn.com/b/uksharepoint/archive/2012/12/07/scripted-installation-of-sharepoint-2013-and-office-web-application-components-from-the-field-part-1.aspx">Farm Topology and Prerequisites</a></li>
<li><strong>SharePoint Installation, Configuration and Basic Service Applications Deployment</strong></li>
<li><a title="User Profile, Search and Distributed Cache Service Applications Deployment" href="https://blogs.msdn.com/b/uksharepoint/archive/2013/05/24/scripted-installation-of-sharepoint-2013-and-office-web-apps-server-from-the-field-part-3.aspx">User Profile, Search and Distributed Cache Service Applications Deployment</a></li>
<li>Office Web Apps Server farm Implementation and Configuration</li>
</ol>
<p>This blog post will cover:</p>
<ul>
<li>Installation of SharePoint 2013</li>
<li>Farm creation and configuration</li>
<li>Implementation of:</li>
<ul>
<li>Excel Services</li>
<li>Secure Store</li>
<li>Usage and Health Data Collection</li>
<li>Managed Metadata Services</li>
<li>State Services</li>
</ul>
<li>Configuration of services on servers</li>
<li>Configuration of usage and health data collection</li>
<li>Configuration of state service</li>
<li>Configuration of diagnostic logging</li>
</ul>
<h2>Servers in Farm</h2>
<p>The following table illustrates the server names and associated server roles for each server:</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="123">
<p><strong>&nbsp;Server Name</strong></p>
</td>
<td valign="top" width="477">
<p><strong>&nbsp;Server Role</strong></p>
</td>
</tr>
<tr>
<td valign="top" width="123">
<p><strong>&nbsp;SPWEB01</strong><strong></strong></p>
</td>
<td valign="top" width="477">
<p>&nbsp;SharePoint 2013 Web Server 1</p>
</td>
</tr>
<tr>
<td valign="top" width="123">
<p><strong>&nbsp;SPWEB02</strong><strong></strong></p>
</td>
<td valign="top" width="477">
<p>&nbsp;SharePoint 2013 Web Server 2</p>
</td>
</tr>
<tr>
<td valign="top" width="123">
<p><strong>&nbsp;SPDCache01</strong><strong></strong></p>
</td>
<td valign="top" width="477">
<p>&nbsp;SharePoint 2013 Distribution Cache Server 1</p>
</td>
</tr>
<tr>
<td valign="top" width="123">
<p><strong>&nbsp;SPDCache02</strong><strong></strong></p>
</td>
<td valign="top" width="477">
<p>&nbsp;SharePoint 2013 Distribution Cache Server 2</p>
</td>
</tr>
<tr>
<td valign="top" width="123">
<p><strong>&nbsp;SPAPP01</strong><strong></strong></p>
</td>
<td valign="top" width="477">
<p>&nbsp;SharePoint 2013 Application Server 1 (CA)</p>
</td>
</tr>
<tr>
<td valign="top" width="123">
<p><strong>&nbsp;SPAPP02</strong><strong></strong></p>
</td>
<td valign="top" width="477">
<p>&nbsp;SharePoint 2013 Application Server 2 (CA)</p>
</td>
</tr>
<tr>
<td valign="top" width="123">
<p><strong>&nbsp;SPQuery01</strong><strong></strong></p>
</td>
<td valign="top" width="477">
<p>&nbsp;SharePoint 2013 Query Processing and Index Server&nbsp;1</p>
</td>
</tr>
<tr>
<td valign="top" width="123">
<p><strong>&nbsp;SPQuery02</strong><strong></strong></p>
</td>
<td valign="top" width="477">
<p>&nbsp;SharePoint 2013 Query Processing and Index Server 2</p>
</td>
</tr>
<tr>
<td valign="top" width="123">
<p><strong>&nbsp;SPCrawl01</strong><strong></strong></p>
</td>
<td valign="top" width="477">
<p>&nbsp;SharePoint 2013 Admin, Crawl, Content Processing,&nbsp;Analytics Processing Server 1</p>
</td>
</tr>
<tr>
<td valign="top" width="123">
<p><strong>&nbsp;SPCrawl02</strong><strong></strong></p>
</td>
<td valign="top" width="477">
<p>&nbsp;SharePoint 2013 Admin, Crawl, Content Processing, Analytics Processing&nbsp;Server 2</p>
</td>
</tr>
</tbody>
</table>
<h2>Installation Prerequisites and Assumptions</h2>
<ul>
<li>Please download and <a title="extract attached" href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Components.PostAttachments/00/10/40/31/58/BasicServices_Blog02.zip" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-40-31-58/BasicServices_5F00_Blog02.zip">extract attached</a> files onto local directory. It has been assumed that this directory is local folder on all SharePoint serves created as E:\Scripts\Install</li>
<li>It is assumed that the SharePoint installation directory is D:\ (the location of the media ISO)</li>
<li>Update the SilentConfig.xml file with SharePoint product key. Please see <a href="https://technet.microsoft.com/en-us/library/cc261668(v=office.14).aspx">Config.xml reference on TechNet</a> for more information.</li>
<li>Update the Config.xml file with environment specific information such as, SQL server alias name (To improve ease of maintenance, and make it easier to relocate the database if it is required in the future, create DNS aliases that point to the IP address for all instances of SQL Server), farm account details, admin database and configuration database. &nbsp;</li>
<li>Update the SPCredentials.xml file with service accounts and passwords information.</li>
<li>Update the SPServices.xml file with Usage and Health data collection log file location, Usage and Health data collection maximum file size, SQL server name, service application names and related database names.</li>
</ul>
<h2>Install SharePoint (with Internet Connection)</h2>
<p>The following steps will only work if each SharePoint server has <strong>direct access to the internet</strong>. If access is through a proxy, further configuration may be required. Therefore, if internet access is NOT available OR through a proxy, it is recommended to follow the guidelines listed next <strong>Install SharePoint (without Internet Connection)</strong></p>
<ol>
<li>Ensure that the SharePoint installation media is mounted and D:\Setup .exe is accessible</li>
<li>Microsoft SQL Server 2008 R2 Native Client is&nbsp;installed as part of SharePoint 2013 prerequisites installer, however if&nbsp;you are using SQL Server 2012 to host SharePoint databases&nbsp;install <a href="https://go.microsoft.com/fwlink/?LinkID=239648&amp;clcid=0x409">Microsoft&nbsp;SQL Server 2012 Native Client 64-bit edition</a> on all SharePoint servers.</li>
<li>Install&nbsp;SharePoint prerequisites and SharePoint binaries by executing the&nbsp;following script on all servers listed above (launch&nbsp;<strong>PowerShell</strong> as administrator). &nbsp;This script can be run simultaneously&nbsp;on all servers to save time.</li>
</ol>
<p><code class="cplusplus">Set-ExecutionPolicy Unrestricted &ndash;force <br /> E:\Scripts\Install\SPInstaller.ps1 -installPath D:\ -offline "n"</code></p>
<p>This script will automatically restart servers as required but you will need to log-in to the machine using the install account&nbsp;when prompted. <strong>DO NOT RUN </strong>the configuration wizard and un-mount the installation media from each server once the script has run successfully</p>
<p>Please note: Windows PowerShell execution policies let you determine the conditions under which Windows PowerShell loads configuration files and runs scripts. The execution policy is not a security system that restricts user actions. Instead, the execution policy helps users to set basic rules and prevents them from violating them unintentionally. Please see <a href="https://technet.microsoft.com/en-us/library/dd347641.aspx">About Execution Policy</a> TechNet article.</p>
<h2>Install SharePoint (without Internet Connection)</h2>
<p>If a direct internet connection is not available during installation, even if a proxy is available, the SharePoint prerequisites installation is likely to fail. This is because, 46 windows components need to be verified and installed (if missing) as well as an additional 8 features specific to SharePoint. By default the prerequisites installer will look to download the missing binaries online and without an internet connection this will fail. The following screenshot shows the first indication of this failure:</p>
<p><span style="text-decoration: underline;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/16/10/4113.sd.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-16-10/4113.sd.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/16/10/4113.sd.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-16-10/4113.sd.png" alt="" border="0" /></a></span></p>
<p>To successfully install the necessary prerequisites perform the following steps</p>
<p><br /><strong>Install Windows Server Features and Roles</strong></p>
<ol>
<li>Mount the Windows Server 2012 installation media (ISO) to drive D:\ and check that directory D:\sources\sxs exists on the image (it will contain lots of folders) on each server in the SharePoint farm</li>
<li>Open a PowerShell prompt as an administer and run the following script from each server in the farm to install all 46 Windows components:&nbsp;</li>
</ol>
<p><code class="cplusplus">Set-ExecutionPolicy Unrestricted &ndash;force <br /> E:\Scripts\Install\WinPreReqs.ps1</code></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3. Verify that all the roles and features have been successfully installed by executing the following from a PowerShell prompt run as administrator and checking the status the required features listed above are set to installed:</p>
<p><code class="cplusplus">Get-WindowsFeature</code>&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4. Restart all servers after the script has successfully completed</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5. Un-mount the Windows Server 2012 installation media (ISO) drive from all servers</p>
<p class="Heading3Numbered"><br /><strong>Install Remaining SharePoint 2013 Prerequisites Offline</strong></p>
<p>Download the following 8 additional prerequisites to a local directory and make available on each server in the farm (network shares are supported):</p>
<ul>
<li>MicrosoftSync Framework Runtime v1.0 SP1 (x64)<br /><a href="https://download.microsoft.com/download/E/0/0/E0060D8F-2354-4871-9596-DC78538799CC/Synchronization.msi" target="_blank">https://download.microsoft.com/download/E/0/0/E0060D8F-2354-4871-9596-DC78538799CC/Synchronization.msi<br /></a></li>
<li>Windows Server AppFabric<br /><a href="https://download.microsoft.com/download/A/6/7/A678AB47-496B-4907-B3D4-0A2D280A13C0/WindowsServerAppFabricSetup_x64.exe" target="_blank">https://download.microsoft.com/download/A/6/7/A678AB47-496B-4907-B3D4-0A2D280A13C0/WindowsServerAppFabricSetup_x64.exe&nbsp;<br /> </a></li>
<li>Cumulative Update Package 1 for Microsoft AppFabric 1.1 for Windows Server (KB2671763)<br /><a href="https://download.microsoft.com/download/7/B/5/7B51D8D1-20FD-4BF0-87C7-4714F5A1C313/AppFabric1.1-RTM-KB2671763-x64-ENU.exe" target="_blank">https://download.microsoft.com/download/7/B/5/7B51D8D1-20FD-4BF0-87C7-4714F5A1C313/AppFabric1.1-RTM-KB2671763-x64-ENU.exe<br /></a></li>
<li>Windows Identity Foundation (KB974405)<br /><a href="https://download.microsoft.com/download/D/7/2/D72FD747-69B6-40B7-875B-C2B40A6B2BDD/Windows6.1-KB974405-x64.msu" target="_blank">https://download.microsoft.com/download/D/7/2/D72FD747-69B6-40B7-875B-C2B40A6B2BDD/Windows6.1-KB974405-x64.msu<br /></a></li>
<li>Microsoft Identity Extensions<br /><a href="https://download.microsoft.com/download/0/1/D/01D06854-CA0C-46F1-ADBA-EBF86010DCC6/rtm/MicrosoftIdentityExtensions-64.msi" target="_blank">https://download.microsoft.com/download/0/1/D/01D06854-CA0C-46F1-ADBA-EBF86010DCC6/rtm/MicrosoftIdentityExtensions-64.msi<br /></a></li>
<li>Microsoft Information Protection and Control Client<br /><a href="https://download.microsoft.com/download/9/1/D/91DA8796-BE1D-46AF-8489-663AB7811517/setup_msipc_x64.msi" target="_blank">https://download.microsoft.com/download/9/1/D/91DA8796-BE1D-46AF-8489-663AB7811517/setup_msipc_x64.msi<br /></a></li>
<li>Microsoft WCF Data Services 5.0<br /><a href="https://download.microsoft.com/download/8/F/9/8F93DBBD-896B-4760-AC81-646F61363A6D/WcfDataServices.exe" target="_blank">https://download.microsoft.com/download/8/F/9/8F93DBBD-896B-4760-AC81-646F61363A6D/WcfDataServices.exe</a></li>
<li>Microsoft SQL Server 2008 R2 SP1 Native Client<br /><a href="https://download.microsoft.com/download/9/1/3/9138773A-505D-43E2-AC08-9A77E1E0490B/1033/x64/sqlncli.msi">https://download.microsoft.com/download/9/1/3/9138773A-505D-43E2-AC08-9A77E1E0490B/1033/x64/sqlncli.msi</a></li>
</ul>
<p>Open a PowerShell prompt as an administer and run the following script from each server in the farm, when prompted enter the path in which the download prerequisites can be found</p>
<div>
<p class="CodeBlock"><code class="cplusplus">E:\Install\scripts\SPPreReqInstall.ps1</code></p>
<p class="CodeBlock"><strong>Install SharePoint Binaries</strong>&nbsp;</p>
</div>
<ol>
<li>Ensure that the SharePoint installation media is mounted and D:\Setup .exe is accessible</li>
<li>Microsoft SQL Server 2008 R2 Native Client is&nbsp;installed as part of SharePoint 2013 prerequisites installer, however if&nbsp;you are using SQL Server 2012 to host SharePoint databases&nbsp;install <a href="https://go.microsoft.com/fwlink/?LinkID=239648&amp;clcid=0x409">Microsoft&nbsp;SQL Server 2012 Native Client 64-bit edition</a> on all SharePoint servers.</li>
<li>Install&nbsp;SharePoint prerequisites and SharePoint binaries by executing the&nbsp;following script on all servers listed above (launch&nbsp;<strong>PowerShell</strong> as administrator). &nbsp;This script can be run simultaneously&nbsp;on all servers to save time.</li>
</ol>
<p><code class="cplusplus">Set-ExecutionPolicy Unrestricted &ndash;force <br /> E:\Scripts\Install\SPInstaller.ps1 -installPath D:\ -offline "y"</code></p>
<p>This script will automatically restart servers as required but you will need to log-in to the machine using the install account&nbsp;when prompted. <strong>DO NOT RUN </strong>the configuration wizard and un-mount the installation media from each server once the script has run successfully</p>
<h2>Apply March PU and April CU</h2>
<p>Before configuring the farm, two product updates are required to SharePoint 2013 which can be downloaded from the following links (note a server restart is required after each update):</p>
<p>(1)&nbsp;&nbsp;&nbsp;KB2767999 <a href="https://support.microsoft.com/kb/2767999">https://support.microsoft.com/kb/2767999</a></p>
<p>(2)&nbsp;&nbsp;&nbsp;KB2726992 <a href="https://support.microsoft.com/kb/2726992">https://support.microsoft.com/kb/2726992</a></p>
<p>The March PU (KB2767999) must be applied <strong>before </strong>the April CU (KB2726992) and is also a dependency for any future patches or cumulative updates.<strong><span style="text-decoration: underline;"></span></strong></p>
<h2>Create the Farm</h2>
<p>Login to SPAPP01 (Application Server hosting the Central Administration site) using the installer account and launch <strong>SharePoint Management Shell</strong> as administrator. Execute the following command to create the farm:&nbsp;</p>
<div>
<pre class="scroll"><code class="cplusplus">E:\Scripts\Install\SPConfig.ps1 -configLocation E:\Scripts\Install\Config.xml -createJoin create -isCA "y"</code></pre>
</div>
<h2 class="CodeBlock">Join Servers to the Farm</h2>
<p>Login to SPAPP02 (The second Application Server hosting the Central Administration site) and launch <strong>SharePoint Management Shell</strong> as administrator. Execute the following PowerShell script:</p>
<div>
<pre class="scroll"><code class="cplusplus">E:\Scripts\Install\SPConfig.ps1 -configLocation E:\Scripts\Install\Config.xml -createJoin join -isCA "y"</code></pre>
</div>
<p>Run the following script on the below SharePoint servers:</p>
<div>
<pre class="scroll"><code class="cplusplus">E:\Scripts\Install\SPConfig.ps1 -configLocation E:\Scripts\Install\Config.xml -createJoin join -isCA "n"</code></pre>
</div>
<p>&nbsp;</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="123">
<p><strong>&nbsp;Server Name</strong></p>
</td>
<td valign="top" width="477">
<p><strong>&nbsp;Server Role</strong></p>
</td>
</tr>
<tr>
<td valign="top" width="123">
<p><strong>&nbsp;SPWEB01</strong><strong></strong></p>
</td>
<td valign="top" width="477">
<p>&nbsp;SharePoint 2013 Web Server 1</p>
</td>
</tr>
<tr>
<td valign="top" width="123">
<p><strong>&nbsp;SPWEB02</strong><strong></strong></p>
</td>
<td valign="top" width="477">
<p>&nbsp;SharePoint 2013 Web Server 2</p>
</td>
</tr>
<tr>
<td valign="top" width="123">
<p><strong>&nbsp;SPDCache01</strong><strong></strong></p>
</td>
<td valign="top" width="477">
<p>&nbsp;SharePoint 2013 Distribution Cache Server 1</p>
</td>
</tr>
<tr>
<td valign="top" width="123">
<p><strong>&nbsp;SPDCache02</strong><strong></strong></p>
</td>
<td valign="top" width="477">
<p>&nbsp;SharePoint 2013 Distribution Cache Server 2</p>
</td>
</tr>
<tr>
<td valign="top" width="123">
<p><strong>&nbsp;SPQuery01</strong><strong></strong></p>
</td>
<td valign="top" width="477">
<p>&nbsp;SharePoint 2013 Query Processing and Index Server 1</p>
</td>
</tr>
<tr>
<td valign="top" width="123">
<p><strong>&nbsp;SPQuery02</strong><strong></strong></p>
</td>
<td valign="top" width="477">
<p>&nbsp;SharePoint 2013 Query Processing and Index Server 2</p>
</td>
</tr>
<tr>
<td valign="top" width="123">
<p><strong>&nbsp;SPCrawl01</strong><strong></strong></p>
</td>
<td valign="top" width="477">
<p>&nbsp;SharePoint 2013 Admin, Crawl, Content Processing, Analytics Processing Server 1</p>
</td>
</tr>
<tr>
<td valign="top" width="123">
<p><strong>&nbsp;SPCrawl02</strong><strong></strong></p>
</td>
<td valign="top" width="477">
<p>&nbsp;SharePoint 2013 Admin, Crawl, Content Processing, Analytics Processing Server 2</p>
</td>
</tr>
</tbody>
</table>
<h2>&nbsp;Register Managed Accounts</h2>
<p>Login to SPAPP01 (Application Server hosting the Central Administration site) using the installer account and launch <strong>SharePoint Management Shell</strong> as administrator. Execute the following command to register managed accounts in the farm:</p>
<div>
<pre class="scroll"><code class="cplusplus">E:\Scripts\Install\SPCredentials.ps1 -configLocation E:\Scripts\Install\SPCredentials.xml</code></pre>
</div>
<h2>Configure Basic Services</h2>
<p>Login to SPAPP01 (Application Server hosting the Central Administration site) using the installer account and launch <strong>SharePoint Management Shell</strong> as administrator. Execute the following command to start required services and stop unwanted ones:</p>
<div>
<pre class="scroll"><code class="cplusplus">E:\Scripts\Install\SPServices.ps1 -configLocation E:\Scripts\Install\SPServices.xml</code></pre>
</div>
<p>&nbsp;The above script will stop unnecessary services from servers and starts the following service:</p>
<ul>
<li>Excel Services</li>
<li>Secure Store</li>
<li>Usage and Health Data Collection</li>
<li>Managed Metadata Services</li>
<li>State Services</li>
</ul>
<h2>Configure Usage and Health Data Collection</h2>
<p>Login to SPAPP01 (Application Server hosting the Central Administration site) using the installer account and launch <strong>SharePoint Management Shell</strong> as administrator. Execute the following command to start and configure Usage Service:</p>
<div>
<pre class="scroll"><code class="cplusplus">E:\Scripts\Install\SPUsage.ps1 -configLocation E:\Scripts\Install\SPServices.xml</code></pre>
</div>
<h2>Configure State Service</h2>
<p>Login to SPAPP01 (Application Server hosting the Central Administration site) using the installer account and launch <strong>SharePoint Management Shell</strong> as administrator. Execute the following command to start and configure Usage Service:</p>
<div>
<pre class="scroll"><code class="cplusplus">E:\Scripts\Install\SPStateService.ps1 -configLocation E:\Scripts\Install\SPServices.xml</code></pre>
</div>
<p><br />You should now have basic services started on all servers in the farm. It is recommended to check Servers in Farm page from Central administrations site to ensure that the correct services are started.</p>
<p>By the end of this blog series the expected farm topology will be as illustrated below:</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="112">
<p><strong>&nbsp;Server Name</strong></p>
</td>
<td valign="top" width="153">
<p><strong>&nbsp;Server Role</strong></p>
</td>
<td valign="top" width="336">
<p><strong>&nbsp;Services</strong></p>
</td>
</tr>
<tr>
<td valign="top" width="112">
<p><strong>&nbsp;SPWEB01</strong><strong></strong></p>
</td>
<td valign="top" width="153">
<p>Web Server</p>
</td>
<td valign="top" width="336">
<p>&nbsp;Microsoft SharePoint Foundation Web Application</p>
<p>&nbsp;Microsoft SharePoint Foundation Workflow Timer Service</p>
<p>&nbsp;Managed Metadata Web Service</p>
</td>
</tr>
<tr>
<td valign="top" width="112">
<p><strong>&nbsp;SPWEB02</strong><strong></strong></p>
</td>
<td valign="top" width="153">
<p>Web Server</p>
</td>
<td valign="top" width="336">
<p>&nbsp;Microsoft SharePoint Foundation Web Application</p>
<p>&nbsp;Microsoft SharePoint Foundation Workflow Timer Service</p>
<p>&nbsp;Managed Metadata Web Service</p>
</td>
</tr>
<tr>
<td valign="top" width="112">
<p><strong>&nbsp;SPDCache01</strong><strong></strong></p>
</td>
<td valign="top" width="153">
<p>Distribution Cache</p>
</td>
<td valign="top" width="336">
<p>&nbsp;Distributed Cache</p>
<p>&nbsp;Microsoft SharePoint Foundation Workflow Timer Service</p>
<p>&nbsp;Microsoft SharePoint Foundation Web Application</p>
</td>
</tr>
<tr>
<td valign="top" width="112">
<p><strong>&nbsp;SPDCache02</strong><strong></strong></p>
</td>
<td valign="top" width="153">
<p>Distribution Cache</p>
</td>
<td valign="top" width="336">
<p>&nbsp;Distributed Cache</p>
<p>&nbsp;Microsoft SharePoint Foundation Workflow Timer Service</p>
<p>&nbsp;Microsoft SharePoint Foundation Web Application</p>
</td>
</tr>
<tr>
<td valign="top" width="112">
<p><strong>&nbsp;SPAPP01</strong><strong></strong></p>
</td>
<td valign="top" width="153">
<p>Application Server</p>
</td>
<td valign="top" width="336">
<p>&nbsp;Central Administration</p>
<p>&nbsp;Excel Calculation Services</p>
<p>&nbsp;Microsoft SharePoint Foundation Workflow Timer Service</p>
<p>&nbsp;Secure Store Service</p>
<p>&nbsp;User Profile Service</p>
<p>&nbsp;User Profile Synchronization Service</p>
</td>
</tr>
<tr>
<td valign="top" width="112">
<p><strong>&nbsp;SPAPP02</strong><strong></strong></p>
</td>
<td valign="top" width="153">
<p>Application Server</p>
</td>
<td valign="top" width="336">
<p>&nbsp;Central Administration</p>
<p>&nbsp;Excel Calculation Services</p>
<p>&nbsp;Microsoft SharePoint Foundation Workflow Timer Service</p>
<p>&nbsp;Secure Store Service</p>
<p>&nbsp;User Profile Service</p>
</td>
</tr>
<tr>
<td valign="top" width="112">
<p><strong>&nbsp;SPQuery01</strong><strong></strong></p>
</td>
<td valign="top" width="153">
<p>Search - Query Processing and Index</p>
</td>
<td valign="top" width="336">
<p>&nbsp;Microsoft SharePoint Foundation Workflow Timer Service</p>
<p>&nbsp;Search Host Controller Service</p>
<p>&nbsp;Search Query and Site Settings Service</p>
<p>&nbsp;SharePoint Server Search</p>
</td>
</tr>
<tr>
<td valign="top" width="112">
<p><strong>&nbsp;SPQuery02</strong><strong></strong></p>
</td>
<td valign="top" width="153">
<p>Search - Query Processing and Index</p>
</td>
<td valign="top" width="336">
<p>&nbsp;Microsoft SharePoint Foundation Workflow Timer Service</p>
<p>&nbsp;Search Host Controller Service</p>
<p>&nbsp;Search Query and Site Settings Service</p>
<p>&nbsp;SharePoint Server Search</p>
</td>
</tr>
<tr>
<td valign="top" width="112">
<p><strong>&nbsp;SPCrawl01</strong><strong></strong></p>
</td>
<td valign="top" width="153">
<p>Search - Admin, Crawl, Content Processing, Analytics Processing</p>
</td>
<td valign="top" width="336">
<p>&nbsp;Microsoft SharePoint Foundation Workflow Timer Service</p>
<p>&nbsp;Search Host Controller Service</p>
<p>&nbsp;Search Query and Site Settings Service</p>
<p>&nbsp;SharePoint Server Search</p>
</td>
</tr>
<tr>
<td valign="top" width="112">
<p><strong>&nbsp;SPCrawl02</strong><strong></strong></p>
</td>
<td valign="top" width="153">
<p>Search - Admin, Crawl, Content Processing, Analytics Processing</p>
</td>
<td valign="top" width="336">
<p>&nbsp;Microsoft SharePoint Foundation Workflow Timer Service</p>
<p>&nbsp;Search Host Controller Service</p>
<p>&nbsp;Search Query and Site Settings Service</p>
<p>&nbsp;SharePoint Server Search</p>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>Lookout for the next blog post, where we complete the farm configuration by provisioning search, user profile services and distributed cache service.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Components.PostAttachments/00/10/40/31/58/BasicServices_Blog02.zip" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-40-31-58/BasicServices_5F00_Blog02.zip">BasicServices_Blog02.zip</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Manipulating list items in SharePoint Hosted Apps using the REST API</title>
      <link>https://docs.microsoft.com/archive/blogs/uksharepoint/manipulating-list-items-in-sharepoint-hosted-apps-using-the-rest-api</link>
      <pubDate>Fri, 22 Feb 2013 03:54:00 GMT</pubDate>
      <dc:creator><![CDATA[James Glading]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/uksharepoint/2013/02/22/manipulating-list-items-in-sharepoint-hosted-apps-using-the-rest-api/</guid>
      <description><![CDATA[In this post I will describe how to use the REST API to manipulate list items from within a...]]></description>
      <content:encoded><![CDATA[<p>In this post I will describe how to use the REST API to manipulate list items from within a SharePoint hosted App. For information on the different hosting options available (Azure Auto hosted and Provider Hosted Apps) there is a good MSDN article here.</p>
<h4>Introduction</h4>
<p>The REST API in SharePoint 2013 provides developers with a simple standardised method of accessing information contained within SharePoint. It can be used from any technology that is capable of sending standard http requests and is particularly useful for developers who are not familiar with the Client Side Object Model. For a full list of advantages and disadvantages of the REST API, and for a comparison with other API&rsquo;s click <a href="https://msdn.microsoft.com/en-us/library/jj164060.aspx#RESTOData">here</a>.</p>
<p>This article does not cover App Permissions. For information about permissions there is a good MSDN article <a href="https://msdn.microsoft.com/en-us/library/office/apps/fp142383">here</a>. Use of the REST API in other hosting options, whilst similar to SharePoint Hosted Apps, is not covered in this article.</p>
<h4>Obtaining the site URI</h4>
<p>One key prerequisite to interacting with SharePoint lists items is to obtain the correct URI for the SharePoint site the list is hosted in. There are multiple ways to do this:</p>
<ol>
<li>On SharePoint pages <em>_spPageContextInfo.siteAbsoluteUrl</em> contains the URI to the site that the app is installed within (the parent site).</li>
<li>You can include a set of standard tokens in the URL attribute of both pages and web parts. Adding <em>{StandardTokens}</em><em> </em>will include the following 7 parameters to the url; SPHostUrl, SPHostTitle, SPAppWebUrl, SPLanguage, SPClientTag, SPProductNumber, and SenderId. These will need to be split out of the URL to be used. There are multiple ways to do this. The simplest is to loop through all the parameters until you find the parameter you are looking for. The following snippet of code searches for the SPAppWebUrl.</li>
</ol>
<p>&nbsp;</p>
<div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:47c1be8e-2795-4709-b1bb-ada7ec4714a4" class="wlWriterEditableSmartContent" style="margin: 0px; padding: 0px; float: none; display: inline;">
<div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt;">
<div style="background: #fff; max-height: 300px; overflow: auto;"><ol style="background: #ffffff; margin: 0; padding: 0 0 0 5px; white-space: nowrap;">
<li><span style="background: #ffffff; color: #0000ff;">var</span><span style="background: #ffffff; color: #000000;"> params = document.URL.split(</span><span style="background: #ffffff; color: #a31515;">"?"</span><span style="background: #ffffff; color: #000000;">)[1].split(</span><span style="background: #ffffff; color: #a31515;">"&amp;"</span><span style="background: #ffffff; color: #000000;">);</span></li>
<li style="background: #f3f3f3;"><span style="background: #ffffff; color: #0000ff;">for</span><span style="background: #ffffff; color: #000000;"> (</span><span style="background: #ffffff; color: #0000ff;">var</span><span style="background: #ffffff; color: #000000;"> i = 0; i &lt; params.length; i = i + 1) {</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #0000ff;">var</span><span style="background: #ffffff; color: #000000;"> param = params[i].split(</span><span style="background: #ffffff; color: #a31515;">"="</span><span style="background: #ffffff; color: #000000;">);</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #0000ff;">switch</span><span style="background: #ffffff; color: #000000;"> (param[0]) {</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #0000ff;">case</span><span style="background: #ffffff; color: #a31515;">"ParameterName"</span><span style="background: #ffffff; color: #000000;">:</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">Variable = decodeURIComponent(param[1]);</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #0000ff;">break</span><span style="background: #ffffff; color: #000000;">;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #008000;">// add additional cases for other parameters here, for example:</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #008000;">// case "OtherParameterName":</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #008000;">//&nbsp;&nbsp;&nbsp;&nbsp;DifferentVariable = parseInt(decodeURIComponent(param[1]));</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #008000;">//&nbsp;&nbsp;&nbsp;&nbsp;break;&nbsp;&nbsp;&nbsp;&nbsp;</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">}</span></li>
<li><span style="background: #ffffff; color: #000000;">} </span></li>
</ol></div>
</div>
</div>
<p>There are several different tokens that you can include in the url's used to open pages within your App. For more information about the different tokens and some basic information about each of them click <a href="https://msdn.microsoft.com/en-us/library/jj163816.aspx">here</a>. To add the tokens to your start page you can use the visual designer for the App's manifest file. The setting can be found on the &lsquo;General&rsquo;. It is worth noting that the manifest editor has changed significantly since the original release of the developer tools. If you are using an old version of the tools then this setting may be in a different place.</p>
<p>You can also add the tokens using the source code editor. The following example shows the start page url where the standard tokens have been added (note that ?{StandardTokens} has been appended to the StartPage url):</p>
<div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:155c3f6a-402e-42b4-b42a-b28836e766af" class="wlWriterEditableSmartContent" style="margin: 0px; padding: 0px; float: none; display: inline;">
<div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt;">
<div style="background: #fff; max-height: 300px; overflow: auto;"><ol style="background: #ffffff; margin: 0; padding: 0 0 0 5px; white-space: nowrap;">
<li><span style="background: #ffffff; color: #0000ff;">&lt;</span><span style="background: #ffffff; color: #a31515;">Properties</span><span style="background: #ffffff; color: #0000ff;">&gt;</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;<span style="background: #ffffff; color: #0000ff;">&lt;</span><span style="background: #ffffff; color: #a31515;">Title</span><span style="background: #ffffff; color: #0000ff;">&gt;</span><span style="background: #ffffff; color: #000000;">Example CRUD Operations</span><span style="background: #ffffff; color: #0000ff;">&lt;/</span><span style="background: #ffffff; color: #a31515;">Title</span><span style="background: #ffffff; color: #0000ff;">&gt;</span></li>
<li>&nbsp;&nbsp;<span style="background: #ffffff; color: #0000ff;">&lt;</span><span style="background: #ffffff; color: #a31515;">StartPage</span><span style="background: #ffffff; color: #0000ff;">&gt;</span><span style="background: #ffffff; color: #000000;">~appWebUrl/Pages/Default.aspx?{StandardTokens}</span><span style="background: #ffffff; color: #0000ff;">&lt;/</span><span style="background: #ffffff; color: #a31515;">StartPage</span><span style="background: #ffffff; color: #0000ff;">&gt;</span></li>
<li style="background: #f3f3f3;"><span style="background: #ffffff; color: #0000ff;">&lt;/</span><span style="background: #ffffff; color: #a31515;">Properties</span><span style="background: #ffffff; color: #0000ff;">&gt;</span></li>
</ol></div>
</div>
</div>
<p>&nbsp;</p>
<h4>REST URI Operators</h4>
<p>Once you have the correct base URI the next step is to determine the correct URI for the list with which you would like to interact. The REST endpoint exposes the same GetByTitle() method that the Client Side Object Model offers and can be used by appending &ldquo;/_api/web/lists/getbytitle(title)&rdquo; to the end of the base URI. More information about the REST endpoint can be found in <a href="https://msdn.microsoft.com/en-us/library/fp142385.aspx">this</a> MSDN article.</p>
<h4>&nbsp;</h4>
<h4>List Item Types</h4>
<p>To update or create list items you will need to include the list item type. This is a string automatically created by SharePoint when the list is first created. Two possible ways to obtain this are:</p>
<ol>
<li>Perform a read operation on the list and locate the type within the returned set of elements. In JSON format the type can be found within the __metadata attribute of all of the returned list items. In Atom/xml format (the default format returned if you query from a web browser) you can find it in the category scheme attribute (labelled &lsquo;term&rsquo;) within the item.</li>
<li>You can attempt to generate the value from the list name. In general list item types follow the convention SP.Data.<strong>ListName</strong>ListItem (e.g. list name is &ldquo;Test&rdquo;, list item type is SP.Data.TestListItem). However this is not always the case. For example SharePoint automatically capitalises the first letter of the list name (e.g. list name &ldquo;test&rdquo; list item type is SP.Data.TestListItem). The following code snippet shows how to generate the List Item Type based on the list name.</li>
</ol>
<p>&nbsp;</p>
<div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:11cff482-8cea-4773-85f4-f488a7a4a692" class="wlWriterEditableSmartContent" style="margin: 0px; padding: 0px; float: none; display: inline;">
<div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt;">
<div style="background: #fff; max-height: 300px; overflow: auto;"><ol style="background: #ffffff; margin: 0; padding: 0 0 0 5px; white-space: nowrap;">
<li><span style="background: #ffffff; color: #0000ff;">function</span><span style="background: #ffffff; color: #000000;"> GetItemTypeForListName(name) {</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #0000ff;">return</span><span style="background: #ffffff; color: #a31515;">"SP.Data."</span><span style="background: #ffffff; color: #000000;"> + name.charAt(0).toUpperCase() + name.slice(1) + </span><span style="background: #ffffff; color: #a31515;">"ListItem"</span><span style="background: #ffffff; color: #000000;">;</span></li>
<li><span style="background: #ffffff; color: #000000;">}</span></li>
</ol></div>
</div>
</div>
<h4>&nbsp;</h4>
<h4>Request Digests</h4>
<p>A replay attack occurs when a valid request is sent to the server and a copy of that request is stored. The request is then sent multiple times (replayed). This can result in a variety of different issues the most common of which is duplication of data. To prevent this, SharePoint requires the user to include a request digest value with each create, update and delete operation. This value is then used by SharePoint to identify non-genuine requests. Inside SharePoint Hosted apps, the request digest can be found by reading the value of the &ldquo;__REQUESTDIGEST&rdquo; object within the html page.</p>
<div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:f76bbc90-d40e-4e87-ad94-3a7247f76ced" class="wlWriterEditableSmartContent" style="margin: 0px; padding: 0px; float: none; display: inline;">
<div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt;">
<div style="background: #fff; max-height: 300px; overflow: auto;"><ol style="background: #ffffff; margin: 0; padding: 0 0 0 5px; white-space: nowrap;">
<li><span style="background: #ffffff; color: #0000ff;">var</span><span style="background: #ffffff; color: #000000;"> digestValue = $(</span><span style="background: #ffffff; color: #a31515;">"#__REQUESTDIGEST"</span><span style="background: #ffffff; color: #000000;">).val()</span></li>
</ol></div>
</div>
</div>
<p><strong>Note:</strong> this will only work on pages that contain the SharePoint Chrome element. The example above requires JQuery to work.</p>
<h4>eTags</h4>
<p>When updating or deleting items within SharePoint lists via REST you must specify the Entity Tag (eTag) value that was returned with the item during the initial query. This enables SharePoint to determine if the item has changed since it was requested. Alternatively you can tell SharePoint to perform the operation regardless by specifying * as the eTag value. For example:</p>
<ol>
<li><span style="font-family: courier new;">&ldquo;If-Match&rdquo;: item.__metadata.etag </span>can be used to specify the actual eTag value (&lsquo;item&rsquo; is the object returned from SharePoint containing the list item in JSON format).</li>
<li><span style="font-family: courier new;">&ldquo;If-Match&rdquo;: &ldquo;*&rdquo;</span> can be used to match any eTag value resulting in the operation being performed regardless of the actual value.</li>
</ol>
<p>The examples above can be found in the code sample at the end of this article. They form part of the Ajax call for updating an item. eTags are part of the HTTP Protocol V1.1, more information on the topic can be found <a href="https://msdn.microsoft.com/en-us/library/dd541486.aspx">here</a>.</p>
<h4>Cross Domain Calls</h4>
<p>Cross domain calls are blocked by modern web browsers due to security concerns. This is a common issue in web based development and is particularly relevant due to the nature of SharePoint hosted Apps. For example, when accessing data in the parent web (<a href="https://Sharepoint.com">https://Sharepoint.com</a>) from an App (hosted at <a href="https://Apps.SharePoint.com/MyApp">https://Apps.SharePoint.com/MyApp</a>) the calls will be blocked. To get round this you can use the SP.RequestExecutor.js script to relay messages to SharePoint from within the same domain.</p>
<p>To do this you will need to load the JavaScript file from the host web and then use it to execute the REST queries across the network. The following example shows how to do this.</p>
<div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:762ba883-0a8c-4e37-8e0f-4f6074ea98a3" class="wlWriterEditableSmartContent" style="margin: 0px; padding: 0px; float: none; display: inline;">
<div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt;">
<div style="background: #fff; max-height: 300px; overflow: auto;"><ol style="background: #ffffff; margin: 0; padding: 0 0 0 5px; white-space: nowrap;">
<li><span style="background: #ffffff; color: #0000ff;">var</span><span style="background: #ffffff; color: #000000;"> SPHostUrl;</span></li>
<li style="background: #f3f3f3;"><span style="background: #ffffff; color: #0000ff;">var</span><span style="background: #ffffff; color: #000000;"> SPAppWebUrl;</span></li>
<li><span style="background: #ffffff; color: #0000ff;">var</span><span style="background: #ffffff; color: #000000;"> ready = </span><span style="background: #ffffff; color: #0000ff;">false</span><span style="background: #ffffff; color: #000000;">;</span></li>
<li style="background: #f3f3f3;">&nbsp;</li>
<li><span style="background: #ffffff; color: #008000;">// this function is executed when the page has finished loading. It performs two tasks:</span></li>
<li style="background: #f3f3f3;"><span style="background: #ffffff; color: #008000;">//&nbsp;&nbsp;&nbsp;&nbsp;1. It extracts the parameters from the url </span></li>
<li><span style="background: #ffffff; color: #008000;">//&nbsp;&nbsp;&nbsp;&nbsp;2. It loads the request executor script from the host web</span></li>
<li style="background: #f3f3f3;"><span style="background: #ffffff; color: #000000;">$(document).ready(</span><span style="background: #ffffff; color: #0000ff;">function</span><span style="background: #ffffff; color: #000000;"> () {</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #0000ff;">var</span><span style="background: #ffffff; color: #000000;"> params = document.URL.split(</span><span style="background: #ffffff; color: #a31515;">"?"</span><span style="background: #ffffff; color: #000000;">)[1].split(</span><span style="background: #ffffff; color: #a31515;">"&amp;"</span><span style="background: #ffffff; color: #000000;">);</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #0000ff;">for</span><span style="background: #ffffff; color: #000000;"> (</span><span style="background: #ffffff; color: #0000ff;">var</span><span style="background: #ffffff; color: #000000;"> i = 0; i &lt; params.length; i = i + 1) {</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #0000ff;">var</span><span style="background: #ffffff; color: #000000;"> param = params[i].split(</span><span style="background: #ffffff; color: #a31515;">"="</span><span style="background: #ffffff; color: #000000;">);</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #0000ff;">switch</span><span style="background: #ffffff; color: #000000;"> (param[0]) {</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #0000ff;">case</span><span style="background: #ffffff; color: #a31515;">"SPAppWebUrl"</span><span style="background: #ffffff; color: #000000;">:</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">SPAppWebUrl = decodeURIComponent(param[1]);</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #0000ff;">break</span><span style="background: #ffffff; color: #000000;">;</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #0000ff;">case</span><span style="background: #ffffff; color: #a31515;">"SPHostUrl"</span><span style="background: #ffffff; color: #000000;">:</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">SPHostUrl = decodeURIComponent(param[1]);</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #0000ff;">break</span><span style="background: #ffffff; color: #000000;">;</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">}</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">}</span></li>
<li>&nbsp;</li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #008000;">// load the executor script, once completed set the ready variable to true so that</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #008000;">// we can easily identify if the script has been loaded</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">$.getScript(SPHostUrl + </span><span style="background: #ffffff; color: #a31515;">"/_Layouts/15/SP.RequestExecutor.js"</span><span style="background: #ffffff; color: #000000;">, </span><span style="background: #ffffff; color: #0000ff;">function</span><span style="background: #ffffff; color: #000000;"> (data) {</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">ready = </span><span style="background: #ffffff; color: #0000ff;">true</span><span style="background: #ffffff; color: #000000;">;</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">});</span></li>
<li><span style="background: #ffffff; color: #000000;">});</span></li>
<li style="background: #f3f3f3;">&nbsp;</li>
<li><span style="background: #ffffff; color: #008000;">// this function retrieves the items within a list which is contained within the parent web</span></li>
<li style="background: #f3f3f3;"><span style="background: #ffffff; color: #0000ff;">function</span><span style="background: #ffffff; color: #000000;"> GetItems() {</span></li>
<li>&nbsp;</li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #008000;">// only execute this function if the script has been loaded</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #0000ff;">if</span><span style="background: #ffffff; color: #000000;"> (ready) {</span></li>
<li style="background: #f3f3f3;">&nbsp;</li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #008000;">// the name of the list to interact with</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #0000ff;">var</span><span style="background: #ffffff; color: #000000;"> listName = </span><span style="background: #ffffff; color: #a31515;">"MyList"</span><span style="background: #ffffff; color: #000000;">;</span></li>
<li>&nbsp;</li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #008000;">// the url to use for the REST call. </span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #0000ff;">var</span><span style="background: #ffffff; color: #000000;"> url = SPAppWebUrl + </span><span style="background: #ffffff; color: #a31515;">"/_api/SP.AppContextSite(@target)"</span><span style="background: #ffffff; color: #000000;"> +</span></li>
<li style="background: #f3f3f3;">&nbsp;</li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #008000;">// this is the location of the item in the parent web. This is the line </span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #008000;">// you would need to change to add filters, query the site etc</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #a31515;">"/web/lists/getbytitle('"</span><span style="background: #ffffff; color: #000000;"> + listName + </span><span style="background: #ffffff; color: #a31515;">"')/items?"</span><span style="background: #ffffff; color: #000000;"> +</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #a31515;">"@target='"</span><span style="background: #ffffff; color: #000000;"> + SPHostUrl + </span><span style="background: #ffffff; color: #a31515;">"'"</span><span style="background: #ffffff; color: #000000;">;</span></li>
<li>&nbsp;</li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #008000;">// create&nbsp;&nbsp;new executor passing it the url created previously</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #0000ff;">var</span><span style="background: #ffffff; color: #000000;"> executor = </span><span style="background: #ffffff; color: #0000ff;">new</span><span style="background: #ffffff; color: #000000;"> SP.RequestExecutor(SPAppWebUrl);</span></li>
<li style="background: #f3f3f3;">&nbsp;</li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #008000;">// execute the request, this is similar although not the same as a standard AJAX request</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">executor.executeAsync(</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">{</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">url: url,</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">method: </span><span style="background: #ffffff; color: #a31515;">"GET"</span><span style="background: #ffffff; color: #000000;">,</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">headers: { </span><span style="background: #ffffff; color: #a31515;">"Accept"</span><span style="background: #ffffff; color: #000000;">: </span><span style="background: #ffffff; color: #a31515;">"application/json; odata=verbose"</span><span style="background: #ffffff; color: #000000;"> },</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">success: </span><span style="background: #ffffff; color: #0000ff;">function</span><span style="background: #ffffff; color: #000000;"> (data) {</span></li>
<li style="background: #f3f3f3;">&nbsp;</li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #008000;">// parse the results into an object that you can use within javascript</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #0000ff;">var</span><span style="background: #ffffff; color: #000000;"> results = eval(JSON.parse(data.body));</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">},</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">error: </span><span style="background: #ffffff; color: #0000ff;">function</span><span style="background: #ffffff; color: #000000;"> (data) {</span></li>
<li>&nbsp;</li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #008000;">// an error occured, the details can be found in the data object.</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">alert(</span><span style="background: #ffffff; color: #a31515;">"Ooops an error occured"</span><span style="background: #ffffff; color: #000000;">);</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">}</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">});</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">}</span></li>
<li><span style="background: #ffffff; color: #000000;">}</span></li>
</ol></div>
</div>
</div>
<p>&nbsp;</p>
<p><strong>Note</strong>: the middle line of the URL variable is where you would change the address that the REST call is sent to. For example to get information about a list rather than its items you can remove &ldquo;/items&rdquo; leaving "/web/lists/getbytitle('" + listName + "')?"</p>
<h1>&nbsp;</h1>
<h1>Example Operations</h1>
<p>This section contains sample code for all of the CRUD operations. All of this sample code can be found in the source code which is available for download. The request executor is not needed in this example since the site URL is in the same domain as the app.</p>
<h4>Create</h4>
<p>The following snippet of code shows how to perform a Create operation against a SharePoint list. The first line of the function is a call to a method which returns a list item type based on the name of the list using the rules mentioned previously. The next 4 lines create a JavaScript object which contains the information about the item that should be created including values for each of the fields and the item type. The reminder of the function executes the ajax call and then calls either the success or failure functions (passed into the function as parameters).</p>
<div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:f28b514e-33d7-46bc-9366-2ef510b83bbf" class="wlWriterEditableSmartContent" style="margin: 0px; padding: 0px; float: none; display: inline;">
<div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt;">
<div style="background: #fff; max-height: 300px; overflow: auto;"><ol style="background: #ffffff; margin: 0; padding: 0 0 0 5px; white-space: nowrap;">
<li><span style="background: #ffffff; color: #008000;">// CREATE Operation</span></li>
<li style="background: #f3f3f3;"><span style="background: #ffffff; color: #008000;">// listName: The name of the list you want to get items from</span></li>
<li><span style="background: #ffffff; color: #008000;">// siteurl: The url of the site that the list is in. // title: The value of the title field for the new item</span></li>
<li style="background: #f3f3f3;"><span style="background: #ffffff; color: #008000;">// success: The function to execute if the call is sucesfull</span></li>
<li><span style="background: #ffffff; color: #008000;">// failure: The function to execute if the call fails</span></li>
<li style="background: #f3f3f3;"><span style="background: #ffffff; color: #0000ff;">function</span><span style="background: #ffffff; color: #000000;"> createListItemWithDetails(listName, siteUrl, title, success, failure) {</span></li>
<li>&nbsp;</li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #0000ff;">var</span><span style="background: #ffffff; color: #000000;"> itemType = GetItemTypeForListName(listName);</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #0000ff;">var</span><span style="background: #ffffff; color: #000000;"> item = {</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #a31515;">"__metadata"</span><span style="background: #ffffff; color: #000000;">: { </span><span style="background: #ffffff; color: #a31515;">"type"</span><span style="background: #ffffff; color: #000000;">: itemType },</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #a31515;">"Title"</span><span style="background: #ffffff; color: #000000;">: title</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">};</span></li>
<li>&nbsp;</li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">$.ajax({</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">url: siteUrl + </span><span style="background: #ffffff; color: #a31515;">"/_api/web/lists/getbytitle('"</span><span style="background: #ffffff; color: #000000;"> + listName + </span><span style="background: #ffffff; color: #a31515;">"')/items"</span><span style="background: #ffffff; color: #000000;">,</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">type: </span><span style="background: #ffffff; color: #a31515;">"POST"</span><span style="background: #ffffff; color: #000000;">,</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">contentType: </span><span style="background: #ffffff; color: #a31515;">"application/json;odata=verbose"</span><span style="background: #ffffff; color: #000000;">,</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">data: JSON.stringify(item),</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">headers: {</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #a31515;">"Accept"</span><span style="background: #ffffff; color: #000000;">: </span><span style="background: #ffffff; color: #a31515;">"application/json;odata=verbose"</span><span style="background: #ffffff; color: #000000;">,</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #a31515;">"X-RequestDigest"</span><span style="background: #ffffff; color: #000000;">: $(</span><span style="background: #ffffff; color: #a31515;">"#__REQUESTDIGEST"</span><span style="background: #ffffff; color: #000000;">).val()</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">},</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">success: </span><span style="background: #ffffff; color: #0000ff;">function</span><span style="background: #ffffff; color: #000000;"> (data) {</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">success(data);</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">},</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">error: </span><span style="background: #ffffff; color: #0000ff;">function</span><span style="background: #ffffff; color: #000000;"> (data) {</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">failure(data);</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">}</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">});</span></li>
<li style="background: #f3f3f3;"><span style="background: #ffffff; color: #000000;">}</span></li>
</ol></div>
</div>
</div>
<h4>&nbsp;</h4>
<h2>Read</h2>
<p>Reading items is probably the simplest of all of the CRUD operations. The code below shows the simplest form of a read operation. A simple ajax call is executed against the SharePoint server. If the call succeeds then the success function (passed in as a parameter) is called, if it fails then the failure function (also passed in as a parameter) is called. In both cases the data returned from the server is passed through to the function. The code sample also includes an example of how to retrieve an item based on its ID.</p>
<div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:a8486290-425b-4cf3-a596-529ea2be432c" class="wlWriterEditableSmartContent" style="margin: 0px; padding: 0px; float: none; display: inline;">
<div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt;">
<div style="background: #fff; max-height: 300px; overflow: auto;"><ol style="background: #ffffff; margin: 0; padding: 0 0 0 5px; white-space: nowrap;">
<li><span style="background: #ffffff; color: #008000;">// READ opperation</span></li>
<li style="background: #f3f3f3;"><span style="background: #ffffff; color: #008000;">// listName: The name of the list you want to get items from</span></li>
<li><span style="background: #ffffff; color: #008000;">// siteurl: The url of the site that the list is in. </span></li>
<li style="background: #f3f3f3;"><span style="background: #ffffff; color: #008000;">// success: The function to execute if the call is sucesfull</span></li>
<li><span style="background: #ffffff; color: #008000;">// failure: The function to execute if the call fails</span></li>
<li style="background: #f3f3f3;"><span style="background: #ffffff; color: #0000ff;">function</span><span style="background: #ffffff; color: #000000;"> getListItems(listName, siteurl, success, failure) {</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">$.ajax({</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">url: siteurl + </span><span style="background: #ffffff; color: #a31515;">"/_api/web/lists/getbytitle('"</span><span style="background: #ffffff; color: #000000;"> + listName + </span><span style="background: #ffffff; color: #a31515;">"')/items"</span><span style="background: #ffffff; color: #000000;">,</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">method: </span><span style="background: #ffffff; color: #a31515;">"GET"</span><span style="background: #ffffff; color: #000000;">,</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">headers: { </span><span style="background: #ffffff; color: #a31515;">"Accept"</span><span style="background: #ffffff; color: #000000;">: </span><span style="background: #ffffff; color: #a31515;">"application/json; odata=verbose"</span><span style="background: #ffffff; color: #000000;"> },</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">success: </span><span style="background: #ffffff; color: #0000ff;">function</span><span style="background: #ffffff; color: #000000;"> (data) {</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">success(data);</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">},</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">error: </span><span style="background: #ffffff; color: #0000ff;">function</span><span style="background: #ffffff; color: #000000;"> (data) {</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">failure(data);</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">}</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">});</span></li>
<li style="background: #f3f3f3;"><span style="background: #ffffff; color: #000000;">}</span></li>
</ol></div>
</div>
</div>
<h4>&nbsp;</h4>
<h2>Update</h2>
<p>In contrast to reading list items updating them is probably the hardest operation. To update an item you will need to obtain the URL of the item and, depending on your handling of eTags, the eTag value. The simplest way to do this is to perform a get operation and then use the properties of the item. The update method uses the same method mentioned for update operations to generate the list item type.</p>
<p>The first line of this function calls a method to get the list item type for the specified list. The next four lines create a JavaScript object containing details of the list item. The next line is a call to a get operation (similar to the one described previously) which returns the list item to be updated. This allows us to extract the eTag and item url and makes it easier to update. If this is successful then the call to update the item is executed and either the success or failure function is executed depending on the result.</p>
<div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:c20a9766-3dd7-4407-b2c9-06486ecf2ec1" class="wlWriterEditableSmartContent" style="margin: 0px; padding: 0px; float: none; display: inline;">
<div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt;">
<div style="background: #fff; max-height: 300px; overflow: auto;"><ol style="background: #ffffff; margin: 0; padding: 0 0 0 5px; white-space: nowrap;">
<li><span style="background: #ffffff; color: #008000;">// Update Operation</span></li>
<li style="background: #f3f3f3;"><span style="background: #ffffff; color: #008000;">// listName: The name of the list you want to get items from</span></li>
<li><span style="background: #ffffff; color: #008000;">// siteurl: The url of the site that the list is in. // title: The value of the title field for the new item</span></li>
<li style="background: #f3f3f3;"><span style="background: #ffffff; color: #008000;">// itemId: the id of the item to update</span></li>
<li><span style="background: #ffffff; color: #008000;">// success: The function to execute if the call is sucesfull</span></li>
<li style="background: #f3f3f3;"><span style="background: #ffffff; color: #008000;">// failure: The function to execute if the call fails</span></li>
<li><span style="background: #ffffff; color: #0000ff;">function</span><span style="background: #ffffff; color: #000000;"> updateListItem(itemId, listName, siteUrl, title, success, failure) {</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #0000ff;">var</span><span style="background: #ffffff; color: #000000;"> itemType = GetItemTypeForListName(listName);</span></li>
<li>&nbsp;</li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #0000ff;">var</span><span style="background: #ffffff; color: #000000;"> item = {</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #a31515;">"__metadata"</span><span style="background: #ffffff; color: #000000;">: { </span><span style="background: #ffffff; color: #a31515;">"type"</span><span style="background: #ffffff; color: #000000;">: itemType },</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #a31515;">"Title"</span><span style="background: #ffffff; color: #000000;">: title</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">};</span></li>
<li style="background: #f3f3f3;">&nbsp;</li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">getListItemWithId(itemId, listName, siteUrl, </span><span style="background: #ffffff; color: #0000ff;">function</span><span style="background: #ffffff; color: #000000;"> (data) {</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">$.ajax({</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">url: data.__metadata.uri,</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">type: </span><span style="background: #ffffff; color: #a31515;">"POST"</span><span style="background: #ffffff; color: #000000;">,</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">contentType: </span><span style="background: #ffffff; color: #a31515;">"application/json;odata=verbose"</span><span style="background: #ffffff; color: #000000;">,</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">data: JSON.stringify(item),</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">headers: {</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #a31515;">"Accept"</span><span style="background: #ffffff; color: #000000;">: </span><span style="background: #ffffff; color: #a31515;">"application/json;odata=verbose"</span><span style="background: #ffffff; color: #000000;">,</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #a31515;">"X-RequestDigest"</span><span style="background: #ffffff; color: #000000;">: $(</span><span style="background: #ffffff; color: #a31515;">"#__REQUESTDIGEST"</span><span style="background: #ffffff; color: #000000;">).val(),</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #a31515;">"X-HTTP-Method"</span><span style="background: #ffffff; color: #000000;">: </span><span style="background: #ffffff; color: #a31515;">"MERGE"</span><span style="background: #ffffff; color: #000000;">,</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #a31515;">"If-Match"</span><span style="background: #ffffff; color: #000000;">: data.__metadata.etag</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">},</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">success: </span><span style="background: #ffffff; color: #0000ff;">function</span><span style="background: #ffffff; color: #000000;"> (data) {</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">success(data);</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">},</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">error: </span><span style="background: #ffffff; color: #0000ff;">function</span><span style="background: #ffffff; color: #000000;"> (data) {</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">failure(data);</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">}</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">});</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">}, </span><span style="background: #ffffff; color: #0000ff;">function</span><span style="background: #ffffff; color: #000000;">(data){</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">failure(data);</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">});</span></li>
<li><span style="background: #ffffff; color: #000000;">}</span></li>
</ol></div>
</div>
</div>
<h2>&nbsp;</h2>
<h2>Delete</h2>
<p>The code below performs a delete operation. In a similar way to updating items delete operations are performed using the URI of the item and depending on how eTags are handled the eTag value of the item. In this example the item is first retrieved and then its properties (uri and eTag) are used to execute the delete operation.</p>
<div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:a1e0c0cb-619d-4f71-aa98-8b0a06eccd4c" class="wlWriterEditableSmartContent" style="margin: 0px; padding: 0px; float: none; display: inline;">
<div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt;">
<div style="background: #fff; max-height: 300px; overflow: auto;"><ol style="background: #ffffff; margin: 0; padding: 0 0 0 5px; white-space: nowrap;">
<li><span style="background: #ffffff; color: #008000;">// Delete Operation</span></li>
<li style="background: #f3f3f3;"><span style="background: #ffffff; color: #008000;">// itemId: the id of the item to delete</span></li>
<li><span style="background: #ffffff; color: #008000;">// listName: The name of the list you want to delete the item from</span></li>
<li style="background: #f3f3f3;"><span style="background: #ffffff; color: #008000;">// siteurl: The url of the site that the list is in. </span></li>
<li><span style="background: #ffffff; color: #008000;">// success: The function to execute if the call is sucesfull</span></li>
<li style="background: #f3f3f3;"><span style="background: #ffffff; color: #008000;">// failure: The function to execute if the call fails</span></li>
<li><span style="background: #ffffff; color: #0000ff;">function</span><span style="background: #ffffff; color: #000000;"> deleteListItem(itemId, listName, siteUrl, success, failure) {</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">getListItemWithId(itemId, listName, siteUrl,</span><span style="background: #ffffff; color: #0000ff;">function</span><span style="background: #ffffff; color: #000000;"> (data) {</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">$.ajax({</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">url: data.__metadata.uri,</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">type: </span><span style="background: #ffffff; color: #a31515;">"POST"</span><span style="background: #ffffff; color: #000000;">,</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">headers: {</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #a31515;">"Accept"</span><span style="background: #ffffff; color: #000000;">: </span><span style="background: #ffffff; color: #a31515;">"application/json;odata=verbose"</span><span style="background: #ffffff; color: #000000;">,</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #a31515;">"X-Http-Method"</span><span style="background: #ffffff; color: #000000;">: </span><span style="background: #ffffff; color: #a31515;">"DELETE"</span><span style="background: #ffffff; color: #000000;">,</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #a31515;">"X-RequestDigest"</span><span style="background: #ffffff; color: #000000;">: $(</span><span style="background: #ffffff; color: #a31515;">"#__REQUESTDIGEST"</span><span style="background: #ffffff; color: #000000;">).val(),</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #a31515;">"If-Match"</span><span style="background: #ffffff; color: #000000;">: data.__metadata.etag</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">},</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">success: </span><span style="background: #ffffff; color: #0000ff;">function</span><span style="background: #ffffff; color: #000000;"> (data) {</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">success(data);</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">},</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">error: </span><span style="background: #ffffff; color: #0000ff;">function</span><span style="background: #ffffff; color: #000000;"> (data) {</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">failure(data);</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">}</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">});</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">},</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #0000ff;">function</span><span style="background: #ffffff; color: #000000;"> (data) {</span></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">failure(data);</span></li>
<li style="background: #f3f3f3;">&nbsp;&nbsp;&nbsp;<span style="background: #ffffff; color: #000000;">});</span></li>
<li><span style="background: #ffffff; color: #000000;">}</span></li>
</ol></div>
</div>
</div>
<h4>&nbsp;</h4>
<h4>Source Code</h4>
<p>The following downloadable source code contains a working example of all four operations. To run the example you will need to configure the SiteUrl of the project to point to a SharePoint 2013 developer site. To do this click on the project in solution explorer and open up the properties task pane. Enter the URL of your site into the SiteUrl box and then press F5.</p>
<p>The sample contains a page hosted within the App Web which interacts with a list in the Parent Web. When you install the App you will be asked to select a list and trust it. The list you select must contain a Title column (a new custom list will work just fine). To use the App enter the name of the list you want to access data from (this must match the list you selected when you trusted the App) and then use the controls under each of the four headings. The code is all contained within the App.js file of the project.</p>
<p><strong>Please Note:</strong> to run this sample you will also need access to a SharePoint server which has been configured for Apps. The simplest way to do this is to create an <a href="https://msdn.microsoft.com/en-us/library/fp179924.aspx">Office 365 developer account</a>. Alternatively you can install SharePoint on your own server. There is a guide to configuring SharePoint 2013 servers for Apps <a href="https://technet.microsoft.com/en-us/library/fp161236.aspx">here</a>.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Components.PostAttachments/00/10/39/33/15/Example%20CRUD%20Operations.zip" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-39-33-15/Example-CRUD-Operations.zip">Example CRUD Operations.zip</a></p>]]></content:encoded>
    </item>
    <item>
      <title>James Glading</title>
      <link>https://docs.microsoft.com/archive/blogs/uksharepoint/james-glading</link>
      <pubDate>Wed, 06 Feb 2013 09:02:00 GMT</pubDate>
      <dc:creator><![CDATA[James Glading]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/uksharepoint/2013/02/06/james-glading/</guid>
      <description><![CDATA[James Glading is an Associate Consultant at Microsoft Consulting Services. A recent graduate from...]]></description>
      <content:encoded><![CDATA[<p><span style="font-size: small;" lang="en-gb"><span style="color: #000000; font-family: Arial;">James Glading is an Associate Consultant at Microsoft Consulting Services. A recent graduate from Brunel University James is looking forward to working closely with customers to help them realise their full potential through adoption of Microsoft products.</span></span></p>]]></content:encoded>
    </item>
    <item>
      <title>SharePoint 2013 Ports, Proxies and Protocols - An Overview of Farm Communications</title>
      <link>https://docs.microsoft.com/archive/blogs/uksharepoint/sharepoint-2013-ports-proxies-and-protocols-an-overview-of-farm-communications</link>
      <pubDate>Mon, 21 Jan 2013 14:42:00 GMT</pubDate>
      <dc:creator><![CDATA[Marek Samaj]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/uksharepoint/2013/01/21/sharepoint-2013-ports-proxies-and-protocols-an-overview-of-farm-communications/</guid>
      <description><![CDATA[In locked down environments, understanding communications paths of a server product is essential....]]></description>
      <content:encoded><![CDATA[<p><span style="color: black; line-height: 115%; font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 'Times New Roman'; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: EN-GB; mso-fareast-language: EN-GB; mso-bidi-language: AR-SA;">In locked down environments, understanding communications paths of a server product is essential. Some time ago, Martin Kearn and Pete Reid published a <a title="great post" href="https://blogs.msdn.com/b/uksharepoint/archive/2009/01/05/sharepoint-ports-proxies-and-protocols-an-overview-of-farm-communications.aspx">great post</a>&nbsp;describing farm communications in Microsoft Office SharePoint Server 2007 (MOSS). SharePoint 2013 isn&rsquo;t that much different from MOSS 2007 with regard to network communication and protocols. It is still a web-based application based on the .NET Framework with dependencies on SQL Server, Active Directory and DNS. Most of the information in that article are therefore valid in SharePoint 2013 as well. I would recommend you to get familiar with those core concepts. </span></p>
<p><span style="color: black; line-height: 115%; font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 'Times New Roman'; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: EN-GB; mso-fareast-language: EN-GB; mso-bidi-language: AR-SA;">Whilst the fundamentals remain the same, there were changes in the product over time that have affected the inter and extra-server communications paths. SharePoint 2010 introduced the <a title="Service Application  " href="https://technet.microsoft.com/en-us/library/cc560988.aspx#About">Service Application</a> model with Windows Communication Foundation proxies and endpoints. SharePoint 2013 brings additional core-building blocks to the product such as Distributed Cache or optional components such as Office Web Apps Server and Workflow Manager with an underlying Service Bus. These components publish some sort of endpoint to communicate with SharePoint 2013 on different ports. You should not forget to secure communication with these external endpoints with a SSL certificate. SharePoint 2013 uses oAuth for Server to Server (S2S)&nbsp;communication and you absolutely don't want oAuth bearer tokens flying over your network in clear text. They contain sensitive information and any party in possession of a bearer token can use it to get access to the associated resource. You can find more information in <a title="The OAuth 2.0 Authorization Framework: Bearer Token Usage RFC 6750  " href="https://datatracker.ietf.org/doc/rfc6750/">The OAuth 2.0 Authorization Framework: Bearer Token Usage RFC 6750</a> document. Yes, this means you should have SSL certificates deployed on your SharePoint sites as well.</span></p>
<p><span style="color: black; line-height: 115%; font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 'Times New Roman'; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: EN-GB; mso-fareast-language: EN-GB; mso-bidi-language: AR-SA;">Below is an updated communication diagram for SharePoint 2013. I have combined both inter and extra server communications into a single diagram. I hope you will find it easy to navigate. A large version of this image can be found <a title="here" href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/16/10/3250.SharePoint-2013-Ports-Proxies-Protocols-fix.png" original-url="https://blogs.msdn.com/cfs-filesystemfile.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-16-10/3250.SharePoint_2D00_2013_2D00_Ports_2D00_Proxies_2D00_Protocols_2D00_fix.png">here</a>.</span></p>
<p>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/16/10/3250.SharePoint-2013-Ports-Proxies-Protocols-fix.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-16-10/3250.SharePoint_2D00_2013_2D00_Ports_2D00_Proxies_2D00_Protocols_2D00_fix.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/16/10/3250.SharePoint-2013-Ports-Proxies-Protocols-fix.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-16-10/3250.SharePoint_2D00_2013_2D00_Ports_2D00_Proxies_2D00_Protocols_2D00_fix.png" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p><strong></strong>&nbsp;</p>
<p><strong>References</strong></p>
<p><a title="Plan security hardening for SharePoint 2013" href="https://technet.microsoft.com/en-us/library/cc262849.aspx">Plan security hardening for SharePoint 2013</a></p>
<p><a title="Using Windows Internet Explorer Developer Tools Network Capture" href="https://msdn.microsoft.com/en-us/library/gg130952(v=VS.85).aspx">Using Windows Internet Explorer Developer Tools Network Capture</a></p>
<p>&nbsp;</p>
<p>Marek Samaj<br />Senior Consultant<br />Microsoft Consulting Services UK<br /><a href="mailto:marek.samaj@microsoft.com" target="_blank">marek.samaj@microsoft.com</a><br /><a title="Click here to see my bio page" href="https://blogs.msdn.com/b/uksharepoint/archive/2012/09/07/marek-samaj.aspx">Click here to see my bio page</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Managing Different Styles of Development Team (Part 2 of 2)</title>
      <link>https://docs.microsoft.com/archive/blogs/uksharepoint/managing-different-styles-of-development-team-part-2-of-2</link>
      <pubDate>Mon, 07 Jan 2013 05:43:00 GMT</pubDate>
      <dc:creator><![CDATA[Callum_Shillan]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/uksharepoint/2013/01/07/managing-different-styles-of-development-team-part-2-of-2/</guid>
      <description><![CDATA[This is the second part that looks at different styles of SharePoint development teams. The premise...]]></description>
      <content:encoded><![CDATA[<p>This is the second part that looks at different styles of SharePoint development teams. The premise is that not all teams have the same attributes. Well, no surprise there.</p>
<p>You can find part 1 here: <a href="https://blogs.msdn.com/b/uksharepoint/archive/2012/11/12/managing-different-styles-of-development-teams.aspx">Managing Different Styles of Development Team (Part 1)</a></p>
<p>The two attributes of the team that we&rsquo;ve looked at are:</p>
<ol>
<li>how skilled the team is</li>
<li>their approach to the project</li>
</ol>
<p>That is, some teams are very experienced with SharePoint, and some not so. Also, some are happy that SharePoint is being used for the project, and some not so.</p>
<p>Using these two attributes as axes on a graph, we&rsquo;ve identified four types of development teams, as show in the following diagram.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/16/10/0675.NoviceExpertScepticalConvinced.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-16-10/0675.NoviceExpertScepticalConvinced.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/16/10/0675.NoviceExpertScepticalConvinced.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-16-10/0675.NoviceExpertScepticalConvinced.png" alt="" border="0" /></a></p>
<p>The broad characteristics of these types of teams are:</p>
<ul>
<li>Type 1: A capable and proficient team who have good experience of developing successful SharePoint solutions. They are happy to be working on the project and are convinced that the use of SharePoint is appropriate.</li>
<li>Type 2: A development team who are probably new to SharePoint. They may, or may not, be proficient developers. Even so, they see the use of SharePoint as a good thing.</li>
<li>Type 3: This team has had little exposure to SharePoint development. They are not convinced that SharePoint is a good fit and would probably prefer to be using some other technology.</li>
<li>Type 4: This team are skilled and versed in SharePoint development. However, they are not convinced the SharePoint is relevant for the project.</li>
</ul>
<p>The previous posting discussed the two upper quadrants: when folks are happy that SharePoint is being used for the project. In this posting, we address the two lower quadrants: when people are not happy (or not convinced) that SharePoint is a suitable platform for the project.</p>
<h2>Type 3: Novice and Sceptical</h2>
<p>This type of team are new to SharePoint development and, for various reasons, they are not convinced that SharePoint is appropriate or relevant for the project.</p>
<p>I&rsquo;ve come across project teams like this in two main scenarios:</p>
<ol>
<li>The development team prefer to write everything themselves</li>
<li>The customer is starting to use SharePoint instead of some other technology</li>
</ol>
<p>In the first case, I&rsquo;ve seen customers make the following (wrong) argument:</p>
<ul>
<li>SharePoint is built on.NET</li>
<li>I have.NET Developers</li>
<li>I have SharePoint Developers</li>
</ul>
<p>With a development team that prefers to build everything themselves, nothing beats the purity of their own codebase written from scratch. Now, don&rsquo;t get me wrong: this approach is sometimes needed. But SharePoint provides a whole set of building blocks and in-built capabilities. As such, this is a team that is used to doing things in a particular way and they have to come to terms with an alternate approach. For example, there are recommended ways of doing things and this can feel like a whole set of restrictions on the team &ndash; they can feel as if they have all their freedoms taken away from them. Naturally, this results in a degree of frustration and it is no wonder that they are not feeling too great about having to use SharePoint.</p>
<p>In the second case (when they&rsquo;re moving away from some other technology), the team is in a similar position. They know how to get the job done with the previous mechanisms of the alternate software package. Why do we have to go and spoil everything with the introduction of SharePoint? This can be the situation when upper management has not taken the time to explain why there is the move to SharePoint. After all, the IT Strategy has to be tied to, and serve, the Business Strategy. Consequently, there has probably been some decisions made elsewhere that has driven the move to SharePoint. Sometimes, these drivers don&rsquo;t get fully, or properly, relayed to the developers and this leaves the wondering, &ldquo;Why are we doing it this way?&rdquo; Sometimes, a quick chat is all that is needed.</p>
<p>The trick is to try and move them from being a Type 3 team to a Type 2 team. That is, move them from being &ldquo;novice and negative&rdquo; to &ldquo;novice but positive&rdquo;. From there, we already know how to get them to Type 1 &ldquo;export and positive&rdquo;.</p>
<p>Within any development team, I always have a &ldquo;holy trinity&rdquo; of three key roles:</p>
<ul>
<li>User Experience Lead</li>
<li>Lead Developer</li>
<li>Test Lead</li>
</ul>
<p>These three people are the ones that I look to, in the first instance. The UX Lead is critical to building the user stories, scenarios and wireframes that define the solution that we are creating. The Lead Developer will be responsible decomposing the solution into its constituent elements and organising the other developers to implement the code and create the necessary configurations. The Test Lead is the one who keeps everyone honest by checking to make sure that the code executes as it should and that the various quality attributes are met.</p>
<p>If I sense that I am in the realms of a Type 3 team, I have always found it most important to take my &ldquo;holy trinity&rdquo; aside and deal with them independently. If I convince these folks that SharePoint is both useful and appropriate, I can be pretty sure that they will take the message to their respective teams. Instead of trying to persuade the complete team, I have reduced my problem to a much smaller one: convince the leaders and then let them lead their teams.</p>
<p>And I have been most successful in this task when I&rsquo;ve concentrated on the things that they don&rsquo;t have to do rather than trying to explain how good SharePoint is. Sometimes a solution is being used to support a brand new business concept that has never existed before and every single line of code needs to be written from scratch. Most of the time, the solution is well understood and the pattern has been established for a long time.</p>
<p>Applications of SharePoint tend to lie mostly in the second camp: the solution patterns are well known and understood. We typically have forms being used to update custom lists and this may make use of event handlers or workflows to implement some business logic. Sometimes, we have a job to perform some form of automated task on a scheduled basis.</p>
<p>Well, so far, so good. The development team could well argue that ASP.NET can also be used to implement such a solution. And they&rsquo;d be right. However, it is all the &ldquo;value-adds&rdquo; that SharePoint brings that I first discuss with my Leads.</p>
<p>For the UX Lead, their efforts can focus on the screens for the actual solution instead of needing to address administrative elements. For example, user administration and security permissions are provided by SharePoint and so these are screens they do not need to think about and design. In addition, the overall approach to screen layout is also provided by SharePoint: master pages, page layouts, themes, headers, left-hand navigation, etc.</p>
<p>For the Lead Developer, we can address scalability and data integrity because SharePoint is based on ASP.NET, runs on IIS, and uses a database to hold its data. It can have multiple front-end web servers that handle load balancing. The use of SQL Server provides the integrity, scalability, robustness, and security of the underlying lists, data and documents used by the solution. We have the security model that can be applied to lock down elements such as Management Libraries, etc. The site engine can be used to serve different types of web site. We have a mechanism to deploy and retract custom code via Features and Solutions. We have the performance counters in order to provide for monitoring the application once it has been deployed. And the list goes on.</p>
<p>For the Test Lead, again, the argument is that they do not need to spend time testing the administrative paraphernalia of the solution. All they have to focus on is testing the new components in the context of the business solution. Also, as SharePoint provides a rich scripting interface, they can automate their tests to populate test data and users, etc. Furthermore, the use of the solution deployment and site administration means that they can have a controlled test environment that they can tear down and rebuild with relative ease.</p>
<p>So, instead of trying to take on a whole development team, I decompose my problem into smaller elements: convince the Leads and trust them to convince (and lead) their teams.</p>
<h2>Type 4: Experienced and Sceptical</h2>
<p>Now, you might be forgiven for thinking that there&rsquo;s no option but to resign your position when faced with a Type 4 team. They&rsquo;re knowledgeable and skilled SharePoint developers. They probably are leading lights in their respective communities. And they&rsquo;re convinced that SharePoint is not a good idea for this project.</p>
<p>Oh dear.</p>
<p>The trick, here, is to really understand what their problem is. Because it may well be that, once you start digging into things, that they have concerns in only one or two areas. If we can address these concerns, we will have moved the team from a Type 4 (expert but negative) into a Type 1 (expert and positive). And that&rsquo;s our goal, isn&rsquo;t it?</p>
<p>Let&rsquo;s start with the easiest scenario: the team has well founded concerns about some areas. This can arise for a number of reasons. For example, the team might have past experience in a particular area and they are aware of the problems that can arise. These don&rsquo;t have to be just technical problems. Problems can arise for organisational reasons, as well.</p>
<p>So, it may well be that you have designed a system with an incorrect assumption. Perhaps, for a given customer, certain features are not enabled due to a variety of concerns. Or it may be that you are relying on an external system that the team knows is not as reliable as you might have been led to believe. There&rsquo;s a whole host of reasons why you might need to modify your design. Just because you&rsquo;re the architect, it doesn&rsquo;t mean that you are always right.</p>
<p>Part of the skill of an architect is to be able to negotiate and compromise. And when there is skilled expertise advising you that a particular course of action is ill-advised (and when you have convinced yourself that they are right), it is time to flex the architecture and record your modifications in a refresh of the Solution Architecture document and an update of the Decisions Log.</p>
<p>However, there are times when the skilled team are not correct about something. I&rsquo;ve most often noticed this when dealing a desire to use new or updated features and I&rsquo;ve been championing something less sophisticated. It most often comes about when the team doing the development are not connected to the team that will run the system during its day-to-day usage. Teams can have this &ldquo;disconnected&rdquo; make-up when, for example, they have been subcontracted for the purposes of the development and they are expected to hand-over to the customer&rsquo;s operations team.</p>
<p>In this situation, I am keen for something I call, &ldquo;Operations Oriented Architecture.&rdquo; What I mean by this is that one of the foremost considerations is the team that will run, or operate, the final system. Now, as we discussed previously, I always try to run the design past the Operations Team to make sure that they are expecting to on-board the system and that they can get any necessary training in place and organised. Sometimes, these conversations drive changes to the architecture. &ldquo;No, we can&rsquo;t use this capability as the Operations Team have not been trained to support it. They would rather we use this alternate method.&rdquo;</p>
<p>So, it can be that the Operations Team will impose restrictions on the solution. As a simple example, they might define a format for error/log messages and assign your application a unique reference number or code. This is so that their systems monitoring application can identify your application. The Development Team can sometimes balk at these &ldquo;restrictions&rdquo; or &ldquo;impositions&rdquo; but it&rsquo;s your job as an architect to persuade them otherwise.</p>
<p>So, I&rsquo;ve experienced a Type 4 team when there is a disparity between what the Project Team want to do and what the Operations Team will support. And, it&rsquo;s most often that the Project Team want to make use of some fancy, new feature. After all, they&rsquo;re skilled, expert and capable. For them, it is the smallest stretch to understand and make use of the new feature. But for the Operations Team, it can be a huge hill to climb: they have to send their people on training, they have to provision and deploy new hardware, and they have to update the configuration of the data centres, and so on.</p>
<p>Once again, a key architect skill of, &ldquo;negotiate and compromise&rdquo; comes to the fore. Except, this time, you use your negotiation skills to ensure that it is the Development Team that make the compromise.</p>
<h2>Conclusion</h2>
<p>I hope you&rsquo;ve found these two articles useful.</p>
<p>It&rsquo;s worth noting that, whilst I have addressed this at the level of the Development Team as whole, you would be quite right if you thought that these approaches can also be used for individuals. After all, whilst a team can have an identity and a character of its own, this doesn&rsquo;t mean to say that all the members of the team are the same.</p>
<p>As a Solutions Architect, it took me some time to fully appreciate that projects do not always have the same shape and form. Each has their own unique challenges. What was easy on one will be hard on another. The enjoyment is that it is all about getting people to perform at their best. As an architect, you need to really engage with the team and genuinely understand them and their concerns in order to have them working with you instead of against you.</p>]]></content:encoded>
    </item>
  </channel>
</rss>