<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Wes Hackett</title>
	<atom:link href="http://weshackett.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://weshackett.com</link>
	<description>Adventures with SharePoint</description>
	<lastBuildDate>Thu, 23 May 2013 11:02:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>Custom SharePoint Item and Project Template gotchas for VS2012</title>
		<link>http://weshackett.com/2013/05/custom-sharepoint-item-and-project-template-gotchas-for-vs2012/</link>
		<comments>http://weshackett.com/2013/05/custom-sharepoint-item-and-project-template-gotchas-for-vs2012/#comments</comments>
		<pubDate>Thu, 23 May 2013 06:00:00 +0000</pubDate>
		<dc:creator>Wes Hackett</dc:creator>
				<category><![CDATA[CKSDev]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Item Templates]]></category>
		<category><![CDATA[Project Templates]]></category>

		<guid isPermaLink="false">http://weshackett.com/?p=1178</guid>
		<description><![CDATA[This post is a quick brain dump of some of the challenges I’ve been working through updating CKSDev to work with Visual Studio 2012. Item Templates &#160; You can extend the SharePoint Visual Studio tooling in many different ways. One of which is by creating...]]></description>
			<content:encoded><![CDATA[<p>This post is a quick brain dump of some of the challenges I’ve been working through updating <a href="http://cksdev.codeplex.com" target="_blank">CKSDev</a> to work with Visual Studio 2012.</p>
<h2>Item Templates</h2>
<p>&#160;</p>
<p>You can extend the SharePoint Visual Studio tooling in many different ways. One of which is by creating new Item Templates. Item templates are the code templates which appear in the ‘add new’ dialog in the solution project. Microsoft wrote several good walkthroughs <a title="http://msdn.microsoft.com/en-us/library/vstudio/ee256697(v=vs.110).aspx" href="http://msdn.microsoft.com/en-us/library/vstudio/ee256697(v=vs.110).aspx">http://msdn.microsoft.com/en-us/library/vstudio/ee256697(v=vs.110).aspx</a> as an example.</p>
<p>In Visual Studio 2010 the SharePoint items were grouped in a basic ‘SharePoint’ category and deploying them via a VSIX package was actually dead simple. Edit the CSProj and replace this VSTemplate element with the following XML, and then save and close the file.</p>
<blockquote><p>&lt;VSTemplate Include=&quot;ItemTemplate.vstemplate&quot;&gt;     <br />&lt;OutputSubPath&gt;SharePoint\SharePoint14&lt;/OutputSubPath&gt;      <br />&lt;/VSTemplate&gt;</p>
</blockquote>
<p>The OutputSubPath element specifies additional folders in the path under which the item template is created when you build the project. The folders specified here ensure that the item template will be available only when customers open the Add New Item dialog box, expand the SharePoint node, and then choose the 2010 node.</p>
<p>So that worked fine in Visual Studio 2010 for SharePoint 2010. CKSDev for VS2010 had some smarts under the covers for packaging, but also followed this basic process.</p>
<p>So why is this an issue for Visual Studio 2012????</p>
<p>Well as you can see Microsoft moved the items into a new category called ‘Office/SharePoint’</p>
<p><a href="http://weshackett.com/wp-content/uploads/2013/05/image.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://weshackett.com/wp-content/uploads/2013/05/image_thumb.png" width="620" height="429" /></a></p>
<p>In true Lt Gorman style (Aliens reference when the troops realise they can’t fire the pulse rifles under the reactor) </p>
<blockquote><p>SO??, So what?</p>
</blockquote>
<p>Rather then setting off a thermo-nuclear explosion this just causes a real headache for custom template VSIX packaging.</p>
<p>Each VSTemplate item in your solution has a property called ‘Category’, this is where you can tell VS to package that template under a specific category. Great so all you have to do is match the path in the new item dialog. Yes in theory.</p>
<p>The challenge comes that the VS/MSBuild bits behind the scenes understand a forward slash as a new folder. So you end up with Office with a sub folder of SharePoint. Not what you wanted. <img class="wlEmoticon wlEmoticon-sadsmile" style="border-top-style: none; border-left-style: none; border-bottom-style: none; border-right-style: none" alt="Sad smile" src="http://weshackett.com/wp-content/uploads/2013/05/wlEmoticon-sadsmile.png" /></p>
<p>Ok so what next?</p>
<p>Well another thing to try is to match the OOTB folder path for the native MS templates. They live under “C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\ItemTemplates\CSharp\Office SharePoint\1033”</p>
<p>So setting the ‘Category’ to ‘Office SharePoint’ should work right? Wrong more <img class="wlEmoticon wlEmoticon-cryingface" style="border-top-style: none; border-left-style: none; border-bottom-style: none; border-right-style: none" alt="Crying face" src="http://weshackett.com/wp-content/uploads/2013/05/wlEmoticon-cryingface.png" /> ensue as this time the space is encoded to %20 and the templates don’t show up at all.</p>
<p>This process of elimination had by this point taken well over two hours and was getting somewhat frustrating.</p>
<p>So as i mentioned earlier CKSDev already has a subtle difference to its packaging. This is due to it being distributed via the Visual Studio Gallery. The VS gallery has some nasty folder length checks (less that a combined 256) which mean the CKSDev templates are compacted folder and name wise to be as short as possible. The VS Gallery rules don’t understand the fact the tools couldn’t install on XP and check for the length anyway and reject if over 256.</p>
<p>Another example of this technique in action is here at <a href="http://blogs.msdn.com/b/aaronmar/archive/2010/03/12/including-existing-templates-in-a-vsix-container.aspx" target="_blank">Aaron Marten&#8217;s blog article</a> which explains how this works.</p>
<p>The CKSDev packaging uses some MSBuild stuff to create an ‘I’ for item templates and ‘P’ for project templates during build. The VSIX then picks them up from there.</p>
<p>The assets section of the VSIX looks like this:</p>
<blockquote><p>&lt;Assets&gt;     <br />&#160;&#160;&#160; &lt;Asset Type=&quot;Microsoft.VisualStudio.MefComponent&quot; Path=&quot;|CKS.Dev11;AssemblyProjectOutputGroup|&quot; /&gt;      <br />&#160;&#160;&#160; &lt;Asset Type=&quot;SharePoint.Commands.v4&quot; Path=&quot;|CKS.Dev11;SP2010CommandProjectOutputGroup|&quot; /&gt;      <br />&#160;&#160;&#160; &lt;Asset Type=&quot;SharePoint.Commands.v5&quot; Path=&quot;|CKS.Dev11;SP2013CommandProjectOutputGroup|&quot; /&gt;      <br />&#160;&#160;&#160; &lt;Asset Type=&quot;Microsoft.VisualStudio.VsPackage&quot; Path=&quot;|CKS.Dev11;PkgdefProjectOutputGroup|&quot; /&gt;      <br />&#160;&#160;&#160; &lt;Asset Type=&quot;Microsoft.VisualStudio.Assembly&quot; Path=&quot;|CKS.Dev11;AssemblyProjectOutputGroup|&quot; /&gt;      <br />&#160;&#160;&#160; &lt;Asset Type=&quot;Microsoft.VisualStudio.ProjectTemplate&quot;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; d:Source=&quot;Project&quot;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; d:ProjectName=&quot;CKS.Dev11&quot;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; d:TargetPath=&quot;p&quot;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Path=&quot;P&quot;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; d:VsixSubPath=&quot;P&quot; /&gt;      <br />&#160;&#160;&#160; &lt;Asset Type=&quot;Microsoft.VisualStudio.ItemTemplate&quot;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; d:Source=&quot;Project&quot;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; d:ProjectName=&quot;CKS.Dev11&quot;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; d:TargetPath=&quot;I&quot;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Path=&quot;I&quot;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; d:VsixSubPath=&quot;I&quot; /&gt;      <br />&#160; &lt;/Assets&gt;</p>
</blockquote>
<p>So the solution was to modify the MSBuild elements for the CSProj file</p>
<blockquote><p>&lt;Target Name=&quot;GetVsixTemplateItems&quot;&gt;     <br />&#160;&#160; &lt;ItemGroup&gt;      <br />&#160;&#160;&#160;&#160; &lt;VSIXSourceItem Include=&quot;@(IntermediateZipItem)&quot;&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160; &lt;VSIXSubPath&gt;I\%(IntermediateZipItem.Language)\<font style="background-color: #ffff00">$(ItemTemplateFolderPath)</font>\%(IntermediateZipItem.Culture)&lt;/VSIXSubPath&gt;      <br />&#160;&#160;&#160;&#160; &lt;/VSIXSourceItem&gt;      <br />&#160;&#160; &lt;/ItemGroup&gt;      <br />&#160;&#160; &lt;ItemGroup&gt;      <br />&#160;&#160;&#160;&#160; &lt;VSIXSourceItem Include=&quot;@(IntermediateZipProject)&quot;&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160; &lt;VSIXSubPath&gt;P\%(IntermediateZipProject.Language)\<font style="background-color: #ffff00">%(IntermediateZipProject.OutputSubPath)</font>\%(IntermediateZipProject.Culture)&lt;/VSIXSubPath&gt;      <br />&#160;&#160;&#160;&#160; &lt;/VSIXSourceItem&gt;      <br />&#160;&#160; &lt;/ItemGroup&gt;      <br /> &lt;/Target&gt;      </p>
</blockquote>
<p>&#160;</p>
<p>The item templates are using a variable declared with the category (aka the folder path) desired, whereas the projects are declared using the ‘Category’ in the properties window of the VSTemplate item. (this is the output sub path for those interested).</p>
<p>The path has to be declared in another element as it contains a space.</p>
<blockquote><p>&lt;PropertyGroup&gt;     <br />&#160;&#160;&#160; &lt;ItemTemplateFolderPath&gt;Office SharePoint\CKSDev&lt;/ItemTemplateFolderPath&gt;      <br />&#160; &lt;/PropertyGroup&gt;</p>
</blockquote>
<p>All that together gives the desired effect of all the CKSDev items appearing inside the right OOTB category.</p>
<p><a href="http://weshackett.com/wp-content/uploads/2013/05/image1.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://weshackett.com/wp-content/uploads/2013/05/image_thumb1.png" width="620" height="429" /></a></p>
<p><a href="http://weshackett.com/wp-content/uploads/2013/05/image2.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://weshackett.com/wp-content/uploads/2013/05/image_thumb2.png" width="620" height="429" /></a></p>
<p>Ok so now everything is sitting in the desired place. As with a lot of CKSDev coding its the little things like this which take so long. Understanding Visual Studio, MSBuild and SP API’s all in a days work <img class="wlEmoticon wlEmoticon-smilewithtongueout" style="border-top-style: none; border-left-style: none; border-bottom-style: none; border-right-style: none" alt="Smile with tongue out" src="http://weshackett.com/wp-content/uploads/2013/05/wlEmoticon-smilewithtongueout.png" /></p>
<h2>Project templates</h2>
<p>&#160;</p>
<p>So with the information above the project template settings are actually a lot easier.</p>
<p>Simply set your category to ‘Office\SharePoint Solutions’ As you actually want it to appear in a sub folder this time.</p>
<p><a href="http://weshackett.com/wp-content/uploads/2013/05/image3.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://weshackett.com/wp-content/uploads/2013/05/image_thumb3.png" width="620" height="429" /></a></p>
<p>I hope this saves someone time and headaches <img class="wlEmoticon wlEmoticon-openmouthedsmile" style="border-top-style: none; border-left-style: none; border-bottom-style: none; border-right-style: none" alt="Open-mouthed smile" src="http://weshackett.com/wp-content/uploads/2013/05/wlEmoticon-openmouthedsmile1.png" /></p>
<h3>Share and Enjoy</h3>

<!-- Start WP Socializer - Social Buttons - Output -->
 &bull; <a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fweshackett.com%2F2013%2F05%2Fcustom-sharepoint-item-and-project-template-gotchas-for-vs2012%2F&amp;t=Custom+SharePoint+Item+and+Project+Template+gotchas+for+VS2012" title="Share this on Facebook" target="_blank" rel="nofollow">Facebook</a> &bull; <a href="http://twitter.com/home?status=Custom SharePoint Item and Project Template gotchas for VS2012%20-%20http%3A%2F%2Fweshackett.com%3Fp%3D1178%20" title="Tweet this !" target="_blank" rel="nofollow">Twitter</a> &bull; <a href="http://delicious.com/post?url=http%3A%2F%2Fweshackett.com%2F2013%2F05%2Fcustom-sharepoint-item-and-project-template-gotchas-for-vs2012%2F&amp;title=Custom+SharePoint+Item+and+Project+Template+gotchas+for+VS2012&amp;notes=This+post+is+a+quick+brain+dump+of+some+of+the+challenges+I%E2%80%99ve+been+working+through+updating+CKSDev+to+work+with+Visual+Studio+2012.++Item+Templates++%26%23160%3B++You+can+extend+the+SharePoint+Visual+Studio+tooling+in+many+different+ways.+One+of+which+i" title="Post this on Delicious" target="_blank" rel="nofollow">Delicious</a> &bull; <a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fweshackett.com%2F2013%2F05%2Fcustom-sharepoint-item-and-project-template-gotchas-for-vs2012%2F&amp;title=Custom+SharePoint+Item+and+Project+Template+gotchas+for+VS2012&amp;bodytext=This+post+is+a+quick+brain+dump+of+some+of+the+challenges+I%E2%80%99ve+been+working+through+updating+CKSDev+to+work+with+Visual+Studio+2012.++Item+Templates++%26%23160%3B++You+can+extend+the+SharePoint+Visual+Studio+tooling+in+many+different+ways.+One+of+which+i" title="Submit this to Digg" target="_blank" rel="nofollow">Digg</a> &bull; <a href="" title="" target="_blank" rel="nofollow"></a> &bull; <a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fweshackett.com%2F2013%2F05%2Fcustom-sharepoint-item-and-project-template-gotchas-for-vs2012%2F&amp;title=Custom+SharePoint+Item+and+Project+Template+gotchas+for+VS2012" title="Submit this to StumbleUpon" target="_blank" rel="nofollow">StumbleUpon</a> &bull; <a href="http://weshackett.com/2013/05/custom-sharepoint-item-and-project-template-gotchas-for-vs2012/" onclick="addBookmark(event);" title="Custom SharePoint Item and Project Template gotchas for VS2012" target="_blank" rel="nofollow">Add to favorites</a> &bull; <a href="mailto:?subject=Custom SharePoint Item and Project Template gotchas for VS2012&amp;body=This post is a quick brain dump of some of the challenges I’ve been working through updating CKSDev to work with Visual Studio 2012.  Item Templates  &amp;#160;  You can extend the SharePoint Visual Studio tooling in many different ways. One of which i - http://weshackett.com/2013/05/custom-sharepoint-item-and-project-template-gotchas-for-vs2012/" title="Email this" target="_blank" rel="nofollow">Email</a> &bull; <a href="http://weshackett.com/feed/rss/" title="Subscribe to RSS" target="_blank" rel="nofollow">RSS</a>
<!-- End WP Socializer - Social Buttons - Output -->
]]></content:encoded>
			<wfw:commentRss>http://weshackett.com/2013/05/custom-sharepoint-item-and-project-template-gotchas-for-vs2012/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lync 2013: An error occurred during the screen presentation</title>
		<link>http://weshackett.com/2013/05/lync-2013-an-error-occurred-during-the-screen-presentation/</link>
		<comments>http://weshackett.com/2013/05/lync-2013-an-error-occurred-during-the-screen-presentation/#comments</comments>
		<pubDate>Fri, 03 May 2013 08:18:00 +0000</pubDate>
		<dc:creator>Wes Hackett</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Lync]]></category>
		<category><![CDATA[Office365]]></category>

		<guid isPermaLink="false">http://weshackett.com/?p=1172</guid>
		<description><![CDATA[Recently my Lync 2013 client stopped being able to receive a shared screen from either internal or external contacts. My problem was that every time someone tried to share their screen with me the following message was displayed: &#160;&#160; &#34;An error occurred during the screen...]]></description>
			<content:encoded><![CDATA[<p>Recently my Lync 2013 client stopped being able to receive a shared screen from either internal or external contacts. </p>
<p>My problem was that every time someone tried to share their screen with me the following message was displayed:</p>
<p>&#160;&#160; &quot;An error occurred during the screen presentation&quot;</p>
<p>Weirdest part, it was still possible to share the whiteboard and transfer files, just not share desktop or specific monitors?</p>
<p>So after some digging on the internet I found an answer. It turns out that our friend windows update pulls down two updates.</p>
<p>Apparently there is something missing from the KB2760556 patch.&#160; It assumes that the previous update is there already, but if you try to install both at the same time things go wrong.</p>
<p>I removed all three of the Lync 2013 patches.&#160; </p>
<ul>
<li>Control Panel</li>
<li>Uninstall a program </li>
<li>View all updates</li>
<li>Remove all Lync patches under the Office 2013 section.</li>
<li>Reboot.</li>
</ul>
<p>Check that screen sharing is back.</p>
<p>Then apply the Lync patches one at a time.&#160; KB2760512 first, and then KB2760556</p>
<p>Afterwards check screen sharing is still working.</p>
<p>I hope this saves someone else the annoyance of missing a meeting presentation. <img class="wlEmoticon wlEmoticon-openmouthedsmile" style="border-top-style: none; border-left-style: none; border-bottom-style: none; border-right-style: none" alt="Open-mouthed smile" src="http://weshackett.com/wp-content/uploads/2013/05/wlEmoticon-openmouthedsmile.png" /></p>
<h3>Share and Enjoy</h3>

<!-- Start WP Socializer - Social Buttons - Output -->
 &bull; <a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fweshackett.com%2F2013%2F05%2Flync-2013-an-error-occurred-during-the-screen-presentation%2F&amp;t=Lync+2013%3A+An+error+occurred+during+the+screen+presentation" title="Share this on Facebook" target="_blank" rel="nofollow">Facebook</a> &bull; <a href="http://twitter.com/home?status=Lync 2013: An error occurred during the screen presentation%20-%20http%3A%2F%2Fweshackett.com%3Fp%3D1172%20" title="Tweet this !" target="_blank" rel="nofollow">Twitter</a> &bull; <a href="http://delicious.com/post?url=http%3A%2F%2Fweshackett.com%2F2013%2F05%2Flync-2013-an-error-occurred-during-the-screen-presentation%2F&amp;title=Lync+2013%3A+An+error+occurred+during+the+screen+presentation&amp;notes=Recently+my+Lync+2013+client+stopped+being+able+to+receive+a+shared+screen+from+either+internal+or+external+contacts.+++My+problem+was+that+every+time+someone+tried+to+share+their+screen+with+me+the+following+message+was+displayed%3A++%26%23160%3B%26%23160%3B+%26quo" title="Post this on Delicious" target="_blank" rel="nofollow">Delicious</a> &bull; <a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fweshackett.com%2F2013%2F05%2Flync-2013-an-error-occurred-during-the-screen-presentation%2F&amp;title=Lync+2013%3A+An+error+occurred+during+the+screen+presentation&amp;bodytext=Recently+my+Lync+2013+client+stopped+being+able+to+receive+a+shared+screen+from+either+internal+or+external+contacts.+++My+problem+was+that+every+time+someone+tried+to+share+their+screen+with+me+the+following+message+was+displayed%3A++%26%23160%3B%26%23160%3B+%26quo" title="Submit this to Digg" target="_blank" rel="nofollow">Digg</a> &bull; <a href="" title="" target="_blank" rel="nofollow"></a> &bull; <a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fweshackett.com%2F2013%2F05%2Flync-2013-an-error-occurred-during-the-screen-presentation%2F&amp;title=Lync+2013%3A+An+error+occurred+during+the+screen+presentation" title="Submit this to StumbleUpon" target="_blank" rel="nofollow">StumbleUpon</a> &bull; <a href="http://weshackett.com/2013/05/lync-2013-an-error-occurred-during-the-screen-presentation/" onclick="addBookmark(event);" title="Lync 2013: An error occurred during the screen presentation" target="_blank" rel="nofollow">Add to favorites</a> &bull; <a href="mailto:?subject=Lync 2013: An error occurred during the screen presentation&amp;body=Recently my Lync 2013 client stopped being able to receive a shared screen from either internal or external contacts.   My problem was that every time someone tried to share their screen with me the following message was displayed:  &amp;#160;&amp;#160; &amp;quo - http://weshackett.com/2013/05/lync-2013-an-error-occurred-during-the-screen-presentation/" title="Email this" target="_blank" rel="nofollow">Email</a> &bull; <a href="http://weshackett.com/feed/rss/" title="Subscribe to RSS" target="_blank" rel="nofollow">RSS</a>
<!-- End WP Socializer - Social Buttons - Output -->
]]></content:encoded>
			<wfw:commentRss>http://weshackett.com/2013/05/lync-2013-an-error-occurred-during-the-screen-presentation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SPC125 &#8211; Hybrid and Search in the Cloud &#8211; Brad Stevenson</title>
		<link>http://weshackett.com/2013/04/spc125-hybrid-and-search-in-the-cloud-brad-stevenson/</link>
		<comments>http://weshackett.com/2013/04/spc125-hybrid-and-search-in-the-cloud-brad-stevenson/#comments</comments>
		<pubDate>Mon, 29 Apr 2013 10:49:00 +0000</pubDate>
		<dc:creator>Wes Hackett</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Event]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Office365]]></category>
		<category><![CDATA[Search]]></category>
		<category><![CDATA[Session Notes]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Sharepoint 2013]]></category>
		<category><![CDATA[SPC12]]></category>
		<category><![CDATA[Search Hybrid]]></category>

		<guid isPermaLink="false">http://weshackett.com/?p=1125</guid>
		<description><![CDATA[Brad Stevenson talks about creating a search experience which spans an On-Premises and Office365 SharePoint 2013 environment. Search in the cloud &#160; So what is the story about the cloud search capability? Comparing SP2010 online to SP2013 online &#160; Area 2010 2013 Crawl Freshness 1-2...]]></description>
			<content:encoded><![CDATA[<p>Brad Stevenson talks about creating a search experience which spans an On-Premises and Office365 SharePoint 2013 environment.</p>
<h2></h2>
<h2>Search in the cloud</h2>
<p>&#160;</p>
<p>So what is the story about the cloud search capability?</p>
<h3>Comparing SP2010 online to SP2013 online</h3>
<p>&#160;</p>
<table cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td width="451">
<p><strong>Area</strong></p>
</td>
<td width="217">
<p><strong>2010</strong></p>
</td>
<td width="211">
<p><strong>2013</strong></p>
</td>
</tr>
<tr>
<td width="451">
<p><em>Crawl Freshness</em></p>
</td>
<td width="217">1-2 hours</td>
<td width="211">&lt;15 minutes</td>
</tr>
<tr>
<td width="451">
<p><em>Query Latency</em></p>
</td>
<td width="217">good</td>
<td width="211">better</td>
</tr>
<tr>
<td width="451">
<p><em>Scale</em></p>
</td>
<td width="217">was limited</td>
<td width="211">now much greater</td>
</tr>
<tr>
<td width="451">
<p><em>Manageability</em></p>
</td>
<td width="217">was limited</td>
<td width="211">more extensive</td>
</tr>
<tr>
<td width="451">
<p><em>User Experience</em></p>
</td>
<td width="217">ok</td>
<td width="211">big UX improvements</td>
</tr>
<tr>
<td width="451">
<p><em>Extensibility</em></p>
</td>
<td width="217">very little</td>
<td width="211">some new stuff</td>
</tr>
</tbody>
</table>
<p>&#160;</p>
<ul>
<li>Crawl freshness is important for any search system as its important that a user trusts the results they are given. Part of this trust is that they are seeing the latest content within a timely window. </li>
<li>Query latency is already really quite snappy in SP2010 online. SP2013 moves to client side rendering approaches to improve this snappiness perception even further. This approach allows the server to share some of the rendering load with the client device improving performance for the end user. </li>
<li>Scale in SP2013 originates from the FAST technologies so brings those benefits to bear, making it a powerful and scalable platform solution. </li>
<li>Manageability within SP2013 allows more control over the schema, examples are the control over managed properties and result sources. A lot of the features which were part of the service application have now been brought down to the site collection and tenant administration levels. </li>
<li>User Experience is dramatically different with new capabilities such as hover panels, visual refinements etc. This helps a user to establish the relevance of a result without leaving the results page or downloading the documents. </li>
<li>Extensibility is improved without writing code with such elements such as the rendering templates replacing the complex XSL. </li>
</ul>
<h2></h2>
<h3>Search extensibility in the cloud</h3>
<p>&#160;</p>
<p>No code:</p>
<ul>
<li>Managed properties </li>
<li>Result sources </li>
<li>Query rules </li>
<li>Result types </li>
<li>Display templates </li>
<li>Dictionaries (via the Term Store) </li>
</ul>
<p>Code:</p>
<ul>
<li>CSOM </li>
<li>REST </li>
</ul>
<p>Packaging:</p>
<ul>
<li>Import/Export search settings </li>
<li>SharePoint apps </li>
</ul>
<p>You manage your ‘global search’ via the tenant admin interface. The only major piece of the service application settings you have no control over is the crawl scheduling. In a multi-tenant environment this really makes sense.</p>
<h2>Journey to the cloud</h2>
<p>&#160;</p>
<h3>Definition of the cloud?</h3>
<p>&#160;</p>
<ul>
<li>Public cloud – Office 365, allows you to focus on just the software services. </li>
<li>Private cloud – Windows Azure, allows you to offload the OS and hardware to the cloud provider. </li>
<li>Traditional – All managed by the internal organisation </li>
</ul>
<h3>Moving to the cloud</h3>
<p>&#160;</p>
<p>What to move? (not just everything) and should it be everything including customisations and settings.</p>
<p>When to move it? How do you plan the move? Is it an all or nothing or staged co-existence.</p>
<p>How to move it? What tools are available?</p>
<h3>The migration lifecycle</h3>
<p>&#160;</p>
<p>Early – 90% on-prem 10% cloud</p>
<p>Mid – 50% on-prem 50% cloud</p>
<p>Late – 10% on-prem 90% cloud</p>
<h3>How hybrid search can help</h3>
<p>&#160;</p>
<p>User want to easily find content, they just want to find things they’re looking for and not have to think about understanding the systems structure. It is about getting their job done efficiently.</p>
<p>Users don’t care about migration. So don’t force users to track what&#8217;s being moved and when.</p>
<p>Realise that most users will never move EVERYTHING to the cloud.</p>
<h3>Hybrid Search User Experience</h3>
<p>&#160;</p>
<p>Demo environment details:</p>
<ul>
<li>On-Premises SP2013 crawling a mixture of SharePoint data and file shares </li>
<li>Office365 indexing all of its content </li>
<li>Firewall between </li>
</ul>
<p>So the idea is that from within either environment the user can get results from either. They use query rules to ‘cross-pollinate’ results from the other environment as a block of results. Personally I’m not sure this is a great user experience. It gives a false impression to a user of which results are most important. So I remain to be convinced about using result blocks.</p>
<p>A neat thing to know is that the refinement panel operates over ALL returned results rather than just the local SharePoint items. Also the hover panels are dependant on the sources WOPI configuration.</p>
<h3>Configuring Hybrid Search</h3>
<p>&#160;</p>
<p>Configuration steps:</p>
<ul>
<li>Choose one-way or bi-directional </li>
<li>Deploy and configure pre-reqs </li>
<li>Configure search data settings </li>
<li>Configure search UI settings </li>
</ul>
<p>If you are early on in your migration lifecycle a one-way where on-premises indexes Office365 might suit your needs. Or late on a one-way works for Office 365 to use on-premises. Mid-life is definitely bi-directional where the experience should be the same.</p>
<h3>Environment Configuration</h3>
<p>&#160;</p>
<p><a href="http://weshackett.com/wp-content/uploads/2013/04/image.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://weshackett.com/wp-content/uploads/2013/04/image_thumb.png" width="620" height="450" /></a></p>
<h3>One-way or Bi-directional</h3>
<p>&#160;</p>
<p>Where will users go to search?</p>
<ul>
<li>Just on-premises </li>
<li>Just Office365 </li>
<li>Both </li>
</ul>
<h2></h2>
<h3>Hybrid pre-requisites</h3>
<p>&#160;</p>
<p>Non-SharePoint:</p>
<ul>
<li>Reverse proxy and certificate authentication </li>
<li>Identity provider (ADFS or Shibboleth for Office365) </li>
<li>MSOL Tools </li>
<li>SSO with Office365 </li>
<li>DirSync </li>
</ul>
<p>SharePoint:</p>
<ul>
<li>New SharePoint STS Token signing certificate </li>
<li>Configure a trust relationship between SharePoint on-premises and ACS </li>
<li>Configure secure store </li>
<li>Configure UPA </li>
</ul>
<h3>Configure Data Settings</h3>
<p>&#160;</p>
<p>Result source (equivalent to a federated location and scope in SP2010) pointing at:</p>
<ul>
<li>URL of remote location </li>
<li>Secure Store (for client certificate) </li>
</ul>
<h3>Configure UI Settings</h3>
<p>&#160;</p>
<ul>
<li>Query rule to show remote results in ‘Everything’ tab </li>
<li>Search vertical which ‘only’ displays results from remote location (Office365 or on-premises) </li>
</ul>
<h3>Search Centre On-Premises: Data Flow</h3>
<p>&#160;</p>
<p><a href="http://weshackett.com/wp-content/uploads/2013/04/image1.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://weshackett.com/wp-content/uploads/2013/04/image_thumb1.png" width="620" height="372" /></a></p>
<p>Scenario One:</p>
<p>User logs into on-premises and issues a search query. It actually issues two queries. First is to the local on-premises index. The second is issued to Office365. The second query is issued through the CSOM endpoint within Office365. Identity mappings take place where the on-premises identity is mapped to the Office365 identity. Office365 then performs the query and issues the results response.</p>
<h3>Search Centre in Office365: Data Flow</h3>
<p>&#160;</p>
<p><a href="http://weshackett.com/wp-content/uploads/2013/04/image2.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://weshackett.com/wp-content/uploads/2013/04/image_thumb2.png" width="620" height="356" /></a></p>
<p>Scenario Two:</p>
<p>Basic flow is a reverse of on-premises except there is the introduction of the revers proxies at the perimiter to route the request back to the on-premises SharePoint. Identity is mapped from the Office365 user to the on-premises user. </p>
<p>This means that in both scenarios there is correct data security trimming.</p>
<h2>Beyond the Basics</h2>
<h3>Design considerations</h3>
<p>&#160;</p>
<p>What did Microsoft consider when designing the Office365 service:</p>
<ul>
<li>Crawl versus Query – Chosen to go the query root as the crawl infrastructure within Office365 was limiting. Also hundreds of thousands of tenants need to have a consistent performance maintained. Query helps to provide the best and most consistent user experience. </li>
<li>UI Presentation – Users felt it was really important to see all the results on the same page. They didn&#8217;t want to have to switch between different pages. (I’m not sure I agree with this UX being the most optimum, users are used to choosing the ‘type’ of data they want on Bing/Google eg. Images/Shopping etc) </li>
<li>Relevance and clicks – Search learns over time. Search watches which results are clicked for specific queries and adjusts over time. </li>
<li>Background compatibility – Should provide other MOSS and SP2010 on-premises hybrid. This was not possible due to some significant infrastructure and services which would have required significant investment in extending the previous SharePoint versions. One major element was the challenge of identity mapping. </li>
</ul>
<h3>Alternative Hybrid User Experience</h3>
<p>&#160;</p>
<p>The demonstration showed the example of a glossary. This is stored in a SharePoint list on-premises. It is very useful information, but is not something users query for all the time. From on-premises the demo pulls ‘people’ results from Office365 via a dedicated search vertical.</p>
<p>To get the on-premises ‘people’ page to use the Office365 profiles it is as simple as pointing the web part settings to use the remote result source. This means when the users click the people results it goes to the Office365 profile page. Question is what happens to the links to people in normal item results?</p>
<p>Hit highlighting works.</p>
<p>Question about multiple people stores. Answer was the suggested best practice is to host in just one location.</p>
<h3>Result Click-Through: Options</h3>
<p>&#160;</p>
<p><a href="http://weshackett.com/wp-content/uploads/2013/04/image3.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://weshackett.com/wp-content/uploads/2013/04/image_thumb3.png" width="620" height="323" /></a></p>
<p>For users on-premises accessing on-premises links are fine. Once the user is on the Office365 search results the results now have internal only urls. The click through doesn’t route through the reverse proxy anymore. So users must have that external access to the internal system.</p>
<p>One solution is to have a VPN or Direct Access or leveraging the reverse proxy for url re-writing.</p>
<p>Microsoft recommend using VPN or Direct Access as it is easier to maintain over time.</p>
<p>The WOPI previews are operating where-ever the content is being served from.</p>
<h3>Share and Enjoy</h3>

<!-- Start WP Socializer - Social Buttons - Output -->
 &bull; <a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fweshackett.com%2F2013%2F04%2Fspc125-hybrid-and-search-in-the-cloud-brad-stevenson%2F&amp;t=SPC125+%26%238211%3B+Hybrid+and+Search+in+the+Cloud+%26%238211%3B+Brad+Stevenson" title="Share this on Facebook" target="_blank" rel="nofollow">Facebook</a> &bull; <a href="http://twitter.com/home?status=SPC125 &#8211; Hybrid and Search in the Cloud &#8211; Brad Stevenson%20-%20http%3A%2F%2Fweshackett.com%3Fp%3D1125%20" title="Tweet this !" target="_blank" rel="nofollow">Twitter</a> &bull; <a href="http://delicious.com/post?url=http%3A%2F%2Fweshackett.com%2F2013%2F04%2Fspc125-hybrid-and-search-in-the-cloud-brad-stevenson%2F&amp;title=SPC125+%26%238211%3B+Hybrid+and+Search+in+the+Cloud+%26%238211%3B+Brad+Stevenson&amp;notes=Brad+Stevenson+talks+about+creating+a+search+experience+which+spans+an+On-Premises+and+Office365+SharePoint+2013+environment.++++Search+in+the+cloud++%26%23160%3B++So+what+is+the+story+about+the+cloud+search+capability%3F++Comparing+SP2010+online+to+SP2013+o" title="Post this on Delicious" target="_blank" rel="nofollow">Delicious</a> &bull; <a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fweshackett.com%2F2013%2F04%2Fspc125-hybrid-and-search-in-the-cloud-brad-stevenson%2F&amp;title=SPC125+%26%238211%3B+Hybrid+and+Search+in+the+Cloud+%26%238211%3B+Brad+Stevenson&amp;bodytext=Brad+Stevenson+talks+about+creating+a+search+experience+which+spans+an+On-Premises+and+Office365+SharePoint+2013+environment.++++Search+in+the+cloud++%26%23160%3B++So+what+is+the+story+about+the+cloud+search+capability%3F++Comparing+SP2010+online+to+SP2013+o" title="Submit this to Digg" target="_blank" rel="nofollow">Digg</a> &bull; <a href="" title="" target="_blank" rel="nofollow"></a> &bull; <a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fweshackett.com%2F2013%2F04%2Fspc125-hybrid-and-search-in-the-cloud-brad-stevenson%2F&amp;title=SPC125+%26%238211%3B+Hybrid+and+Search+in+the+Cloud+%26%238211%3B+Brad+Stevenson" title="Submit this to StumbleUpon" target="_blank" rel="nofollow">StumbleUpon</a> &bull; <a href="http://weshackett.com/2013/04/spc125-hybrid-and-search-in-the-cloud-brad-stevenson/" onclick="addBookmark(event);" title="SPC125 &#8211; Hybrid and Search in the Cloud &#8211; Brad Stevenson" target="_blank" rel="nofollow">Add to favorites</a> &bull; <a href="mailto:?subject=SPC125 &#8211; Hybrid and Search in the Cloud &#8211; Brad Stevenson&amp;body=Brad Stevenson talks about creating a search experience which spans an On-Premises and Office365 SharePoint 2013 environment.    Search in the cloud  &amp;#160;  So what is the story about the cloud search capability?  Comparing SP2010 online to SP2013 o - http://weshackett.com/2013/04/spc125-hybrid-and-search-in-the-cloud-brad-stevenson/" title="Email this" target="_blank" rel="nofollow">Email</a> &bull; <a href="http://weshackett.com/feed/rss/" title="Subscribe to RSS" target="_blank" rel="nofollow">RSS</a>
<!-- End WP Socializer - Social Buttons - Output -->
]]></content:encoded>
			<wfw:commentRss>http://weshackett.com/2013/04/spc125-hybrid-and-search-in-the-cloud-brad-stevenson/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CKSDev for Visual Studio 2012 version 1.0 Released</title>
		<link>http://weshackett.com/2013/04/cksdev-for-visual-studio-2012-version-1-0-released/</link>
		<comments>http://weshackett.com/2013/04/cksdev-for-visual-studio-2012-version-1-0-released/#comments</comments>
		<pubDate>Thu, 18 Apr 2013 21:16:00 +0000</pubDate>
		<dc:creator>Wes Hackett</dc:creator>
				<category><![CDATA[CKSDev]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[Sharepoint 2013]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[SharePoint 2013 CKSDev]]></category>

		<guid isPermaLink="false">http://weshackett.com/?p=1119</guid>
		<description><![CDATA[Since 2009 CKSDev has been available to SharePoint 2010 developers to aid the creation of SharePoint solutions. The project extended the Visual Studio 2010 SharePoint project system with advanced templates and tools. Using these extensions you were able to find relevant information from your SharePoint...]]></description>
			<content:encoded><![CDATA[<p>Since 2009 CKSDev has been available to SharePoint 2010 developers to aid the creation of SharePoint solutions. The project extended the Visual Studio 2010 SharePoint project system with advanced templates and tools. Using these extensions you were able to find relevant information from your SharePoint environments without leaving Visual Studio. You experienced greater productivity while developing SharePoint components and had greater deployment capabilities on your local SharePoint installation.</p>
<p>The Visual Studio 2012 release of the MS SharePoint tooling supports both SharePoint 2010 and 2013. Our aim for CKSDev was to follow this approach and provide one tool to support both SharePoint versions from within Visual Studio 2012.</p>
<p>The VS2012 version has just been released. It contains the core quick deployment and server explorer features you had available in VS2010. All of the other features will be coming over the coming weeks as personal time allows. As you can imagine it’s no mean feat to port all of the existing features and support multiple SharePoint versions. The code base is also on a diet as code bloat was getting a little bit crazy as the tools evolved over the past 4 years.</p>
<p>You can find CKS: Development Tools Edition on CodePlex at <a href="http://cksdev.codeplex.com">http://cksdev.codeplex.com</a>.</p>
<p><strong>Download the extension directly within VS2012 from the extension manager or visit the </strong><a href="http://visualstudiogallery.msdn.microsoft.com/cf1225b4-aa83-4282-b4c6-34feec8fc5ec" target="_blank"><strong>Visual Studio Gallery</strong></a><strong>.</strong></p>
<p>We’re still looking for extension ideas so please post in the <a href="http://cksdev.codeplex.com/Thread/List.aspx">CKS Dev Discussions</a> anything you think would make life better for SharePoint developers.</p>
<h4>CKS Dev Feature highlights</h4>
<h5>Environment:</h5>
<ul>
<li>Copy assembly name so no more need to use reflector to get the full strong name.</li>
</ul>
<h5>Exploration</h5>
<ul>
<li>New Server Explorer nodes to list feature dependancies, site columns, web part gallery, style library, theme gallery.</li>
<li>Enhanced import functionality for web parts, content types, themes.</li>
<li>Create page layout from content type (publishing).</li>
<li>Copy Id.</li>
</ul>
<h5>Content</h5>
<ul>
<li><em>Coming Soon…</em></li>
</ul>
<h5>Deployment</h5>
<ul>
<li>Quick deploy to copy artefacts into the SharePoint root without the need for a build.</li>
<li><em>Deployment steps Coming Soon..</em></li>
</ul>
<p>To see more details and the full feature list visit <a href="http://cksdev.codeplex.com/documentation">http://cksdev.codeplex.com/documentation</a>.</p>
<h4><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong>Visit the CodePlex site for more information about the features and release.</strong></h4>
<h5>Share and Enjoy and thanks for the continued support</h5>
<h3>Share and Enjoy</h3>

<!-- Start WP Socializer - Social Buttons - Output -->
 &bull; <a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fweshackett.com%2F2013%2F04%2Fcksdev-for-visual-studio-2012-version-1-0-released%2F&amp;t=CKSDev+for+Visual+Studio+2012+version+1.0+Released" title="Share this on Facebook" target="_blank" rel="nofollow">Facebook</a> &bull; <a href="http://twitter.com/home?status=CKSDev for Visual Studio 2012 version 1.0 Released%20-%20http%3A%2F%2Fweshackett.com%3Fp%3D1119%20" title="Tweet this !" target="_blank" rel="nofollow">Twitter</a> &bull; <a href="http://delicious.com/post?url=http%3A%2F%2Fweshackett.com%2F2013%2F04%2Fcksdev-for-visual-studio-2012-version-1-0-released%2F&amp;title=CKSDev+for+Visual+Studio+2012+version+1.0+Released&amp;notes=Since+2009+CKSDev+has+been+available+to+SharePoint+2010+developers+to+aid+the+creation+of+SharePoint+solutions.+The+project+extended+the+Visual+Studio+2010+SharePoint+project+system+with+advanced+templates+and+tools.+Using+these+extensions+you+were+a" title="Post this on Delicious" target="_blank" rel="nofollow">Delicious</a> &bull; <a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fweshackett.com%2F2013%2F04%2Fcksdev-for-visual-studio-2012-version-1-0-released%2F&amp;title=CKSDev+for+Visual+Studio+2012+version+1.0+Released&amp;bodytext=Since+2009+CKSDev+has+been+available+to+SharePoint+2010+developers+to+aid+the+creation+of+SharePoint+solutions.+The+project+extended+the+Visual+Studio+2010+SharePoint+project+system+with+advanced+templates+and+tools.+Using+these+extensions+you+were+a" title="Submit this to Digg" target="_blank" rel="nofollow">Digg</a> &bull; <a href="" title="" target="_blank" rel="nofollow"></a> &bull; <a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fweshackett.com%2F2013%2F04%2Fcksdev-for-visual-studio-2012-version-1-0-released%2F&amp;title=CKSDev+for+Visual+Studio+2012+version+1.0+Released" title="Submit this to StumbleUpon" target="_blank" rel="nofollow">StumbleUpon</a> &bull; <a href="http://weshackett.com/2013/04/cksdev-for-visual-studio-2012-version-1-0-released/" onclick="addBookmark(event);" title="CKSDev for Visual Studio 2012 version 1.0 Released" target="_blank" rel="nofollow">Add to favorites</a> &bull; <a href="mailto:?subject=CKSDev for Visual Studio 2012 version 1.0 Released&amp;body=Since 2009 CKSDev has been available to SharePoint 2010 developers to aid the creation of SharePoint solutions. The project extended the Visual Studio 2010 SharePoint project system with advanced templates and tools. Using these extensions you were a - http://weshackett.com/2013/04/cksdev-for-visual-studio-2012-version-1-0-released/" title="Email this" target="_blank" rel="nofollow">Email</a> &bull; <a href="http://weshackett.com/feed/rss/" title="Subscribe to RSS" target="_blank" rel="nofollow">RSS</a>
<!-- End WP Socializer - Social Buttons - Output -->
]]></content:encoded>
			<wfw:commentRss>http://weshackett.com/2013/04/cksdev-for-visual-studio-2012-version-1-0-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SharePoint Evolution Conference 2013</title>
		<link>http://weshackett.com/2013/02/sharepoint-evolution-conference-2013/</link>
		<comments>http://weshackett.com/2013/02/sharepoint-evolution-conference-2013/#comments</comments>
		<pubDate>Mon, 25 Feb 2013 16:35:00 +0000</pubDate>
		<dc:creator>Wes Hackett</dc:creator>
				<category><![CDATA[Apps]]></category>
		<category><![CDATA[Apps for Office]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Event]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Sharepoint 2013]]></category>
		<category><![CDATA[SPEvo]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[SharePoint 2013]]></category>

		<guid isPermaLink="false">http://weshackett.com/?p=1106</guid>
		<description><![CDATA[For five years running Combined Knowledge have hosted the conference and this years looks to be the best yet. So why should you attend this conference? For me the key reasons would be: It will provide you with access to the best SharePoint experts from...]]></description>
			<content:encoded><![CDATA[<p><a href="http://weshackett.com/wp-content/uploads/2013/02/SPEvo13.png"><img title="SPEvo13" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="SPEvo13" src="http://weshackett.com/wp-content/uploads/2013/02/SPEvo13_thumb.png" width="620" height="279" /></a></p>
<p><font size="2">For five years running Combined Knowledge have hosted the conference and this years looks to be the best yet.</font></p>
<p><font size="2">So why should you attend this conference?</font></p>
<p><font size="2">For me the key reasons would be:</font></p>
<ul>
<li><font size="2">It will provide you with access to the best SharePoint experts from around the globe </font></li>
<li><font size="2">You can learn about the latest version of SharePoint 2013 and its key features and applications across the different tracks </font></li>
<li><font size="2">Meeting up with friends from across the SharePoint community </font></li>
<li><font size="2">Listen to real-life implementations from the community track speakers </font></li>
<li><font size="2">You get all the sessions on the DVD </font></li>
<li><font size="2">The party is always amazing <img class="wlEmoticon wlEmoticon-smile" style="border-top-style: none; border-left-style: none; border-bottom-style: none; border-right-style: none" alt="Smile" src="http://weshackett.com/wp-content/uploads/2013/02/wlEmoticon-smile.png" /> </font></li>
</ul>
<p><font size="2"></font></p>
<p><font size="2">So if you haven’t already done so make sure you register soon to be in with a shout at one of the many prizes up for grabs. </font><a href="http://www.sharepointevolutionconference.com/register.html" target="_blank"><font size="2">Register here</font></a></p>
<p><a href="http://www.sharepointevolutionconference.com/" target="_blank"><img title="Speaker_Evo-2013-Banner" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="Speaker_Evo-2013-Banner" src="http://weshackett.com/wp-content/uploads/2013/02/Speaker_Evo-2013-Banner1.png" width="620" height="83" /></a></p>
<p><font size="2">I’m lucky enough to be speaking at this years SharePoint Evolution Conference 2013 in London between the 15th and 17th of April 2013.</font></p>
<h2>Bringing SharePoint information into Office through Office Apps</h2>
<p><font size="2">Audience: <strong>Developers</strong></font></p>
<p><font size="2">Office 2013 introduces new Apps for Office which allows developers to create apps which interact with Word, Excel and Outlook. Using an App for Office we can bring information from within the enterprises SharePoint platform and help users create documents and bring increased value form their SharePoint data. The session will explore some scenarios to bring SharePoint into the Office clients.</font></p>
<p><a href="http://www.sharepointevolutionconference.com/abstracts.html#pnm301" target="_blank"><font size="2">My Session</font></a><font size="2"> is on from 9:45am &#8211; 10:45am on the Monday in the Pick and Mix track.</font></p>
<p><font size="2">Hopefully I’ll see you there <img class="wlEmoticon wlEmoticon-smile" style="border-top-style: none; border-left-style: none; border-bottom-style: none; border-right-style: none" alt="Smile" src="http://weshackett.com/wp-content/uploads/2013/02/wlEmoticon-smile.png" /></font></p>
<h3>Share and Enjoy</h3>

<!-- Start WP Socializer - Social Buttons - Output -->
 &bull; <a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fweshackett.com%2F2013%2F02%2Fsharepoint-evolution-conference-2013%2F&amp;t=SharePoint+Evolution+Conference+2013" title="Share this on Facebook" target="_blank" rel="nofollow">Facebook</a> &bull; <a href="http://twitter.com/home?status=SharePoint Evolution Conference 2013%20-%20http%3A%2F%2Fweshackett.com%3Fp%3D1106%20" title="Tweet this !" target="_blank" rel="nofollow">Twitter</a> &bull; <a href="http://delicious.com/post?url=http%3A%2F%2Fweshackett.com%2F2013%2F02%2Fsharepoint-evolution-conference-2013%2F&amp;title=SharePoint+Evolution+Conference+2013&amp;notes=++For+five+years+running+Combined+Knowledge+have+hosted+the+conference+and+this+years+looks+to+be+the+best+yet.++So+why+should+you+attend+this+conference%3F++For+me+the+key+reasons+would+be%3A+++++It+will+provide+you+with+access+to+the+best+SharePoint+ex" title="Post this on Delicious" target="_blank" rel="nofollow">Delicious</a> &bull; <a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fweshackett.com%2F2013%2F02%2Fsharepoint-evolution-conference-2013%2F&amp;title=SharePoint+Evolution+Conference+2013&amp;bodytext=++For+five+years+running+Combined+Knowledge+have+hosted+the+conference+and+this+years+looks+to+be+the+best+yet.++So+why+should+you+attend+this+conference%3F++For+me+the+key+reasons+would+be%3A+++++It+will+provide+you+with+access+to+the+best+SharePoint+ex" title="Submit this to Digg" target="_blank" rel="nofollow">Digg</a> &bull; <a href="" title="" target="_blank" rel="nofollow"></a> &bull; <a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fweshackett.com%2F2013%2F02%2Fsharepoint-evolution-conference-2013%2F&amp;title=SharePoint+Evolution+Conference+2013" title="Submit this to StumbleUpon" target="_blank" rel="nofollow">StumbleUpon</a> &bull; <a href="http://weshackett.com/2013/02/sharepoint-evolution-conference-2013/" onclick="addBookmark(event);" title="SharePoint Evolution Conference 2013" target="_blank" rel="nofollow">Add to favorites</a> &bull; <a href="mailto:?subject=SharePoint Evolution Conference 2013&amp;body=  For five years running Combined Knowledge have hosted the conference and this years looks to be the best yet.  So why should you attend this conference?  For me the key reasons would be:     It will provide you with access to the best SharePoint ex - http://weshackett.com/2013/02/sharepoint-evolution-conference-2013/" title="Email this" target="_blank" rel="nofollow">Email</a> &bull; <a href="http://weshackett.com/feed/rss/" title="Subscribe to RSS" target="_blank" rel="nofollow">RSS</a>
<!-- End WP Socializer - Social Buttons - Output -->
]]></content:encoded>
			<wfw:commentRss>http://weshackett.com/2013/02/sharepoint-evolution-conference-2013/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SPSUK Bring SharePoint into your Office with Apps for Office</title>
		<link>http://weshackett.com/2012/12/spsuk-bring-sharepoint-into-your-office-with-apps-for-office/</link>
		<comments>http://weshackett.com/2012/12/spsuk-bring-sharepoint-into-your-office-with-apps-for-office/#comments</comments>
		<pubDate>Mon, 10 Dec 2012 08:00:00 +0000</pubDate>
		<dc:creator>Wes Hackett</dc:creator>
				<category><![CDATA[Apps]]></category>
		<category><![CDATA[Apps for Office]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Event]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Sharepoint 2013]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Office365]]></category>
		<category><![CDATA[SharePoint 2013]]></category>
		<category><![CDATA[SharePoint Saturday]]></category>
		<category><![CDATA[SPSUK]]></category>

		<guid isPermaLink="false">http://weshackett.com/?p=1093</guid>
		<description><![CDATA[Saturday 8th December saw the 2012 SharePoint Saturday at Nottingham’s Conference Centre. Another great event organised with so many quality speakers and companies in attendance. I presented a session on Apps for Office 2013 and SharePoint 2013, the slides can be seen below. I hope...]]></description>
			<content:encoded><![CDATA[<p>Saturday 8th December saw the 2012 SharePoint Saturday at Nottingham’s Conference Centre. Another great event organised with so many quality speakers and companies in attendance.</p>
<p>I presented a session on Apps for Office 2013 and SharePoint 2013, the slides can be seen below. I hope everyone found the session useful <img alt="Smile" src="http://weshackett.com/wp-content/uploads/2011/11/wlEmoticon-smile.png" /> I certainly enjoyed presenting to such an interactive audience.</p>
<p>I think Apps for Office is one of the coolest new features of Office and SharePoint 2013 and my session gives a really quick overview of the Apps for Office solution space. Then the hook up between SharePoint and Office that is now possible through the demo solution.</p>
<p>Over the next few months I’ll be publishing a dedicated series for Apps for Office so stay tuned for more soon.</p>
<p> <iframe style="margin-bottom: 5px; border-top: #ccc 1px solid; border-right: #ccc 1px solid; border-bottom: #ccc 0px solid; border-left: #ccc 1px solid" height="356" marginheight="0" src="http://www.slideshare.net/slideshow/embed_code/15576895" frameborder="0" width="427" marginwidth="0" scrolling="no" mozallowfullscreen="mozallowfullscreen" webkitallowfullscreen="webkitallowfullscreen" allowfullscreen="allowfullscreen"> </iframe>
<div style="margin-bottom: 5px"><strong><a title="SPSUK Apps for Office" href="http://www.slideshare.net/weshackett/spsuk-apps-for-office" target="_blank">SPSUK Apps for Office</a> </strong>from <strong><a href="http://www.slideshare.net/weshackett" target="_blank">Wes Hackett</a></strong> </div>
<p>The code for the demo solution is available <a href="http://weshackett.com/wp-content/uploads/2012/12/SPSUKDocumentBuilderApp.zip" target="_blank">here</a>.</p>
<p>The code is far from production ready and is used at your own risk.</p>
<h3>Share and Enjoy</h3>

<!-- Start WP Socializer - Social Buttons - Output -->
 &bull; <a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fweshackett.com%2F2012%2F12%2Fspsuk-bring-sharepoint-into-your-office-with-apps-for-office%2F&amp;t=SPSUK+Bring+SharePoint+into+your+Office+with+Apps+for+Office" title="Share this on Facebook" target="_blank" rel="nofollow">Facebook</a> &bull; <a href="http://twitter.com/home?status=SPSUK Bring SharePoint into your Office with Apps for Office%20-%20http%3A%2F%2Fweshackett.com%3Fp%3D1093%20" title="Tweet this !" target="_blank" rel="nofollow">Twitter</a> &bull; <a href="http://delicious.com/post?url=http%3A%2F%2Fweshackett.com%2F2012%2F12%2Fspsuk-bring-sharepoint-into-your-office-with-apps-for-office%2F&amp;title=SPSUK+Bring+SharePoint+into+your+Office+with+Apps+for+Office&amp;notes=Saturday+8th+December+saw+the+2012+SharePoint+Saturday+at+Nottingham%E2%80%99s+Conference+Centre.+Another+great+event+organised+with+so+many+quality+speakers+and+companies+in+attendance.++I+presented+a+session+on+Apps+for+Office+2013+and+SharePoint+2013%2C+t" title="Post this on Delicious" target="_blank" rel="nofollow">Delicious</a> &bull; <a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fweshackett.com%2F2012%2F12%2Fspsuk-bring-sharepoint-into-your-office-with-apps-for-office%2F&amp;title=SPSUK+Bring+SharePoint+into+your+Office+with+Apps+for+Office&amp;bodytext=Saturday+8th+December+saw+the+2012+SharePoint+Saturday+at+Nottingham%E2%80%99s+Conference+Centre.+Another+great+event+organised+with+so+many+quality+speakers+and+companies+in+attendance.++I+presented+a+session+on+Apps+for+Office+2013+and+SharePoint+2013%2C+t" title="Submit this to Digg" target="_blank" rel="nofollow">Digg</a> &bull; <a href="" title="" target="_blank" rel="nofollow"></a> &bull; <a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fweshackett.com%2F2012%2F12%2Fspsuk-bring-sharepoint-into-your-office-with-apps-for-office%2F&amp;title=SPSUK+Bring+SharePoint+into+your+Office+with+Apps+for+Office" title="Submit this to StumbleUpon" target="_blank" rel="nofollow">StumbleUpon</a> &bull; <a href="http://weshackett.com/2012/12/spsuk-bring-sharepoint-into-your-office-with-apps-for-office/" onclick="addBookmark(event);" title="SPSUK Bring SharePoint into your Office with Apps for Office" target="_blank" rel="nofollow">Add to favorites</a> &bull; <a href="mailto:?subject=SPSUK Bring SharePoint into your Office with Apps for Office&amp;body=Saturday 8th December saw the 2012 SharePoint Saturday at Nottingham’s Conference Centre. Another great event organised with so many quality speakers and companies in attendance.  I presented a session on Apps for Office 2013 and SharePoint 2013, t - http://weshackett.com/2012/12/spsuk-bring-sharepoint-into-your-office-with-apps-for-office/" title="Email this" target="_blank" rel="nofollow">Email</a> &bull; <a href="http://weshackett.com/feed/rss/" title="Subscribe to RSS" target="_blank" rel="nofollow">RSS</a>
<!-- End WP Socializer - Social Buttons - Output -->
]]></content:encoded>
			<wfw:commentRss>http://weshackett.com/2012/12/spsuk-bring-sharepoint-into-your-office-with-apps-for-office/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SPC147 &#8211; Mastering app for Office Development &#8211; Ali Powell</title>
		<link>http://weshackett.com/2012/11/spc147-mastering-app-for-office-development-ali-powell/</link>
		<comments>http://weshackett.com/2012/11/spc147-mastering-app-for-office-development-ali-powell/#comments</comments>
		<pubDate>Mon, 26 Nov 2012 10:00:00 +0000</pubDate>
		<dc:creator>Wes Hackett</dc:creator>
				<category><![CDATA[Apps]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Event]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Session Notes]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Sharepoint 2013]]></category>
		<category><![CDATA[SPC12]]></category>
		<category><![CDATA[Patterns]]></category>
		<category><![CDATA[SharePoint 2013]]></category>

		<guid isPermaLink="false">http://weshackett.com/?p=1078</guid>
		<description><![CDATA[Ali provides a walkthrough of Apps for Office. Look at the type of shape and see some examples. Explanations of the API framework.]]></description>
			<content:encoded><![CDATA[<p>Ali provides a walkthrough of Apps for Office. Look at the type of shape and see some examples. Explanations of the API framework.</p>
<h2>Mastering Apps for Office Development</h2>
<p>Looking at various aspects that need consideration during development and design.</p>
<h3>Trends impacting the apps we develop</h3>
<p>Devices &#8211; increasing numbers projections of 350m smartphones in the workplace by 2016</p>
<p>People &#8211; 82% of world&#8217;s online population using social networking</p>
<p>Cloud &#8211; 50% of enterprises on the &#8216;road to&#8217; cloud</p>
<p>Office is the most installed apps outside of anything in browser</p>
<h3>New apps, New scenarios, New User Experiences</h3>
<p>Devices &#8211; Fast and fluid with touch, pen, mouse and keyboard. Immersive experience (Win8). Support for different OS</p>
<p>Cloud &#8211; Office on demand, roaming and up to date. New cloud app dev model. Enterprise grade reliability and standards.</p>
<p>Social &#8211; Newsfeeds and micro blogging, extend with yammer. Pervasive social across Office. Multiparty HD video and Skype federation.</p>
<h3>Office Mobile across platforms</h3>
<p>The apps should work across all devices</p>
<p>Consumers typically have multiple devices</p>
<h3>Apps are everywhere</h3>
<p>They are becoming the primary way we deliver functionality to end users.</p>
<p>This is changing the paradigm about how we design and develop functionality. Old world apps were often composite applications which had a lot of breadth. They would have multiple tabs, screens and literally hundreds of different bits of functionality in one app.</p>
<p>Apps really give you the ability to give you transacted solutions which essential guide a user from start to finish for a specific task. </p>
<p>With this shift to much more targeted usage, our app lifecycles are vastly reduced as they need to deleiver less functionality and more targeted use cases.</p>
<p>It should reduce the need for 18-36 months projects before something is delivered.</p>
<h3>A new paradigm for Solutions</h3>
<p>Personas &gt; (have) &gt; Objectives &gt; (and use) &gt; Devices &gt; (to consume) &gt; Solutions &gt; (composed of) &gt; Services &gt; (running on) &gt; Infrastructure</p>
<p>Really now if you look at the flow above the solutions we are building are tied to personas. Those personas have the responsibility to meet some objective within your solution. They use devices and these devices consume the solutions we build. Most solutions will be consuming some kind of services, they often compose multiple services together into an app. This accelerates solution development by making better use of things already internally provide or from the marketplaces. All these services run on infrastructure, and the trend is to find infrastructure which is flexible and scalable.</p>
<p><strong>Note</strong>: Tie an app solution to a specific end user persona to make them a success.</p>
<h3>Apps for Office</h3>
<p>Loosely coupled services with simpler contracts that enable developers access to more best of breed services in private and public clouds.</p>
<p>HTML5 and CSS3 are rapidly becoming the UX code paradigm.</p>
<p>Support the standardised identity model that spans computing devices.</p>
<p>End user focused, contextual, web based and discoverable.</p>
<p>Bring the web into Office.</p>
<h3>What are apps for Office?</h3>
<ol>
<li>Document-based manifest driven applications </li>
<li>HTML5, CSS3, JavaScript </li>
<li>Web applications hosted by any http delivery mechanism </li>
</ol>
<p><strong>Note</strong>: Apps for Office do not replace VSTO, they just give a different ability to deliver extensions.</p>
<h3>Apps for Office Shapes</h3>
<p>Task pane</p>
<p>Content</p>
<p>Mail</p>
<h3>App for Office Framework</h3>
<p>App for Office</p>
<p>Web Extensions Framework (wef)</p>
<p>Office JSOM</p>
<p>Application specific JSON (Outlook JSON, etc)</p>
<p>App API&#8217;s (third party api&#8217;s)</p>
<p>Rich clients / Web Browsers</p>
<h3>App Manifest</h3>
<p>Demo of the standard manifest.</p>
<p>Important bits of information from the manifest</p>
<ol>
<li>app type &#8211; which defines which shape this app is </li>
<li>Id &#8211; is the unique Guid identifier which tells Office what your app is. This binds the app to the document or mailbox item its associated with. This Id is also the service point for upgrading the apps in the future. </li>
<li>Version &#8211; the version of this app </li>
<li>ProviderName &#8211; The name of the organisation who built the app </li>
<li>DefaultLocale &#8211; The language for the default. This MUST be set if you want Office store validation to pass </li>
<li>DisplayName &#8211; The name of the app </li>
<li>Description &#8211; The description of the app </li>
<li>AppDomains &#8211; ?? </li>
<li>Capabilities &#8211; Allows you to specifiy which set of functionality it depends upon within the host </li>
<li>Default Settings
<ol>
<li>SourceLocation &#8211; VERY IMPORTANT as it tells the Office Runtime which url it should load when the app loads within Office </li>
</ol>
</li>
<li>Permissions &#8211; The collection of permissions this document requires to be granted to run its functionality </li>
</ol>
<p>Office stores the catalog information</p>
<p>In registry: Computer\HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Wef\Developer key can have a string key set for the manifest of the demo app</p>
<p>This helps during development without a catalogue location</p>
<h3>App for Office Manifest</h3>
<p>There are four pieces of information when building an app for Office are covered:</p>
<ol>
<li>Consumption Declaration &#8211; Means you need to make sure the capabilities your app depends upon, and that you have identified the type of app you want deployed. You can&#8217;t change the shape of an app once its been associated with an app. </li>
<li>Capability Consumption &#8211; Defining which Office capabilities the app needs/ </li>
<li>Service Consumption &#8211; Identify the services your app needs to consume. Assert the client endpoints the app is going to consume. This is part of the &#8216;AppDomain&#8217; definitions. </li>
<li>Aesthetic Design &#8211; Make this an important piece, two things to make your app is installed. Make sure the first this is that the icon is a really good one. Then also consider how it sits alongside the Office branding. </li>
</ol>
<h3>Demo</h3>
<p>Looking at an excel app for election tracker</p>
<p>Inside the OpenXML the app is referenced but not embedded</p>
<p>Open the &#8216;xl&#8217; folder</p>
<p>Open the &#8216;webextensions&#8217; folder</p>
<p>Open the webextensions.xml file</p>
<p>The xml contains some interesting nodes.</p>
<p>WebExtension Id &#8211; is the unique ID of that app</p>
<p>Reference</p>
<ul>
<li>StoreType, OMEX is the public store, Registry would be a developer app, insternal would be internal app </li>
</ul>
<p>Bindings &#8211; Shows the apps bindings to the content</p>
<p>Another interesting fact is that the last state of the app visually gets stored as an image in the document should the app not be available. This occurs when a save of the document is made.</p>
<p>Note: It would be interesting to see what the behaviour is around Versioning and Co-Auth in SharePoint hosted docs for this.</p>
<p>Open the &#8216;_rels&#8217; folder</p>
<p>Open the webextensions.xml.rels file</p>
<p>This file binds the app instance and the image together within the document</p>
<p>Note: nothing is being installed to the local machine</p>
<p>Demo of this Excel app within the WOPI client which was pretty neat.</p>
<h3>App For Office User Experience</h3>
<p>App for Office execution is different on Client and WOPI.</p>
<p>Think this info was a little bit to deep and possibly to hardcore.</p>
<p>Apps are isolated, secure and performance boxed</p>
<p>Web client basically runs in an iFrame sandbox</p>
<p>Target capabilities by discovering your host &#8211; these become key to design. The developer should have intimate knowledge of what the target Office client can provide. So if it has been targeted to say Excel and Word that if a user opens it in Project that it detects this and gracefully exits.</p>
<p>Avoid the common pitfalls &#8211; JS Alerts are not fired. Apps for Office have governors in outlook which prevent you impacting the performance of Outlook.</p>
<p>Resource awareness &#8211; You don’t have all the resources from the host machine. The governors limit this. These will close the app if you breach the thresholds. In Outlook apps you can use REGEX but these have fixed time and CPUs before they are taken offline.</p>
<p>Crossing AppDomains &#8211; Sometimes this is needed, use AppDomains to tell the web extensions framework you will be doing this. If you don&#8217;t the resource will load in a new browser window, which isn&#8217;t probably what you want.</p>
<p>Resource sharing leverage Oauth &#8211; Make this default auth model. Identity is the responsibility of your app to require, acquire and maintain.</p>
<p>Give your app some style &#8211; Make it easy to follow, look nice and be creative.</p>
<h3>Demo </h3>
<p>Outlook VOIP Mail app</p>
<p>Demo&#8217;d the rules for a mailbox item</p>
<h3>Apps for Office Scenarios</h3>
<p>SharePoint Centric &#8211; Deployed as part of your SharePoint app as document templates so that they light up when you use that document</p>
<ul>
<li>Business Process &#8211; Start a workflow from the document </li>
</ul>
<ul>
<li>Team Collaboration &#8211; As the user moves around the document supplementary information is brought back from SharePoint. </li>
<li>Workflow </li>
</ul>
<p>Document Centric &#8211; </p>
<ul>
<li>Data visualisation / Analysis &amp; Mashups </li>
</ul>
<ul>
<li>Reference Tools </li>
</ul>
<ul>
<li>Contextual Content &amp; Services </li>
</ul>
<ul>
<li>Content Authoring </li>
</ul>
<ul>
<li>Dashboards </li>
</ul>
<h3>Key Takeawys</h3>
<p>Apps &gt; (require) &gt; Capabilities &gt; (that target) &gt; Hosts</p>
<p>One app can run across multiple clients and the cloud.</p>
<p>Mailbox centric apps for email and appointment features.</p>
<p>Task pane and Content apps for document centric apps.</p>
<h3>More Information</h3>
<p>JavaScript API for Office</p>
<p><a href="http://bit.ly/UV2POY">http://bit.ly/UV2POY</a></p>
<p>Resource Usage Settings</p>
<p><a href="http://bit.ly/116C8dy">http://bit.ly/116C8dy</a></p>
<p>Apps for Office XML Manifest</p>
<p><a href="http://bit.ly/SomibV">http://bit.ly/SomibV</a></p>
<p>Apps for Office Training</p>
<p><a href="http://bit.ly/N76ZOC">http://bit.ly/N76ZOC</a></p>
<p>Apps for Office Samples</p>
<p><a href="http://bit.ly/V4zf87">http://bit.ly/V4zf87</a></p>
<h3>Summary</h3>
<p>Useful overview session. The different niche information to other Apps for Office sessions made this one worth seeing.</p>
<h3>Share and Enjoy</h3>

<!-- Start WP Socializer - Social Buttons - Output -->
 &bull; <a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fweshackett.com%2F2012%2F11%2Fspc147-mastering-app-for-office-development-ali-powell%2F&amp;t=SPC147+%26%238211%3B+Mastering+app+for+Office+Development+%26%238211%3B+Ali+Powell" title="Share this on Facebook" target="_blank" rel="nofollow">Facebook</a> &bull; <a href="http://twitter.com/home?status=SPC147 &#8211; Mastering app for Office Development &#8211; Ali Powell%20-%20http%3A%2F%2Fweshackett.com%3Fp%3D1078%20" title="Tweet this !" target="_blank" rel="nofollow">Twitter</a> &bull; <a href="http://delicious.com/post?url=http%3A%2F%2Fweshackett.com%2F2012%2F11%2Fspc147-mastering-app-for-office-development-ali-powell%2F&amp;title=SPC147+%26%238211%3B+Mastering+app+for+Office+Development+%26%238211%3B+Ali+Powell&amp;notes=Ali+provides+a+walkthrough+of+Apps+for+Office.+Look+at+the+type+of+shape+and+see+some+examples.+Explanations+of+the+API+framework." title="Post this on Delicious" target="_blank" rel="nofollow">Delicious</a> &bull; <a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fweshackett.com%2F2012%2F11%2Fspc147-mastering-app-for-office-development-ali-powell%2F&amp;title=SPC147+%26%238211%3B+Mastering+app+for+Office+Development+%26%238211%3B+Ali+Powell&amp;bodytext=Ali+provides+a+walkthrough+of+Apps+for+Office.+Look+at+the+type+of+shape+and+see+some+examples.+Explanations+of+the+API+framework." title="Submit this to Digg" target="_blank" rel="nofollow">Digg</a> &bull; <a href="" title="" target="_blank" rel="nofollow"></a> &bull; <a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fweshackett.com%2F2012%2F11%2Fspc147-mastering-app-for-office-development-ali-powell%2F&amp;title=SPC147+%26%238211%3B+Mastering+app+for+Office+Development+%26%238211%3B+Ali+Powell" title="Submit this to StumbleUpon" target="_blank" rel="nofollow">StumbleUpon</a> &bull; <a href="http://weshackett.com/2012/11/spc147-mastering-app-for-office-development-ali-powell/" onclick="addBookmark(event);" title="SPC147 &#8211; Mastering app for Office Development &#8211; Ali Powell" target="_blank" rel="nofollow">Add to favorites</a> &bull; <a href="mailto:?subject=SPC147 &#8211; Mastering app for Office Development &#8211; Ali Powell&amp;body=Ali provides a walkthrough of Apps for Office. Look at the type of shape and see some examples. Explanations of the API framework. - http://weshackett.com/2012/11/spc147-mastering-app-for-office-development-ali-powell/" title="Email this" target="_blank" rel="nofollow">Email</a> &bull; <a href="http://weshackett.com/feed/rss/" title="Subscribe to RSS" target="_blank" rel="nofollow">RSS</a>
<!-- End WP Socializer - Social Buttons - Output -->
]]></content:encoded>
			<wfw:commentRss>http://weshackett.com/2012/11/spc147-mastering-app-for-office-development-ali-powell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SPC046 &#8211; Creating apps for Excel, Word and PowerPoint &#8211; Rolando Jimenez</title>
		<link>http://weshackett.com/2012/11/spc046-creating-apps-for-excel-word-and-powerpoint-rolando-jimenez/</link>
		<comments>http://weshackett.com/2012/11/spc046-creating-apps-for-excel-word-and-powerpoint-rolando-jimenez/#comments</comments>
		<pubDate>Sun, 25 Nov 2012 08:00:00 +0000</pubDate>
		<dc:creator>Wes Hackett</dc:creator>
				<category><![CDATA[Apps]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Event]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Session Notes]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Sharepoint 2013]]></category>
		<category><![CDATA[SPC12]]></category>
		<category><![CDATA[Apps for Office]]></category>
		<category><![CDATA[Patterns]]></category>
		<category><![CDATA[SharePoint 2013]]></category>

		<guid isPermaLink="false">http://weshackett.com/?p=1062</guid>
		<description><![CDATA[Rolando introduces the new investments by Microsoft for Apps for Office. This session is a deep dive into how to create apps in Excel, Word and PowerPoint.]]></description>
			<content:encoded><![CDATA[<p>Rolando introduces the new investments by Microsoft for Apps for Office. This session is a deep dive into how to create apps in Excel, Word and PowerPoint.</p>
<h2>Common App Architecture</h2>
<p>&#160;</p>
<p>The diagram shown highlights the architectural structure of the app model. The Office 2013 also contains a client side API. This allows apps to interact with the office content.</p>
<p>The session focus is on the client side logic so the:</p>
<p>App containing the HTML/CSS/JavaScript    <br />Office JavaScript</p>
<h3>Apps for Office &#8211; Recap</h3>
<p>Web Page + App Manifest = App</p>
<p>Core concepts</p>
<ul>
<li>3 shapes, Task Pane, Content and Mail shape </li>
<li>Multi-platform and Cross App
<ul>
<li>Excel (web/desktop) </li>
<li>Outlook (Web/Desktop/Mobile Web) </li>
<li>Word (Desktop) </li>
<li>PowerPoint (Desktop) </li>
<li>Project (Desktop) </li>
</ul>
</li>
<li>JavaScript API </li>
<li>Runtime sandbox </li>
</ul>
<p>It is important to note that Apps for Office are agnostic to its host and is a core principle.</p>
<h3>Principles</h3>
<p>Cross Platform &#8211; designed from the ground up, providing abstraction, is async. Microsoft have not ported the old APIs (COM or .Net) into JavaScript they have built this from the first principles.</p>
<p>Cross App &#8211; common objects and methods across apps (selection, tables, settings) Principle is to present the office suite to a developer consistently and not really concern them whether they are in Word or PowerPoint. A selection is a selection.</p>
<p>Compatibility -Office version to version</p>
<p>Web standards &#8211; ECMAScript 5 e.g. Property get/set, strict mode, plain JS objects</p>
<p>Performance &#8211; async, limits. Things will be shut down which sap performance</p>
<p>Office JavaScript API Overview &gt;</p>
<p>The diagram shows the hierarchy</p>
<ul>
<li>Office.context
<ul>
<li>Document
<ul>
<li>R/W selection </li>
<li>Bindings </li>
<li>Settings </li>
<li>CustomXmlParts </li>
</ul>
</li>
<li>Mailbox
<ul>
<li>Item </li>
<li>User Profile </li>
<li>EWS </li>
<li>Properties &amp; Settings </li>
</ul>
</li>
<li>Project
<ul>
<li>Project Info </li>
<li>Tasks </li>
</ul>
</li>
</ul>
</li>
</ul>
<p>This session will focus on the &#8216;document&#8217; branch of the API</p>
<h3>Demo</h3>
<p>Basic Hello World example</p>
<p>Choose App for Office 2013 in VS2012</p>
<p>Demo app selection was all the Task Pane options</p>
<p>In the VS solution the Office App project is the top one, with the manifest file inside</p>
<p>Pressing F5 before any changes should run a working default code app</p>
<p>In the html there is a JS include for</p>
<blockquote><p>&lt;script src=&quot;../Scripts/Office/1.0/office.js&quot;&gt;&lt;/script&gt;</p>
</blockquote>
<p>Which means the Office API is being included</p>
<p>But be aware that this file is actually on a MS CDN and this is actually commented out by default. So good practice is to change to use the CDN version. This will mean that as the API gets updated your app will get them.</p>
<p>The first step is to create the &#8216;Office.initialize&#8217; function</p>
<p>This function is the runtime handshake, and the app will error if it is missing</p>
<p>For Excel, Word and PowerPoint the document object is the most important object to start from</p>
<p>To change the run client you can change the &#8216;start action&#8217; to the client you want</p>
<p>You can change the type of data you can interact with you use the &#8216;coercionType:Office.CoercionType&#8217; which allows you to set things like html, openXML etc.</p>
<p>During the demo Rolando used a snippet of html for bold text, enetered it into the task pane app and set data pasted it into the doc as bold text. Proving the API can interpret the html into the document.</p>
<p><strong>Note</strong>: You can change the html during debugging if you just click save and F5 in the app window</p>
<p>Demo of the OpenXML and its power</p>
<p>This is very useful where you have complex information content.</p>
<p>Org chart example showed how the app can interact with OpenXML to fill an orgchart form data in the app</p>
<h3>Bindings Example</h3>
<p>Bing map example bound to the data</p>
<p>The project is a Content app</p>
<p>Used the OOTB Bing Map scripts</p>
<p><strong>Technique</strong>: In Office Apps the JavaScript &#8216;alert&#8217; has been suppressed so as a developer you need to implement somewhere to show messages and debugging markers.</p>
<p><strong>Note</strong>: the selection supports text/matrix and tables</p>
<p>Demo showed a basic map insertion and setting pins on the map based on selection of cells</p>
<p>To add a binding to the document call into the &#8216;Office.context.document.bindings&#8217; object</p>
<p>To have the content app react an event handler needs registering</p>
<p>This can then react and make the app change based on whether data or selections have changed.</p>
<h3>Settings example</h3>
<p>Code example:</p>
<blockquote><p>_doc.settings.set(&quot;mode&quot;, _mode);      <br />_doc.settings.saveAsync();</p>
</blockquote>
<p>Which persists the mode setting of the app into the document.</p>
<p><strong>Technique</strong>: think about this state persistence for you apps, as a usability aspect it would be important</p>
<h3>Custom XML Parts</h3>
<p>A hidden and powerful feature in Office</p>
<p>These were introduced in 2007, documents can store islands of xml data, these are called custom XML parts within a document file.</p>
<h3>Content Control Binding to parts</h3>
<p>Word has content controls, these have been around since 2007 , these controls act as containers for specific kinds of content. Content controls can be mapped to nodes within the custom XML part.</p>
<p>There is now a new repeating section content control. This control provides the capability to bind to a collection of nodes.</p>
<p><strong>Note</strong>: How to enable the Word developer tab, Backstage &gt;&gt; Options &gt;&gt; Customise Ribbon &gt;&gt; Right hand list has the &#8216;Developer&#8217; and check it.</p>
<p>The developer tab allows the viewing and editing of the XML mapping pane</p>
<p>You can add a new part from that task pane.</p>
<p>Once the content is inserted into the xml mapping pane, you can right click and choose &#8216;insert content control&#8217; and select the type of control you need.</p>
<p>Word also now has a repeating content control. So you can create a table, insert values from the XML and then highlight the entity and insert a repeating control to make it repeat for the length of the entity array.</p>
<p>Of course the example was done manually, but it can be done via the app code as well. This becomes powerful to embed data into the document.</p>
<p>Example used was an invoice document bringing in the data from another service. This is a very cool use case.</p>
<p>Operations that can be performed </p>
<ol>
<li>Add/Delete custom XML parts </li>
<li>Get XML parts </li>
<li>Get/Set node values </li>
<li>Event handlers for node deleted, inserted, or replaces</li>
</ol>
<p>Core objects for working with custom XML parts </p>
<ol>
<li>CustomXmlPart </li>
<li>CustomXmlParts </li>
<li>CustomXmlNode </li>
<li>CustomXmlPrefixMappings</li>
</ol>
<h3>Connecting to SharePoint</h3>
<p>How Apps for Office relate to SP</p>
<p>Now that Office365 contains Office, Exchange and SharePoint developers can now take advantage of this to create very complex solutions which span these technical capabilities.</p>
<p>Example is a simple task pane app which works in Word or Excel called &#8216;SPLister&#8217;</p>
<p>What this demo app does is allow the selection of any table that exists in the document, and then automatically generate a SharePoint list of it.</p>
<p>A key note is that the app needs to be told the SP url</p>
<p>The demo app is running from Azure so it will need to get into SP via Oauth</p>
<p>When invoked SP realises and asks the user to trust that app via Oauth consent flow page</p>
<p>Once SP issues the app with its access token it can start to communicate to the app.</p>
<p>The app is using the client side OM to create the list.</p>
<p>The demo app has both client and server side code. This was a little frustrating as it would have been great to see this being a JavaScript only hosted app.</p>
<p>Showed the &#8216;Seller Dashboard&#8217; and the client ids</p>
<p>The &#8216;client id&#8217; is the id which allows you permissions to request access to SharePoint in Office365</p>
<p>Code example for initialising the authentication to SharePoint.</p>
<blockquote><p>function initAuthFlow(siteUrl, inSameWindow) {      <br />authorizeUrl = siteUrl + &quot;_layouts/15/OAuthAuthorize.aspx?IsDlg=1&quot;;       <br />authorizeUrl += &quot;&amp;client)id=&quot; + $(&quot;#clientId&quot;).val();       <br />authorizeUrl += &quot;&amp;scope=Web.Manage&quot;;       <br />authorizeUrl += &quot;&amp;response_type=code&quot;;       <br />authorizeUrl += &quot;&amp;redirect_uri=&quot; + $(&quot;#redirectUrl&quot;).val();       <br />authorizeUrl += &quot;&amp;state=&quot; + siteUrl;</p>
<p>if (inSameWindow) {      <br />//Perform authorization flow in this window       <br />window.location = authorizeUrl;       <br />} else {       <br />//Open a new window to perform the authorization flow       <br />authWindow = window.open(authorizeUrl, &quot;authWindow&quot;);       <br />codeListener(); //Start listening for the auth code       <br />}       <br />}</p>
</blockquote>
<p>This code will start the auth request, this allows the permission. The client id provides the identifier for the calling app. The code also requests the permissions it needs on SharePoint. The code asks for the auth code in the url and provides the call-back redirection url to send it too.</p>
<p>The example app has the handling logic for the returned auth code in the C# code behind of the aspx app page. The &#8216;TokenCache&#8217; and &#8216;TokenHelper&#8217; classes are used to handle storage of the returned token to reduce the need to keep asking for it.</p>
<h3>Functional areas v&#8217;s App support summary</h3>
<p>&#160;</p>
<table border="1" cellspacing="0" cellpadding="2" width="600">
<tbody>
<tr>
<td valign="top" width="100">Functional area</td>
<td valign="top" width="100">
<p align="center">Word</p>
</td>
<td valign="top" width="100">
<p align="center">Excel/Excel WAC </p>
</td>
<td valign="top" width="100">
<p align="center">PowerPoint </p>
</td>
<td valign="top" width="100">
<p align="center">Outlook/OQA </p>
</td>
<td valign="top" width="100">
<p align="center">Project </p>
</td>
</tr>
<tr>
<td valign="top" width="100">
<p align="center">Get/Set data as text, table, matrix </p>
</td>
<td valign="top" width="100">
<p align="center">X</p>
</td>
<td valign="top" width="100">
<p align="center">X</p>
</td>
<td valign="top" width="100">
<p align="center">X</p>
</td>
<td valign="top" width="100">
<p align="center"></p>
</td>
<td valign="top" width="100">
<p align="center">X</p>
</td>
</tr>
<tr>
<td valign="top" width="100">
<p align="center">Settings </p>
</td>
<td valign="top" width="100">
<p align="center">X</p>
</td>
<td valign="top" width="100">
<p align="center">X</p>
</td>
<td valign="top" width="100">
<p align="center">X</p>
</td>
<td valign="top" width="100">
<p align="center">X</p>
</td>
<td valign="top" width="100">
<p align="center"></p>
</td>
</tr>
<tr>
<td valign="top" width="100">
<p align="center">Get File</p>
</td>
<td valign="top" width="100">
<p align="center">X</p>
</td>
<td valign="top" width="100">
<p align="center"></p>
</td>
<td valign="top" width="100">
<p align="center">X</p>
</td>
<td valign="top" width="100">
<p align="center"></p>
</td>
<td valign="top" width="100">
<p align="center"></p>
</td>
</tr>
<tr>
<td valign="top" width="100">
<p align="center">Bindings </p>
</td>
<td valign="top" width="100">
<p align="center">X</p>
</td>
<td valign="top" width="100">
<p align="center">X</p>
</td>
<td valign="top" width="100">
<p align="center"></p>
</td>
<td valign="top" width="100">
<p align="center"></p>
</td>
<td valign="top" width="100">
<p align="center"></p>
</td>
</tr>
<tr>
<td valign="top" width="100">
<p align="center">Custom XML Parts</p>
</td>
<td valign="top" width="100">
<p align="center">X</p>
</td>
<td valign="top" width="100">
<p align="center"></p>
</td>
<td valign="top" width="100">
<p align="center"></p>
</td>
<td valign="top" width="100">
<p align="center"></p>
</td>
<td valign="top" width="100">
<p align="center"></p>
</td>
</tr>
<tr>
<td valign="top" width="100">
<p align="center">Html and OOXML </p>
</td>
<td valign="top" width="100">
<p align="center">X</p>
</td>
<td valign="top" width="100">
<p align="center"></p>
</td>
<td valign="top" width="100">
<p align="center"></p>
</td>
<td valign="top" width="100">
<p align="center"></p>
</td>
<td valign="top" width="100">
<p align="center"></p>
</td>
</tr>
<tr>
<td valign="top" width="100">
<p align="center">Mailbox</p>
</td>
<td valign="top" width="100">
<p align="center"></p>
</td>
<td valign="top" width="100">
<p align="center"></p>
</td>
<td valign="top" width="100">
<p align="center"></p>
</td>
<td valign="top" width="100">
<p align="center">X</p>
</td>
<td valign="top" width="100">
<p align="center">X</p>
</td>
</tr>
</tbody>
</table>
<h3>Resources</h3>
<p><a href="http://dev.office.com">http://dev.office.com</a></p>
<h3>Summary</h3>
<p>A good overview into the power of Apps for Office. It was disappointing that the question of how to host them within SharePoint (not AZURE) remained unanswered. I&#8217;m guessing that an &#8216;auto-hosted&#8217; SharePoint app might be the answer, but only some trial and error will confirm that.</p>
<h3>Share and Enjoy</h3>

<!-- Start WP Socializer - Social Buttons - Output -->
 &bull; <a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fweshackett.com%2F2012%2F11%2Fspc046-creating-apps-for-excel-word-and-powerpoint-rolando-jimenez%2F&amp;t=SPC046+%26%238211%3B+Creating+apps+for+Excel%2C+Word+and+PowerPoint+%26%238211%3B+Rolando+Jimenez" title="Share this on Facebook" target="_blank" rel="nofollow">Facebook</a> &bull; <a href="http://twitter.com/home?status=SPC046 &#8211; Creating apps for Excel, Word and PowerPoint &#8211; Rolando Jimenez%20-%20http%3A%2F%2Fweshackett.com%3Fp%3D1062%20" title="Tweet this !" target="_blank" rel="nofollow">Twitter</a> &bull; <a href="http://delicious.com/post?url=http%3A%2F%2Fweshackett.com%2F2012%2F11%2Fspc046-creating-apps-for-excel-word-and-powerpoint-rolando-jimenez%2F&amp;title=SPC046+%26%238211%3B+Creating+apps+for+Excel%2C+Word+and+PowerPoint+%26%238211%3B+Rolando+Jimenez&amp;notes=Rolando+introduces+the+new+investments+by+Microsoft+for+Apps+for+Office.+This+session+is+a+deep+dive+into+how+to+create+apps+in+Excel%2C+Word+and+PowerPoint." title="Post this on Delicious" target="_blank" rel="nofollow">Delicious</a> &bull; <a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fweshackett.com%2F2012%2F11%2Fspc046-creating-apps-for-excel-word-and-powerpoint-rolando-jimenez%2F&amp;title=SPC046+%26%238211%3B+Creating+apps+for+Excel%2C+Word+and+PowerPoint+%26%238211%3B+Rolando+Jimenez&amp;bodytext=Rolando+introduces+the+new+investments+by+Microsoft+for+Apps+for+Office.+This+session+is+a+deep+dive+into+how+to+create+apps+in+Excel%2C+Word+and+PowerPoint." title="Submit this to Digg" target="_blank" rel="nofollow">Digg</a> &bull; <a href="" title="" target="_blank" rel="nofollow"></a> &bull; <a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fweshackett.com%2F2012%2F11%2Fspc046-creating-apps-for-excel-word-and-powerpoint-rolando-jimenez%2F&amp;title=SPC046+%26%238211%3B+Creating+apps+for+Excel%2C+Word+and+PowerPoint+%26%238211%3B+Rolando+Jimenez" title="Submit this to StumbleUpon" target="_blank" rel="nofollow">StumbleUpon</a> &bull; <a href="http://weshackett.com/2012/11/spc046-creating-apps-for-excel-word-and-powerpoint-rolando-jimenez/" onclick="addBookmark(event);" title="SPC046 &#8211; Creating apps for Excel, Word and PowerPoint &#8211; Rolando Jimenez" target="_blank" rel="nofollow">Add to favorites</a> &bull; <a href="mailto:?subject=SPC046 &#8211; Creating apps for Excel, Word and PowerPoint &#8211; Rolando Jimenez&amp;body=Rolando introduces the new investments by Microsoft for Apps for Office. This session is a deep dive into how to create apps in Excel, Word and PowerPoint. - http://weshackett.com/2012/11/spc046-creating-apps-for-excel-word-and-powerpoint-rolando-jimenez/" title="Email this" target="_blank" rel="nofollow">Email</a> &bull; <a href="http://weshackett.com/feed/rss/" title="Subscribe to RSS" target="_blank" rel="nofollow">RSS</a>
<!-- End WP Socializer - Social Buttons - Output -->
]]></content:encoded>
			<wfw:commentRss>http://weshackett.com/2012/11/spc046-creating-apps-for-excel-word-and-powerpoint-rolando-jimenez/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SPC136 &#8211; JavaScript Best Practices for Developing Apps &#8211; Scot Hillier</title>
		<link>http://weshackett.com/2012/11/spc136-javascript-best-practices-for-developing-apps-scot-hillier/</link>
		<comments>http://weshackett.com/2012/11/spc136-javascript-best-practices-for-developing-apps-scot-hillier/#comments</comments>
		<pubDate>Sun, 25 Nov 2012 08:00:00 +0000</pubDate>
		<dc:creator>Wes Hackett</dc:creator>
				<category><![CDATA[Apps]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Event]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Session Notes]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Sharepoint 2013]]></category>
		<category><![CDATA[SPC12]]></category>
		<category><![CDATA[Patterns]]></category>
		<category><![CDATA[SharePoint 2013]]></category>

		<guid isPermaLink="false">http://weshackett.com/?p=1044</guid>
		<description><![CDATA[Scot Hillier talks about leaving the developers with good solid ideas how to use and structure apps with JavaScript. The session purpose is to teach server side developers how to write JavaScript correctly, helps to introduce patterns to the apps in the new world. JavaScript...]]></description>
			<content:encoded><![CDATA[<p>Scot Hillier talks about leaving the developers with good solid ideas how to use and structure apps with JavaScript. The session purpose is to teach server side developers how to write JavaScript correctly, helps to introduce patterns to the apps in the new world.</p>
<h2>JavaScript best practices</h2>
<p>&#160;</p>
<p><a href="http://hillier.codeplex.com">http://hillier.codeplex.com</a> for the code</p>
<h3>Coding practices</h3>
<p>These are things to do good apps in the new model. It is important to establish these practices to make sure the apps that you build are easy to maintain and understand.</p>
<h3>Strict mode</h3>
<p>Declares using the &quot;use strict&quot; statement either at the top of a library or inside of a a function</p>
<p>Restrictions</p>
<ul>
<li>Can&#8217;t use a variable without declaring it </li>
<li>Can&#8217;t write to read-only property </li>
<li>Can&#8217;t add properties to non-extensible objects </li>
<li>Can&#8217;t illegally delete functions and variables </li>
<li>Can&#8217;t define a property more than once in an object literal </li>
<li>Can&#8217;t use a parameter name more than once in a function </li>
<li>Can&#8217;t use reserved words, eval, or arguments, as names for functions and variables </li>
<li>The value of &#8216;this&#8217; in a function is no longer the window object </li>
<li>Can&#8217;t declare function inside of statements </li>
<li>Can&#8217;t change the members of the &#8216;arguments&#8217; array</li>
</ul>
<h3>Equality operators</h3>
<p>Avoid coercive equality operators</p>
<p>==, != are coercive</p>
<p>===, !== are not coercive</p>
<p>Examples:</p>
<blockquote><p>0 == &#8217;0&#8242;; //True      <br />0 === &#8217;0&#8242;; //False       <br />false == &#8217;0&#8242;; //True       <br />False === &#8217;0&#8242;; //False</p>
</blockquote>
<p>The problem with coercive is they try to work out what you mean, see the example where numeric 0 == text 0 is returned true. When this is not actually equals due to the data type.</p>
<p>This will save a lot of conversion bugs cropping up in code. (especially is C# is your background)</p>
<h3>Encapsulation</h3>
<p><strong>Singleton Pattern</strong> &#8211; The declaration of a literal JavaScript object, which can have functions defined which can be invoked using method syntax.</p>
<p><strong>Module Pattern</strong> &#8211; Self-invoking function &#8216;();&#8217; at the end, the advantage is the public and private members to the object.</p>
<p><strong>Prototype Pattern</strong> -Gives the developer a constructor, typically defining the member variables in the object. Then extend the prototype with the functions. The final element is the use of the &#8216;new&#8217; keyword to create an instance with the prototype extensions.</p>
<p>If you need just one thing of something, then either Singleton or Module pattern are good. If you need a lot of something then the prototype is probably more appropriate. The prototype pattern is also more efficient, it will use the function on the prototype for every instance.</p>
<h3>Promises</h3>
<p>This becomes an important area of focus as a lot of the operations in apps are run asynchronously. </p>
<p>The reality for business apps is that multiple calls are going to be placed. So this is nowhere close to the hello world example of one call and one pair of methods to handle success and fails. This can lead to lots of nested calls. The second call relies on information in the first call, and can&#8217;t be made until it is retrieved.</p>
<p>Basically a &#8216;promise&#8217; makes an async call but immediately returns an object, this object can be held and is the &#8216;promise&#8217;. This object then becomes filled with the data when it is returned. This object can also be held onto beyond the call which provides and interesting option for caching.</p>
<p>Also called &#8216;deferreds&#8217;</p>
<p>Simple async operations</p>
<p>The whole point of these is to avoid lots of spaghetti code.</p>
<p>Basic code pattern:</p>
<blockquote><p>function myPromise() {      <br />&#160;&#160;&#160; var deferred = $.Deferred();       <br />&#160;&#160;&#160; <br />&#160;&#160;&#160; setTimeout(function() {       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; deferred.resolve(&quot;success&quot;);       <br />&#160;&#160;&#160; }, 1000);       <br />&#160;&#160;&#160; <br />&#160;&#160;&#160; Return deferred.promise();       <br />}</p>
<p>myPromise().then(      <br />&#160;&#160;&#160; function(value) {       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; alert(value);       <br />&#160;&#160;&#160; }       <br />&#160;&#160;&#160; function() {       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; alert(&quot;error&quot;);       <br />&#160;&#160;&#160; }       <br />};</p>
</blockquote>
<p>This is a jQuery example</p>
<p>jQuery offers the developer a $.Deferred function</p>
<p>The returned object in the first code block is within the developers method but it returns the jQuery object</p>
<p>The promise object has an implementation in the &#8216;then&#8217; method</p>
<p>This function takes two function as args, the success and failure functions.</p>
<p>You can see from the code the removal for the need to nest calls and code.</p>
<p>So this is the basic approach, to take a deferred object and return it immediately, when things succeed, you call the resolve method of the deferred object. So this object will also hold the data, so there is no need to go back to the data source if the object data is already collected. This could be really useful when you think about people profile objects.</p>
<h3>Demo</h3>
<p>From the &#8216;Remote Endpoint App&#8217;</p>
<p>The example calls one RESTful endpoint for the album info and a second for the album art</p>
<p>Showed how in the app manifest the &#8216;remote&#8217; endpoints were specified. These are cool because they allow the server to make the call to that endpoint for you.</p>
<p>If you are connecting to SP stuff or the SP host web you ask for permissions to do this during installation. Apps in SP are first class principals in SP2013, people authenticate with claims, apps use OAuth</p>
<p>This is one example for making a cross-domain call, when you specify a remote endpoint in the manifest for the app the call is actually made by SharePoint. So it&#8217;s made on the server side, the results are then relayed to the app. This is neat as it means the call is no longer cross domain.</p>
<p>In the musicbrainz.songquery.js file there is an example of calling this declare RESTful endpoint</p>
<p><strong>Note</strong>: If you think you might be calling libraries which might not be using &#8216;use strict&#8217; then put it in your function instead of your library.</p>
<p>To make this call through SP you have to use the &#8216;SP.WebRequestInfo()&#8217;</p>
<p>The code actually making the call to execute the code above is in &#8216;musicbrainz.songviewmodel.js&#8217;</p>
<p>Interesting observation that all the deferred objects are kept in an array</p>
<p>In the load function the code checks to see if the code has already been executed</p>
<p>The code matchs on the artist names in the held promises</p>
<p>If it was found the code sets the active promise to the one found</p>
<p>Be careful to use the &#8216;new&#8217; keyword to make sure that instances are created or the code would go a little bit mental.</p>
<p>It then calls the &#8216;then&#8217; method on the active promise</p>
<p>This block contains both success and fail logic</p>
<p>The patterns are really nice as the endpoint interactions are in a very clean library. This is really focusing this code on just the call, the display logic is factored out away from the data call. Really very well done, as you would in the C# world of MVC or MVVM</p>
<p><strong>Note</strong>: Rob Bouge is building a &#8216;promise&#8217; library over the SP REST calls</p>
<h3>Libraries</h3>
<p>Segregate code into libraries, there is a balance, due to efficiency of download, so maybe some go back together to make them faster to download. </p>
<p><strong>Note</strong>: there is probably something for CKSDev as a feature for this</p>
<p>Minify those libraries so they download a lot faster, there are tools to do this</p>
<p>Consider the use of a CDN, how they get to the end user, a CDN is better for versioning</p>
<p>Load the SP libraries dynamically</p>
<p>Example code:</p>
<blockquote><p>$(document).ready(function () {</p>
<p>hostweburl =      <br />&#160;&#160;&#160; decodeURIComponent(       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; getQueryStringParameter(&quot;SPHostUrl&quot;)       <br />&#160;&#160;&#160; );       <br />&#160;&#160;&#160; <br />appweburl =       <br />&#160;&#160;&#160; decodeURIComponent(       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; getQueryStringParameter(&quot;SPAppWebUrl&quot;)       <br />&#160;&#160;&#160; );       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />var scriptbase = hostweburl + &quot;/_layouts/15/&quot;;       <br />&#160;&#160;&#160; $.getScript(scriptbase + &quot;SP.RequestExecutor.js&quot;, onSuccess);       <br />&#160;&#160;&#160; <br />});</p>
</blockquote>
<p>This is a good technique to get the SP libraries</p>
<h3>Demo</h3>
<p>Code is in &#8216;ContactsApp&#8217;</p>
<p>Note: the App project has a file called _references.js which is used to reference the scripts and get intellisense from the library</p>
<p>So the intellisense comes from this references file but the actual page references the debug versions</p>
<h2>App Best Practices</h2>
<h3>REST</h3>
<p>REST    <br />This is the approach for web services     <br />Uses a URI to completely specify the operation</p>
<p>OData    <br />Maps CRUD operations to HTTP verbs GET, POST, PUT, DELETE, PATCH     <br />Odata is an implementation of RESTful principles</p>
<p>Recommendation is JavaScript against REST and MVVM for on-premises and cloud</p>
<p>Second option is MVC4 and c# client side object model approach for those who don&#8217;t want to learn and write JavaScript. This of course means using provider hosted apps, which are more complicated.</p>
<p>_api replaces _vti_bin/client.svc</p>
<p>Two main ways to make RESTful calls</p>
<p>&#160;&#160;&#160; 1. $.getJSON &#8211; is a simplified way to make a RESTful call, normally one liner and returns a JSON object. This object has the kind of dot properties C# developers will like. This makes much more sense than returning just XML as it doesn&#8217;t require parsing into something useful.    <br />&#160;&#160;&#160; 2. $.ajax &#8211; This is mainly just a longer version of JSON. Note the header is &quot;application/json;odata=verbose&quot; which not all examples will give but is best to use. If you don&#8217;t get this right the server will fail the request.     <br />&#160;&#160;&#160; <br />Basically as a REST programmer the entire focus is on the correct URI for the data</p>
<p><strong>Note</strong>: a cool endpoint to return the viewing user is &#8216;/_api/web/currentuser&#8217;</p>
<h3>Model-View-ViewModel pattern</h3>
<p>Model contains data</p>
<p>View presents the data</p>
<p>ViewModel binds the Model and the View</p>
<p>The purpose is to separate the display from the data collection.</p>
<p>It works really well in JavaScript</p>
<p>The ViewModel fills the Model with data and then sends it to the view for display.</p>
<p>The best way to implement this is to use a third party library</p>
<p>Knockout.js <a href="http://knockoutjs.com">http://knockoutjs.com</a></p>
<p>Features declarative bindings between elements in the code and pages (like old skool data binding) and dependency tracking</p>
<p>Pointed out the cool thing is the &#8216;ko.observableArray()&#8217; which is the data and changes will trigger a page redraw</p>
<h3>App UI guidelines</h3>
<p>App project template &#8211; The VS template will already have some SP feel</p>
<p>WebTemplate &#8211; Apply a template</p>
<p>Chrome control &#8211; If just html page is being used, so use the chrome control</p>
<p>Custom Branding &#8211; Roll your own styling</p>
<h3>Summary</h3>
<p>This session had some useful patterns that can be recognised from some of the server-side patterns used in traditional SP development. The session left a lasting impression about the importance of well structured app JavaScript and what benefits it could bring to the developer.</p>
<h3>Share and Enjoy</h3>

<!-- Start WP Socializer - Social Buttons - Output -->
 &bull; <a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fweshackett.com%2F2012%2F11%2Fspc136-javascript-best-practices-for-developing-apps-scot-hillier%2F&amp;t=SPC136+%26%238211%3B+JavaScript+Best+Practices+for+Developing+Apps+%26%238211%3B+Scot+Hillier" title="Share this on Facebook" target="_blank" rel="nofollow">Facebook</a> &bull; <a href="http://twitter.com/home?status=SPC136 &#8211; JavaScript Best Practices for Developing Apps &#8211; Scot Hillier%20-%20http%3A%2F%2Fweshackett.com%3Fp%3D1044%20" title="Tweet this !" target="_blank" rel="nofollow">Twitter</a> &bull; <a href="http://delicious.com/post?url=http%3A%2F%2Fweshackett.com%2F2012%2F11%2Fspc136-javascript-best-practices-for-developing-apps-scot-hillier%2F&amp;title=SPC136+%26%238211%3B+JavaScript+Best+Practices+for+Developing+Apps+%26%238211%3B+Scot+Hillier&amp;notes=Scot+Hillier+talks+about+leaving+the+developers+with+good+solid+ideas+how+to+use+and+structure+apps+with+JavaScript.+The+session+purpose+is+to+teach+server+side+developers+how+to+write+JavaScript+correctly%2C+helps+to+introduce+patterns+to+the+apps+in+" title="Post this on Delicious" target="_blank" rel="nofollow">Delicious</a> &bull; <a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fweshackett.com%2F2012%2F11%2Fspc136-javascript-best-practices-for-developing-apps-scot-hillier%2F&amp;title=SPC136+%26%238211%3B+JavaScript+Best+Practices+for+Developing+Apps+%26%238211%3B+Scot+Hillier&amp;bodytext=Scot+Hillier+talks+about+leaving+the+developers+with+good+solid+ideas+how+to+use+and+structure+apps+with+JavaScript.+The+session+purpose+is+to+teach+server+side+developers+how+to+write+JavaScript+correctly%2C+helps+to+introduce+patterns+to+the+apps+in+" title="Submit this to Digg" target="_blank" rel="nofollow">Digg</a> &bull; <a href="" title="" target="_blank" rel="nofollow"></a> &bull; <a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fweshackett.com%2F2012%2F11%2Fspc136-javascript-best-practices-for-developing-apps-scot-hillier%2F&amp;title=SPC136+%26%238211%3B+JavaScript+Best+Practices+for+Developing+Apps+%26%238211%3B+Scot+Hillier" title="Submit this to StumbleUpon" target="_blank" rel="nofollow">StumbleUpon</a> &bull; <a href="http://weshackett.com/2012/11/spc136-javascript-best-practices-for-developing-apps-scot-hillier/" onclick="addBookmark(event);" title="SPC136 &#8211; JavaScript Best Practices for Developing Apps &#8211; Scot Hillier" target="_blank" rel="nofollow">Add to favorites</a> &bull; <a href="mailto:?subject=SPC136 &#8211; JavaScript Best Practices for Developing Apps &#8211; Scot Hillier&amp;body=Scot Hillier talks about leaving the developers with good solid ideas how to use and structure apps with JavaScript. The session purpose is to teach server side developers how to write JavaScript correctly, helps to introduce patterns to the apps in  - http://weshackett.com/2012/11/spc136-javascript-best-practices-for-developing-apps-scot-hillier/" title="Email this" target="_blank" rel="nofollow">Email</a> &bull; <a href="http://weshackett.com/feed/rss/" title="Subscribe to RSS" target="_blank" rel="nofollow">RSS</a>
<!-- End WP Socializer - Social Buttons - Output -->
]]></content:encoded>
			<wfw:commentRss>http://weshackett.com/2012/11/spc136-javascript-best-practices-for-developing-apps-scot-hillier/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SPC005 &#8211; A Primer in HTML5 and JavaScript &#8211; Scot Hillier</title>
		<link>http://weshackett.com/2012/11/spc005-a-primer-in-html5-and-javascript-scot-hillier/</link>
		<comments>http://weshackett.com/2012/11/spc005-a-primer-in-html5-and-javascript-scot-hillier/#comments</comments>
		<pubDate>Fri, 23 Nov 2012 08:00:00 +0000</pubDate>
		<dc:creator>Wes Hackett</dc:creator>
				<category><![CDATA[Apps]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Event]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Session Notes]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Sharepoint 2013]]></category>
		<category><![CDATA[SPC12]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[SessionNotes]]></category>
		<category><![CDATA[SharePoint2013]]></category>

		<guid isPermaLink="false">http://weshackett.com/?p=1019</guid>
		<description><![CDATA[Scot Hillier talks about the massive investment that SharePoint developers have made learning the server object model and how with the new ‘apps’ being mainly client side technology brings the need for fast paced upskilling. The session purpose is to teach server side developers how to write JavaScript correctly, helps to introduce patterns to the apps in the new world.]]></description>
			<content:encoded><![CDATA[<p>Scot Hillier talks about the massive investment that SharePoint developers have made learning the server object model and how with the new ‘apps’ being mainly client side technology brings the need for fast paced upskilling.</p>
<p>Session purpose is to teach server side developers how to write JavaScript correctly, helps to introduce patterns to the apps in the new world.</p>
<p><strong>JavaScript is now a CORE development skill for SP</strong></p>
<p>Code from from all Scot’s sessions is at <a href="http://hillier.codeplex.com" target="_blank">http://hillier.codeplex.com</a></p>
<h2>JavaScript</h2>
<h3>Basics</h3>
<p>Arguments are passed in arguments[], meaning you don’t need to match the function signature like in c#</p>
<p>JavaScript is object based, this is good in fact as it allows patterns of implementation that make us comfortable in the way we structure code</p>
<p>JavaScript Functions are objects too, this is a <strong>VERY IMPORTANT</strong> concept</p>
<p>JavaScript is case sensitive</p>
<p>Semi colons are optional but should be used</p>
<p>Variables are only created using the var keyword</p>
<h3>Global namespace</h3>
<p>This is where all the bad stuff begins when JS starts to be written</p>
<p>For SP developers the global namespace is in the &#8216;window&#8217; object of the DOM</p>
<p>This matters as any variable declared outside the functions are declared into this namespace, this means you are putting something onto the window object.</p>
<p>Any variables defined without the var keyword are also in the global namespace, this is bad if you forget &#8216;var&#8217; in a function it will end up in the global namespace</p>
<p>This WILL bite you because of name collisions</p>
<h4>Technique</h4>
<ul>
<li> Use our own namespaces</li>
<li>Always use strict mode, this puts a lot of restrictions onto the JS code. He describes it as a &#8216;better&#8217; version of JS</li>
</ul>
<h3>Custom namespaces</h3>
<p>JS doesn’t have the idea of namespaces like c# does</p>
<p>The technique to do it is to create just one variable into the namespace</p>
<blockquote><p>Window.Wingtip = window.Wingtip || {};</p></blockquote>
<p>Basically either checks for an existing object or creates a new one for you<br />
This would be an empty object</p>
<p>This is really good as you now have a &#8216;big&#8217; container bound to the global namespace where you can avoid clashing with other namespaces</p>
<p>You can nest namespaces by adding others to the existing for example</p>
<blockquote><p>Window.Wingtip.Singleton = window.Wingtip.Singleton || {};</p></blockquote>
<p>Objects are just key value pairs</p>
<p>You can then also create an instance of an object and use the value as a function for example</p>
<blockquote><p>Wingtip.Singleton.Customer = {<br />
Name: &#8220;Brian Cox&#8221;,<br />
Speak: function () { alert(&#8220;my name is &#8221; + this.name); }<br />
}</p></blockquote>
<p>This code has created the object with name and speak, where speak is a function</p>
<p>This allows a call like this</p>
<blockquote><p>Wingtip.Singleton.Customer.speak();</p></blockquote>
<p>Which would fire the alert</p>
<h4>Goal</h4>
<ul>
<li>To write clean JavaScript inside of namespaces</li>
</ul>
<h3>Functions</h3>
<p>Functions are objects</p>
<p>They can be stored in variables, objects and even arrays</p>
<p>They can be invoked directly</p>
<p>There are 4 ways to call a function:</p>
<ol>
<li>Function pattern</li>
<li>Method pattern</li>
<li>Constructor pattern</li>
<li>Apply pattern</li>
</ol>
<p>These lend themselves to pattern development</p>
<p>Functions have a &#8216;this&#8217;, just like c# what &#8216;this&#8217; points to is really important in the code</p>
<h3>Function Pattern</h3>
<p>This is the most common and worst way to invoke a function</p>
<blockquote><p>function add(x, y) {<br />
If(this===window)<br />
Alert(&#8220;this is bound to the window, why???&#8221;);<br />
return x+y;<br />
}</p>
<p>Var sum = add(5, 6);</p></blockquote>
<p>The reason this is so bad is that it is defined in the global namespace, which means the dev has to hope no-one else also has an &#8216;add&#8217; function</p>
<p>The last guy to define wins</p>
<h3>Method Pattern</h3>
<p>We saw this above</p>
<blockquote><p>Wingtip.Singleton.Customer = {<br />
Name: &#8220;Brian Cox&#8221;,<br />
Speak: function () { alert(&#8220;my name is &#8221; + this.name); }<br />
}</p>
<p>Wingtip.Singleton.Customer.speak();</p></blockquote>
<p>When a function is contained within an object we can invoke it like a method</p>
<p>Even if the developer only uses this pattern you would be light-years ahead technique wise to the Function Pattern approach developers</p>
<h3>Constructor Pattern</h3>
<blockquote><p>var Customer = function (name) {<br />
this.fullName = name;<br />
};</p>
<p>Customer.prototype.speak = function () {<br />
Alert(&#8220;my name is &#8221; + this.fullName);<br />
};</p>
<p>var customer = new Customer(&#8220;Brian Cox&#8221;);<br />
customer.speak();</p></blockquote>
<p>JS objects can have prototypes, these define what the object will have<br />
These are kind of like a c# constructor</p>
<p>The first section is just defining the function as a variable</p>
<p>Function object has an underlying object prototype</p>
<p>The second section is adding a new member to the underlying prototype members (like extending it)</p>
<p>The two &#8216;this&#8217; lines refer to the first object instance of Customer</p>
<p>So you basically start by defining the constructor to create an instance of the object. The first section. Then extend it with members against the prototype. The second section. And finally you can get to call it <img src='http://weshackett.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  using the &#8216;new&#8217; keyword</p>
<p>So it gets passed the name, then calls &#8216;speak&#8217;</p>
<p>This is an interesting pattern as it is pseudo OO</p>
<p>Some people have the opinion that this pattern misleads because it pretends to be OO</p>
<h3>Apply Pattern</h3>
<blockquote><p>var Customer = function (name) {<br />
this.firstName = fn;<br />
this.lastName = ln;<br />
};</p>
<p>Customer.prototype.speak = function() {<br />
Alert(&#8220;My name is &#8221; + this.firstName + &#8221; &#8221; + this.lastName);<br />
};</p>
<p>var nameObject = {<br />
firstName: &#8220;Brian&#8221;,<br />
lastName: &#8220;Cox&#8221;<br />
}</p>
<p>var customer = Customer.prototype.speak.apply(nameObject);</p></blockquote>
<p>The apply pattern is the opposite of the method pattern</p>
<p>So the key difference is that the constructor is only the variable members, the prototype is then extended with the functions</p>
<p>Then a var object is created with the contents required for the &#8216;constructor&#8217; params in the first section.<br />
The apply then applies the object to method</p>
<p>This is not used all that often</p>
<h3>Closures</h3>
<h4>Key concept</h4>
<p>A closure is a concept of nesting functions… the inner function can access the variables of outer functions</p>
<p>If the inner function has a longer lifetime than the outer function, the variables they access are still in scope<br />
This is explained in the Module Pattern notes</p>
<h3>Module Pattern</h3>
<blockquote><p>window.Wingtip = window.Wingtip || {};<br />
Wingtip.Module = Wingtip.Module || {};</p>
<p>Wingtip.Module.Customer = function () {</p>
<p>//Private members<br />
var name,<br />
setName = function (n) {name = n;},<br />
getName = function () {return name;},<br />
talk = function () {alert (&#8220;My name is &#8221; + name); };</p>
<p>//public interface<br />
return {<br />
set_name: setName,<br />
get_name: getName,<br />
speak: talk<br />
}<br />
}();</p></blockquote>
<p>The last line is important as the &#8216;();&#8217; means it becomes a self invoking function</p>
<p>So if you ignored the content of the Customer function for a moment, what is the function equal too? Well it becomes equal to the return value of the function</p>
<p>So in the code sample the code returns the literal object under the comment //public interface which is the three member function objects defined under the private members comment</p>
<p>This means that the return is basically returning the inner functions as a return value of the outer function</p>
<p>You return the inner functions so the outer function is no longer in scope. Therefore the pointers for the inner functions are still in scope</p>
<p>This means you could still call &#8216;talk&#8217; and it would run</p>
<p>This is one of the most common patterns and you will see it over and over again</p>
<p>What is cool about it is like treating it like a class.</p>
<p>So you can define all the pseudo class members as private variables</p>
<p>The only ones that become public to the calling object are the ones you choose to return via the return object</p>
<p>So now you can introduce the idea of hidden private code</p>
<p>So you can see in the example that although name is defined it is not returned so no-one can touch name so they have to call the get and set functions. This is a really good way to make your code more reusable</p>
<h3>Demo</h3>
<h4>Takeaways</h4>
<p>Opinion that even on-premises the SharePoint hosted app is the easiest as the other option of provider hosted adds complexity of setting up the other infrastructure like the IIS, load balancing etc</p>
<p>A SharePoint app is an ALL JS thing</p>
<p>His first demo was a singleton pattern to read back the web membership information<br />
This is a useful pattern when performing RESTful calls as you don’t really need instances of this object</p>
<p>He&#8217;s been using jQuery but didn&#8217;t explain it during the session.</p>
<p>Two things it does really well</p>
<p>1. Allows selection of things in the DOM<br />
2. Allows actions to be performed upon them</p>
<p>Both actions with far less code than if you wrote the code directly to modify the DOM</p>
<p>Developers will use the $.ajax calls to make the RESTful calls</p>
<h4>Singleton Pattern</h4>
<p>The pattern used has the following:</p>
<p>Init function<br />
1. Which takes a parameter &#8216;element&#8217; which is basically the jQuery element where the results should be shown<br />
2. Sets the url of the RESTful endpoint (the _api bits)</p>
<p>Note: the _spPageContextInfo is an object which has been part of SP for several versions and is injected into the page by sharePoint. In the example the webAbsoluteUrl is used</p>
<p>Load function<br />
1. Use the jQuery ajax $.ajax<br />
2. As the call is async you have to provide both success and failure functions</p>
<p>onSuccess function puts together the HTML table of the results<br />
onError function shows the error message</p>
<p>Note: the &#8220;use strict&#8221;; at the top makes this file strict</p>
<p>This whole logic is invoked at document.ready so the DOM is ready</p>
<h4>Module Pattern with self-invoking function</h4>
<p>Demo&#8217;d the }(); being the giveaway that it is a self-invoking function</p>
<p>The logic contained create/update/remove functions from the public return</p>
<p>Pointed out that the pattern will remain constant it’s the list that is changed per use, even applies to other things like the search endpoint.</p>
<p>Important: Made a big deal about taking this code from the CodePlex examples to make sure as a dev you can ramp up super quickly.</p>
<h2>HTML5</h2>
<p>&nbsp;</p>
<p>The major browsers all now support HTML5 or at least the vast majority of things available to the developer.</p>
<p>Note: Strong belief that the bias should be towards HTML5 with some concerns to lesser experiences</p>
<p>What people mean when they say HTML5</p>
<ol>
<li>Combination of new tags in HTML</li>
<li>Combination of new styling in CSS3</li>
<li>New JavaScript functionality like geo-location</li>
</ol>
<h3>Semantic markup</h3>
<p>This introduces a bunch of new tags, that are trying to specify the semantics of parts of the page</p>
<blockquote><p>&lt;nav&gt; (where you would put your navigation)<br />
&lt;article&gt; (could be the stuff you want to syndicate for RSS as an example)<br />
&lt;header&gt; (the header)<br />
&lt;section&gt;<br />
&lt;aside&gt; (used for sidebars)<br />
&lt;figure&gt;&lt;figcaption&gt;<br />
&lt;summary&gt; (summaries for sections)<br />
&lt;footer&gt; (the footer)</p></blockquote>
<p>This semantic mark-up is orientated towards the publishing types of information being presented on the page.</p>
<p>If you start to use the semantic mark-up it will make it easier for a search engine to understand the page.</p>
<h3>Forms</h3>
<p>HTML5 brings lots of new capabilities for forms</p>
<p>Types</p>
<ol>
<li>Color</li>
<li>Date</li>
<li>Date Time</li>
<li>Email</li>
<li>Month</li>
<li>Number</li>
<li>Range</li>
<li>Search</li>
<li>Telephone</li>
<li>Time</li>
<li>URL</li>
<li>Week</li>
</ol>
<p>Attributes</p>
<ol>
<li>Autocomplete</li>
<li>Autofocus</li>
<li>List</li>
<li>Max</li>
<li>Min</li>
<li>Step</li>
<li>Multiple</li>
<li>Pattern</li>
<li>Placeholder</li>
<li>Required</li>
</ol>
<p>These add new input types instead of just the plain old textbox.</p>
<h3>Demo</h3>
<p>Shows the new form mark-up and functionality</p>
<p>Code is in the &#8216;ContactsApp&#8217;</p>
<p>Pointed out in HTML5 that forms are ok inside layout tables, wasn&#8217;t sure if this was a sarcastic comment or reality.</p>
<h3>Multimedia and Graphics</h3>
<p>Multimedia for Audio and Video</p>
<p>Graphics for Canvas and Scalable Vector Graphics</p>
<h3>Demo</h3>
<p>Code is &#8216;Paint&#8217; which demos the canvas app</p>
<p>Shows a load of the cool things that a canvas can do</p>
<h3>Data and Functionality</h3>
<p>Data</p>
<ol>
<li>Application cache &#8211; provides a cache in the JavaScript app</li>
<li>Indexed DB &#8211; provides a mini database the JavaScript app can use</li>
<li>Local storage &#8211; provides a persistent form of storage</li>
<li>Session storage &#8211; provides local storage just for the session</li>
</ol>
<p>Functionality</p>
<ol>
<li>Drag and drop</li>
<li>Geolocation &#8211; provides the browsers location for use in the app</li>
<li>History &#8211; provides access to the browser history properly</li>
<li>Web workers &#8211; allows spawn of new thread in javascript, and execute a library on it</li>
<li>Post Message &#8211; allows the sending of a message from the hosting web page into an iFrame or from an iFrame into a host page. SharePoint relies on this very heavily. This is how the app part model works.</li>
<li>Web sockets &#8211; allows socket communications from apps</li>
</ol>
<h3>Demo</h3>
<p>Geolocation and weather</p>
<p>Code is &#8216;WeatherBug&#8217;</p>
<p>Code shows a good example of how this geolocation should be used.</p>
<h2>CSS3</h2>
<p>&nbsp;</p>
<p>A whistle stop tour of CSS3</p>
<h3>Backgrounds and Borders</h3>
<p>Loads of new styling capabilities</p>
<p>Backgrounds</p>
<ol>
<li>Background size</li>
<li>Multiple backgrounds</li>
</ol>
<p>Borders</p>
<ol>
<li>Border image</li>
<li>Border radius</li>
<li>Box shadow</li>
<li>Text shadow</li>
</ol>
<p>Graphics</p>
<ol>
<li>Animations</li>
<li>Gradients</li>
<li>Reflections</li>
<li>Transforms</li>
</ol>
<h3>Demo</h3>
<p>Showed an example of browser detection to make sure that you can cater correctly</p>
<p>Code is &#8216;DetectCapabilitiesApp&#8217;</p>
<p>Uses &#8216;Modernizr&#8217; script library<br />
(www.modernizr.com)</p>
<p>The &#8216;Detect Capabilities App&#8217; shown has a display for the current browser which returns the results of each capability check from Modernizr.</p>
<h2>Summary</h2>
<p>&nbsp;</p>
<p>I found the session really useful. As someone who has spent the last five or more years mastering the serverside object model and SharePoint an introduction like this was really helpful.</p>
<h3>Share and Enjoy</h3>

<!-- Start WP Socializer - Social Buttons - Output -->
 &bull; <a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fweshackett.com%2F2012%2F11%2Fspc005-a-primer-in-html5-and-javascript-scot-hillier%2F&amp;t=SPC005+%26%238211%3B+A+Primer+in+HTML5+and+JavaScript+%26%238211%3B+Scot+Hillier" title="Share this on Facebook" target="_blank" rel="nofollow">Facebook</a> &bull; <a href="http://twitter.com/home?status=SPC005 &#8211; A Primer in HTML5 and JavaScript &#8211; Scot Hillier%20-%20http%3A%2F%2Fweshackett.com%3Fp%3D1019%20" title="Tweet this !" target="_blank" rel="nofollow">Twitter</a> &bull; <a href="http://delicious.com/post?url=http%3A%2F%2Fweshackett.com%2F2012%2F11%2Fspc005-a-primer-in-html5-and-javascript-scot-hillier%2F&amp;title=SPC005+%26%238211%3B+A+Primer+in+HTML5+and+JavaScript+%26%238211%3B+Scot+Hillier&amp;notes=Scot+Hillier+talks+about+the+massive+investment+that+SharePoint+developers+have+made+learning+the+server+object+model+and+how+with+the+new+%E2%80%98apps%E2%80%99+being+mainly+client+side+technology+brings+the+need+for+fast+paced+upskilling.+The+session+purpose+is+to+teach+server+side+developers+how+to+write+JavaScript+correctly%2C+helps+to+introduce+patterns+to+the+apps+in+the+new+world." title="Post this on Delicious" target="_blank" rel="nofollow">Delicious</a> &bull; <a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fweshackett.com%2F2012%2F11%2Fspc005-a-primer-in-html5-and-javascript-scot-hillier%2F&amp;title=SPC005+%26%238211%3B+A+Primer+in+HTML5+and+JavaScript+%26%238211%3B+Scot+Hillier&amp;bodytext=Scot+Hillier+talks+about+the+massive+investment+that+SharePoint+developers+have+made+learning+the+server+object+model+and+how+with+the+new+%E2%80%98apps%E2%80%99+being+mainly+client+side+technology+brings+the+need+for+fast+paced+upskilling.+The+session+purpose+is+to+teach+server+side+developers+how+to+write+JavaScript+correctly%2C+helps+to+introduce+patterns+to+the+apps+in+the+new+world." title="Submit this to Digg" target="_blank" rel="nofollow">Digg</a> &bull; <a href="" title="" target="_blank" rel="nofollow"></a> &bull; <a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fweshackett.com%2F2012%2F11%2Fspc005-a-primer-in-html5-and-javascript-scot-hillier%2F&amp;title=SPC005+%26%238211%3B+A+Primer+in+HTML5+and+JavaScript+%26%238211%3B+Scot+Hillier" title="Submit this to StumbleUpon" target="_blank" rel="nofollow">StumbleUpon</a> &bull; <a href="http://weshackett.com/2012/11/spc005-a-primer-in-html5-and-javascript-scot-hillier/" onclick="addBookmark(event);" title="SPC005 &#8211; A Primer in HTML5 and JavaScript &#8211; Scot Hillier" target="_blank" rel="nofollow">Add to favorites</a> &bull; <a href="mailto:?subject=SPC005 &#8211; A Primer in HTML5 and JavaScript &#8211; Scot Hillier&amp;body=Scot Hillier talks about the massive investment that SharePoint developers have made learning the server object model and how with the new ‘apps’ being mainly client side technology brings the need for fast paced upskilling. The session purpose is to teach server side developers how to write JavaScript correctly, helps to introduce patterns to the apps in the new world. - http://weshackett.com/2012/11/spc005-a-primer-in-html5-and-javascript-scot-hillier/" title="Email this" target="_blank" rel="nofollow">Email</a> &bull; <a href="http://weshackett.com/feed/rss/" title="Subscribe to RSS" target="_blank" rel="nofollow">RSS</a>
<!-- End WP Socializer - Social Buttons - Output -->
]]></content:encoded>
			<wfw:commentRss>http://weshackett.com/2012/11/spc005-a-primer-in-html5-and-javascript-scot-hillier/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
