<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title></title>
		<description>Stylish Jekyll Theme</description>
		<link>/</link>
		<atom:link href="/feed.xml" rel="self" type="application/rss+xml" />
		
			<item>
				<title>Application Navigation with the New Angular 2 Router</title>
				<description>&lt;p&gt;We are building an application on Angular 2. We’ve beeing working with Angular 2 
since Beta 8. Recently we have made the upgrade from RC1 to RC3. In this upgrade, 
it seems as if the &lt;a href=&quot;https://angular.io/docs/ts/latest/guide/router.html&quot;&gt;official Angular 2 docs have been updated&lt;/a&gt;
to reflect usage of the ‘new’ router. Note the big disclaimer at the top.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;blockquote&gt;
    &lt;p&gt;The Component Router is in alpha release. This is the recommended Angular 2 router 
and supersedes the earlier deprecated beta and v2 routers.&lt;/p&gt;
  &lt;/blockquote&gt;
&lt;/blockquote&gt;

&lt;p&gt;There is also a great article on &lt;a href=&quot;http://thoughtram.io&quot;&gt;thoughtram.io&lt;/a&gt;, 
&lt;a href=&quot;http://blog.thoughtram.io/angular/2016/06/14/routing-in-angular-2-revisited.html&quot;&gt;Routing in Angular 2 Revisited&lt;/a&gt;, 
written by &lt;a href=&quot;http://twitter.com/pascalprecht&quot;&gt;Pascal Precht&lt;/a&gt;, which does a great job 
outlining the new features of the new router.&lt;/p&gt;

&lt;h2 id=&quot;out-with-the-old-in-with-the-new&quot;&gt;Out with the old, In with the new&lt;/h2&gt;

&lt;p&gt;Managing the way our application handles navigation has been somewhat static to date.
Mostly a navigation component with static &lt;code class=&quot;highlighter-rouge&quot;&gt;routeLinks&lt;/code&gt; littered throughout. We have 
always wanted to make this component a bit more dynamic. But, our investigations with 
the “old” router, always led us into complex solutions.&lt;/p&gt;

&lt;p&gt;So, with the news, we decided to take the “new” router for a spin to see if we can’t 
more simply solve some of our navigation issues, with something more native and simple.&lt;/p&gt;

&lt;p&gt;If you are interested, the entire example is &lt;a href=&quot;http://plnkr.co/edit/lomzsQ?p=preview&quot;&gt;available here&lt;/a&gt;. 
This example is forked from &lt;a href=&quot;http://twitter.com/pascalprecht&quot;&gt;Pascal Precht&lt;/a&gt; example mentioned earlier.&lt;/p&gt;

&lt;h2 id=&quot;gettings-things-setup&quot;&gt;Gettings things setup&lt;/h2&gt;

&lt;p&gt;One of the most interesting things you’ll find with the new router is that you can 
use a plain &lt;code class=&quot;highlighter-rouge&quot;&gt;&amp;lt;any&amp;gt;[]&lt;/code&gt;. TypeScript will cast it to the correct &lt;code class=&quot;highlighter-rouge&quot;&gt;RouterConfig&lt;/code&gt; type. 
Which boils down to an interface array of type &lt;code class=&quot;highlighter-rouge&quot;&gt;Route&lt;/code&gt;. All of fields are marked 
nullable, which makes this very simple to configure.&lt;/p&gt;

&lt;p&gt;Because this is an interface we can provide members that are not part of the &lt;code class=&quot;highlighter-rouge&quot;&gt;Route&lt;/code&gt; 
type and the router won’t get upset. This is super cool because now we can tie 
information that is relevant to the route, directly to the route config itself.&lt;/p&gt;

&lt;script src=&quot;https://gist.github.com/d2154bbd34a416642767c00f085442a5.js?file=app-routes.ts&quot;&gt; &lt;/script&gt;

&lt;p&gt;As you can see in my example, we’ve attached members &lt;code class=&quot;highlighter-rouge&quot;&gt;name, description, showInNav&lt;/code&gt; which 
are not required by the router. In order to feed this into the router, you’ll need to use 
the &lt;code class=&quot;highlighter-rouge&quot;&gt;providerRouter()&lt;/code&gt; and send the result into the providers array on your bootstrapper.&lt;/p&gt;

&lt;script src=&quot;https://gist.github.com/d2154bbd34a416642767c00f085442a5.js?file=main.ts&quot;&gt; &lt;/script&gt;

&lt;p&gt;Viola! That’s pretty much all you’ll need to get things going.&lt;/p&gt;

&lt;h2 id=&quot;generating-some-navigation&quot;&gt;Generating some navigation&lt;/h2&gt;

&lt;p&gt;Now that the router is all wired up you can go upon your normal business using &lt;code class=&quot;highlighter-rouge&quot;&gt;routerLink&lt;/code&gt; 
very similarly to how you used to. But, since this information is stored in an &lt;code class=&quot;highlighter-rouge&quot;&gt;&amp;lt;any&amp;gt;[]&lt;/code&gt; 
why not use it as a data source for your navigation.&lt;/p&gt;

&lt;script src=&quot;https://gist.github.com/d2154bbd34a416642767c00f085442a5.js?file=nav.component.ts&quot;&gt; &lt;/script&gt;

&lt;p&gt;As you can see it’s fairly straight-forward to use the same &lt;code class=&quot;highlighter-rouge&quot;&gt;RouterConfig&lt;/code&gt; supplied to
the router for consumption elsewhere. Now you could have done this before, however,
it required you to reflect data out of the &lt;code class=&quot;highlighter-rouge&quot;&gt;@RouteConfig&lt;/code&gt; metadata. The new router makes 
this very much less painful.&lt;/p&gt;

&lt;h2 id=&quot;just-for-kicks&quot;&gt;Just for kicks&lt;/h2&gt;

&lt;p&gt;Just for kicks, I wanted to exercise again, how cool it is to have this data readily 
available. We wanted the application header to respond to route events. Allowing us to 
create a consistent, and generic application header.&lt;/p&gt;

&lt;script src=&quot;https://gist.github.com/d2154bbd34a416642767c00f085442a5.js?file=header.component.ts&quot;&gt; &lt;/script&gt;

&lt;p&gt;What we’ve done here was have our &lt;code class=&quot;highlighter-rouge&quot;&gt;HeaderComponent&lt;/code&gt; subscribe to the events being 
emitted by the router. There are several types of events, but, we only care about 
the &lt;code class=&quot;highlighter-rouge&quot;&gt;RoutesRecognized&lt;/code&gt; events. Simply filter them out and subscribe. When the &lt;code class=&quot;highlighter-rouge&quot;&gt;RoutesRecognized&lt;/code&gt; 
events fire off, the &lt;code class=&quot;highlighter-rouge&quot;&gt;HeaderComponent&lt;/code&gt; will retrieve the &lt;code class=&quot;highlighter-rouge&quot;&gt;Route.path&lt;/code&gt; and find a 
match in our &lt;code class=&quot;highlighter-rouge&quot;&gt;AppRoutes&lt;/code&gt; constant, and assign the result to the &lt;code class=&quot;highlighter-rouge&quot;&gt;routeData&lt;/code&gt; member.&lt;/p&gt;

&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;We are very much impressed with how easy and flexible the new Angular 2 Router is. 
It allows for a bunch of new scenarios natively, without having to resort to “workarounds” 
or “hacks” to get the desired behavior.&lt;/p&gt;

&lt;p&gt;If you are interested, the entire example is &lt;a href=&quot;http://plnkr.co/edit/lomzsQ?p=preview&quot;&gt;available here&lt;/a&gt;. 
This example is forked from &lt;a href=&quot;http://twitter.com/pascalprecht&quot;&gt;Pascal Precht&lt;/a&gt; example mentioned earlier.&lt;/p&gt;
</description>
				<pubDate>Fri, 24 Jun 2016 00:00:00 +0000</pubDate>
				<link>/blog/2016/06/24/application-navigation-with-the-new-angular-2-router/</link>
				<guid isPermaLink="true">/blog/2016/06/24/application-navigation-with-the-new-angular-2-router/</guid>
			</item>
		
			<item>
				<title>9 SharePoint Development Blogs You Should Follow</title>
				<description>&lt;p&gt;I am always mentioning, to various colleagues and customers, the SharePoint Development blogs that I follow. Below, in no specific order, is the list of blogs that I am following:&lt;/p&gt;

&lt;p&gt;###Jeremy Thake’s musings###
&lt;a href=&quot;http://www.jeremythake.com/&quot;&gt;http://www.jeremythake.com/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Jeremy Thake is a Senior Product Marketing Manager at Microsoft focusing on Office 365 developer platform. Lots of great information on transitioning developers to the App Model.&lt;/p&gt;

&lt;p&gt;###Richard diZeregas Blog###
&lt;a href=&quot;http://blogs.msdn.com/b/richard_dizeregas_blog/&quot;&gt;http://blogs.msdn.com/b/richard_dizeregas_blog/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Richard diZeregas is a Solution Architect at Microsoft. His blog has a lot of detailed information regarding custom development in SharePoint, Yammer and Office 365.&lt;/p&gt;

&lt;p&gt;###Share-n-dipity###
&lt;a href=&quot;http://blogs.technet.com/b/speschka/&quot;&gt;http://blogs.technet.com/b/speschka/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Steve Peschka works for Microsoft. Not exactly sure of his responsibility but he has some of the greatest posts in regards to developing against Office 365, Azure and Yammer. I would even say that some of his posts are the point of authority when it comes to App authentication/authorization.&lt;/p&gt;

&lt;p&gt;###Wictor Wilen’s Blog###
&lt;a href=&quot;http://www.wictorwilen.se/&quot;&gt;http://www.wictorwilen.se/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Wictor Wilen is a Director, MCA, MCSM, MCM and a Microsoft MVP working at Connecta AB. Posts are primarily focused around SharePoint AppModel and Windows Azure from more of the guy on the ground perspective.&lt;/p&gt;

&lt;p&gt;###Vesa “vesku” Juvonen###
&lt;a href=&quot;http://blogs.msdn.com/b/vesku/&quot;&gt;http://blogs.msdn.com/b/vesku/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Vesa is a Principal Consultant at Microsoft focusing on SharePoint. Posts are very developer oriented, with lots of details surrounding making the jump to the Cloud App Model.&lt;/p&gt;

&lt;p&gt;###The Nuts and Bolts of SharePoint###
&lt;a href=&quot;http://www.sharepointnutsandbolts.com/&quot;&gt;http://www.sharepointnutsandbolts.com/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Chris O’Brien is an independent SharePoint/.Net consultant in London, UK. Posts are developer focused with lots of code samples. Also, Chris write frequently on Continuous Integration as it relates to SharePoint solutions.&lt;/p&gt;

&lt;p&gt;###Office Blog###
&lt;a href=&quot;http://blogs.office.com/&quot;&gt;http://blogs.office.com/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Office product blog is actually really good source for information. Jeremy Thake runs an Office 365 Developer Postcast that gets syndicated in the feed, which has been pretty good.&lt;/p&gt;

&lt;p&gt;###SharePoint Community###
&lt;a href=&quot;http://sharepoint-community.net/&quot;&gt;http://sharepoint-community.net/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Open community of SharePoint professionals. Great place for reading what others are doing in the field.&lt;/p&gt;

&lt;p&gt;###SharePoint Stack Exchange###
&lt;a href=&quot;http://sharepoint.stackexchange.com/&quot;&gt;http://sharepoint.stackexchange.com/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Q/A Stack Exchange site geared specifically at SharePoint. Some overlap with StackOverflow.com&lt;/p&gt;
</description>
				<pubDate>Fri, 03 Oct 2014 00:00:00 +0000</pubDate>
				<link>/blog/2014/10/03/9-sharepoint-development-blogs-you-should-follow/</link>
				<guid isPermaLink="true">/blog/2014/10/03/9-sharepoint-development-blogs-you-should-follow/</guid>
			</item>
		
			<item>
				<title>Office 365 Roadmap - It’s Finally Here!</title>
				<description>&lt;p&gt;I’ve had a couple of Office 365 engagements, where I am explaining current functionality of Office 365 and build expectations around the feature set. All so that Microsoft can make a fool of me and make an update to their service.&lt;/p&gt;

&lt;p&gt;We’ve sat in partner advisory councils and explained that it’s difficult to assist in growing the O365 space, as a partner, when we have no in roads to the road map of the service updates. Likely others, have similar frustrations surrounding feature releases to Office 365.&lt;/p&gt;

&lt;p&gt;Microsoft has finally heard us and has released an &lt;a href=&quot;http://bit.ly/1irNTrG&quot;&gt;Office 365 Roadmap&lt;/a&gt;, that will keep updated details surrounding feature releases. We finally have visibility to Microsoft’s aggressive update schedule. Thanks Office 365 Team!&lt;/p&gt;
</description>
				<pubDate>Fri, 20 Jun 2014 00:00:00 +0000</pubDate>
				<link>/blog/2014/06/20/Office-365-Roadmap-Its-Finally-Here/</link>
				<guid isPermaLink="true">/blog/2014/06/20/Office-365-Roadmap-Its-Finally-Here/</guid>
			</item>
		
			<item>
				<title>A C# developer's take on F# - Discovery to Production</title>
				<description>&lt;p&gt;I had done some discovery around F# back when it first came out. At that point it didn’t seem like a viable option for end to end application development. I knew then, that F# was very powerful language but didn’t quite seem ready for primetime. Today however, is a different story.&lt;/p&gt;

&lt;p&gt;I recently, I grew excited of F# after I read &lt;a href=&quot;http://bit.ly/NfwLHK&quot;&gt;Why F#&lt;/a&gt; written by Scott Wlaschin (&lt;a href=&quot;https://twitter.com/ScottWlaschin&quot;&gt;@ScottWlaschin&lt;/a&gt;). Looking at these points made me very interested in investigating further. Here Wlaschin says I can be more concise, write fewer lines of code and have fun. How could I not investigate further.&lt;/p&gt;

&lt;p&gt;One of my first questions was; can I do all of the things I could in C#? Scott Wlaschin runs another site &lt;a href=&quot;http://fsharpforfunandprofit.com/&quot;&gt;F# for fun and profit&lt;/a&gt; in which he posts another great article &lt;a href=&quot;http://fsharpforfunandprofit.com/posts/completeness-anything-csharp-can-do/&quot;&gt;Anything C# can do…&lt;/a&gt; Okay great! Now can I interop with .NET seamlessly? He’s got &lt;a href=&quot;http://fsharpforfunandprofit.com/posts/completeness-seamless-dotnet-interop/&quot;&gt;another article&lt;/a&gt; addressing this too. Well cheers to Scott Wlaschin for putting this information together. Because, now he’s piqued my interest.&lt;/p&gt;

&lt;p&gt;I spent the next 3 days re-acclimating myself to the F# language. All the while thinking about how to apply F# to my day to day development needs. The following is a disjointed explanation of my current process and how I believe F# really hits home for me.&lt;/p&gt;

&lt;h2 id=&quot;lazy-bones&quot;&gt;Lazy bones&lt;/h2&gt;
&lt;p&gt;I’m lazy. I’ve been a developer for the past 15 years. I’ve grown tired of typing code for the sake of writing code (&lt;a href=&quot;http://www.youtube.com/watch?v=zGxwbhkDjZM&quot;&gt;Ain’t Nobody Got Time for That&lt;/a&gt;); record types (POCO), boilerplate, intermediate types, overloads, etc. I’ve taken advantage of any means possible for not having to write “boring” code (if you haven’t done this already the &lt;code class=&quot;highlighter-rouge&quot;&gt;Edit | Paste Special | Paste JSON/XML As Classes&lt;/code&gt;	 menu in Visual Studio 2012/2013 is an amazing time saver). Writing all this work just to finally get to writing the “cool stuff”.&lt;/p&gt;

&lt;p&gt;Some of the things I have done recently to avoid writing a long C# code-base to discover an approach, is to start with a &lt;a href=&quot;http://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop&quot;&gt;REPL approach&lt;/a&gt; using PowerShell. This gives me the ability to get a lot done very quickly by taking advantage of the pipeline, dynamic typing and large set of commandlets available. Once I have an algorithm I’m happy with I’ll port the PowerShell to C#. The languages are similar enough that this process doesn’t take too long. If I’m lucky I have a junior dev that can crank it out for me :)&lt;/p&gt;

&lt;p&gt;This is my process for the most part, better or worse. In this I realize that most of my discovery code still has to be transposed as I would rarely use PowerShell to build an production application. PowerShell is very good but still dynamically typed making it somewhat difficult test and it’s typing system is rather limited. No gripes here, PowerShell wasn’t designed for a hardcore developer, it just happens to make for a nifty tool to get things done.&lt;/p&gt;

&lt;h2 id=&quot;typing-is-important-to-me&quot;&gt;Typing is important (to me)!&lt;/h2&gt;
&lt;p&gt;I know that I’ve made a large focus (and will continue to) on typing. It is a personal opinion of mine, that dynamically typed languages feel unsafe, when used without tests. Writing tests to address the lack of a static type system, isn’t something I really want to do. I understand this is a very sensitive topic to some; I don’t want to get into a battle; this is just my personal opinion.&lt;/p&gt;

&lt;h2 id=&quot;goodbye-powershell-hello-f&quot;&gt;Goodbye PowerShell, Hello F#!&lt;/h2&gt;
&lt;p&gt;I see now that F# can replace PowerShell in my current process of using F# for discovery. Two of the main reasons I use PowerShell is:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;It provides me real-time feedback&lt;/li&gt;
  &lt;li&gt;The pipeline to move my data from one function to another without a bunch of formality&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;interpreted&quot;&gt;Interpreted&lt;/h2&gt;
&lt;p&gt;I’m able to REPL my code and get real-time feedback on the nature of my application. This type of exploration helps me understand what my application is doing, during the writing. I’m able to make adjustments without having to refactor and recompile. I can do this directly in Visual Studio with the &lt;code class=&quot;highlighter-rouge&quot;&gt;&amp;lt;Alt&amp;gt; + ;&lt;/code&gt; or &lt;code class=&quot;highlighter-rouge&quot;&gt;&amp;lt;Alt&amp;gt; + &amp;lt;Enter&amp;gt;&lt;/code&gt; key bindings. I can also run F# interactive (fsi.exe) and evaluate using typing &lt;code class=&quot;highlighter-rouge&quot;&gt;;;&lt;/code&gt; into the editor.&lt;/p&gt;

&lt;h2 id=&quot;pipeline&quot;&gt;Pipeline&lt;/h2&gt;
&lt;p&gt;I love the pipeline in PowerShell and the pipe forward operator &lt;code class=&quot;highlighter-rouge&quot;&gt;|&amp;gt;&lt;/code&gt; is pretty much the same thing. This is a way to take data and apply the data to a function. This helps get rid of formally naming data that is only used to pass to another function.&lt;/p&gt;

&lt;p&gt;C# Extension Methods have helped, a large amount, allowing the chaining methods together. This begins to fall apart when returning different data types. Some creative brackets, nesting and lamba expressions later, you might achieve what comes very gracefully in F#.&lt;/p&gt;

&lt;h2 id=&quot;two-birds-one-stone&quot;&gt;Two birds, one stone&lt;/h2&gt;
&lt;p&gt;Using F# I’m also able to take advantage of some other cool and powerful features of the F# language:&lt;/p&gt;

&lt;h2 id=&quot;immutable-by-default&quot;&gt;Immutable (by default)&lt;/h2&gt;
&lt;p&gt;Most variables are immutable by default. This means we cannot change it’s value once it is set. This may seem odd coming from an impetrative world but when you adjust it actually reduces the amount of errors that mutable code brings (changing state and/or purpose). Because variables must be initialized with a value; that there are fewer null checks. There may be times where you want to mutate a variable. You must use the mutable keyword to allow variables to change and the mutate operator &lt;code class=&quot;highlighter-rouge&quot;&gt;&amp;lt;-&lt;/code&gt; to change values. Having a separate operator for this is terrific, as becomes quickly recognizable in code, what is mutable and what is not.
Static Typing / Native Types&lt;/p&gt;

&lt;p&gt;Won’t go into this much, but, satisfying the compiler, a large percentage means you are in fairly good shape. As an example consider a scenario, where we are updating a discriminating union and not updating Active Pattern matching statements to complete the new scenarios. My example here is a discriminating union that supports only Read, Update, Delete.&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;type command =	| Read
		| Update
		| Delete

let executeCommand command = 
	match command with
	| Update -&amp;gt; printfn &quot;updating&quot;
	| Delete -&amp;gt; printfn &quot;deleting&quot;
	| Read -&amp;gt; printfn &quot;reading&quot;

executeCommand Update
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Now say that we want to extend our command type to include “Create”&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;type command = | Create
			   | Read
			   | Update
			   | Delete
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;The compiler complain, saying that the pattern match expression is incomplete. Now, imagine some large C# codebase and trying to find all the dependent statements with one small update. Hopefully, you have tests to back everything and that everything is wrapped and handled in some common library. Making the update less painful, but, this requires composition and disciple. We get this for free with F# AND we are avoiding nulls, without a single null check. YAY!&lt;/p&gt;

&lt;h2 id=&quot;production-ready-no-more-transposing-to-c&quot;&gt;Production Ready (no more transposing to C#)&lt;/h2&gt;
&lt;p&gt;F# being able to do all things necessary for both a PowerShell and C# replacement, there is little reason to transpose F# to C#. Rather, I can now build discovery code that I can use for production. This realization is hard for me to believe.&lt;/p&gt;

&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;F# seems to hit a wonderful sweet spot for me. Bridging the gaps between my discovery and delivery processes. The language has been thought through, all the way down to the native types (tuples are amazing). With a growing community and large amount of work to get F# a first class .NET language—I believe I will be making some changes. Maybe not 100% but F# will most definitely be my first stop.&lt;/p&gt;

&lt;h2 id=&quot;resources&quot;&gt;Resources&lt;/h2&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;http://tryfsharp.org&quot;&gt;http://tryfsharp.org&lt;/a&gt; – Very good in-browser F# interactive and basic tutorial&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://fsharpforfunandprofit.com&quot;&gt;http://fsharpforfunandprofit.com&lt;/a&gt; – Very good tutorials / guides to common questions regarding F#&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://fsharp.org&quot;&gt;http://fsharp.org&lt;/a&gt; – Great community surrounding anything F#&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://channel9.msdn.com/Tags/fsharp&quot;&gt;http://channel9.msdn.com/Tags/fsharp&lt;/a&gt; – Channel 9 video’s on F#&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://sergeytihon.wordpress.com&quot;&gt;http://sergeytihon.wordpress.com&lt;/a&gt; – Sergy Tihon (&lt;a href=&quot;http://twitter.com/sergey_tihon&quot;&gt;@sergey_tihon&lt;/a&gt;) puts out a terrific weekly F# round-up.&lt;/li&gt;
&lt;/ul&gt;
</description>
				<pubDate>Mon, 17 Feb 2014 00:00:00 +0000</pubDate>
				<link>/blog/2014/02/17/a-c-developers-take-on-f-discovery-to-production/</link>
				<guid isPermaLink="true">/blog/2014/02/17/a-c-developers-take-on-f-discovery-to-production/</guid>
			</item>
		
			<item>
				<title>SharePoint 2013 - Discovering Timeline View Automation</title>
				<description>&lt;p&gt;One of more subtle but great little additions to SharePoint 2013 is the Task Timeline. This is most noticeable when creating a site using the “Project Site” template. During various events within a particular project lifecycle, tasks may be created dynamically. I thought it would be great to automatically populate the timeline with these auto-generated task…boy I didn’t realize what I was getting myself into.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/20140209-001.png&quot; alt=&quot;Screenshot of SharePoint 2013 Timeline View control.&quot; /&gt;&lt;/p&gt;

&lt;p&gt;There is little to no documentation regarding the technical nature of the Timeline component on the web.  Some posts with people have similar issues as myself and looking for guidance. I still felt this shouldn’t be a terribly difficult task. I started poking around with some the IE Developer Tools. I found code executing from ‘sp.ui.timeline.js’.  At this point, I figured I would just read some JavaScript and figure out what I needed to do…wrong! This file is obfuscated. Spent longer than I probably should have, reasoning the obfuscated JavaScript.  Even though I did learn a lot, I decided to tackle this a different way.&lt;/p&gt;

&lt;p&gt;I popped open Fiddler2 and monitored a simple page load. After interrogating the various requests, I found one that looked like my ticket.&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&amp;lt;?XML:NAMESPACE PREFIX=&quot;[default] http://schemas.microsoft.com/sharepoint/clientquery/2009&quot;
    NS=&quot;http://schemas.microsoft.com/sharepoint/clientquery/2009&quot; /&amp;gt;

&amp;lt;request xmlns=&quot;http://schemas.microsoft.com/sharepoint/clientquery/2009&quot; schemaversion=&quot;15.0.0.0&quot;
    libraryversion=&quot;15.0.0.0&quot; applicationname=&quot;Javascript Library&quot;&amp;gt;
	&amp;lt;actions&amp;gt;
		...
		&amp;lt;query id=&quot;12&quot; objectpathid=&quot;10&quot;&amp;gt;
			&amp;lt;query selectallproperties=&quot;true&quot;&amp;gt;
				&amp;lt;properties&amp;gt;&amp;lt;/properties&amp;gt;
			&amp;lt;/query&amp;gt;
		&amp;lt;/query&amp;gt;
	&amp;lt;/actions&amp;gt;
	&amp;lt;objectpaths&amp;gt;
		&amp;lt;staticproperty id=&quot;0&quot; typeid=&quot;{3747adcd-a3c3-41b9-bfab-4a64dd2f1e0a}&quot; name=&quot;Current&quot; /&amp;gt;
		&amp;lt;property id=&quot;2&quot; name=&quot;Web&quot; parentid=&quot;0&quot;&amp;gt;&amp;lt;/property&amp;gt;
		&amp;lt;property id=&quot;4&quot; name=&quot;Lists&quot; parentid=&quot;2&quot;&amp;gt;&amp;lt;/property&amp;gt;
		&amp;lt;method id=&quot;6&quot; name=&quot;GetById&quot; parentid=&quot;4&quot;&amp;gt;
			&amp;lt;parameters&amp;gt;
				&amp;lt;parameter type=&quot;Guid&quot;&amp;gt;{1293ee92-1074-4687-93d3-516fb8a0b3ac}&amp;lt;/parameter&amp;gt;
			&amp;lt;/parameters&amp;gt;
		&amp;lt;/method&amp;gt;
		&amp;lt;property id=&quot;8&quot; name=&quot;RootFolder&quot; parentid=&quot;6&quot;&amp;gt;&amp;lt;/property&amp;gt;
		&amp;lt;property id=&quot;10&quot; name=&quot;Properties&quot; parentid=&quot;8&quot;&amp;gt;&amp;lt;/property&amp;gt;
	&amp;lt;/objectpaths&amp;gt;
&amp;lt;/request&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;The request looks pretty straight-forward.  Get the current context, web, list (byID), RootFolders, Properties, then action to select All Properties. The response was as expected. I had all the contents of the property bag in JSON format.  Two properties jump out immediately (“TimelineDefaultView” and “Timeline_Timeline”).&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;[{
	...
	12, {
		...
		&quot;TimelineDefaultView&quot; : &quot;Timeline&quot;,
		&quot;Timeline_Timeline&quot; : &quot;&amp;amp;lt;TLViewData&amp;amp;gt;...&amp;amp;lt;\TLViewData&amp;amp;gt;&quot;,
	}
}]
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Looking at this data, I made some pretty large assumptions. The Timeline supports multiple views. Each view is prefixed with ”Timeline_”. Acting on these assumptions, I took the value of the Timeline_Timeline entry, decoded and formatted. After review it looks like the jackpot. While very shorthand we can see Milestones, Callouts, Tasks, Options and formatting.&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&amp;lt;tlviewdata&amp;gt;
  &amp;lt;!-- Item Format Set --&amp;gt;
  &amp;lt;fmtset&amp;gt;
    &amp;lt;fmt id=&quot;0&quot; type=&quot;0&quot; t2=&quot;1&quot; t1=&quot;0&quot; thm=&quot;0001&quot; clr=&quot;FFEE2222&quot; /&amp;gt;
  &amp;lt;/fmtset&amp;gt;
  &amp;lt;!-- Callout Set --&amp;gt;
  &amp;lt;fltset&amp;gt;
    &amp;lt;ft id=&quot;{00000000-0000-0000-0000-000000000000}&quot; h=&quot;20&quot; x=&quot;0&quot; y=&quot;4294967282&quot; fmt=&quot;1&quot; uid=&quot;4294967295&quot; uidsrc=&quot;1&quot; ontl=&quot;0&quot; /&amp;gt;
  &amp;lt;/fltset&amp;gt;
  &amp;lt;!-- Bar Element Set --&amp;gt;
  &amp;lt;tskset&amp;gt;
    &amp;lt;t id=&quot;{00000000-0000-0000-0000-000000000000}&quot; fmt=&quot;0&quot; uid=&quot;4294967295&quot; ch=&quot;4294967295&quot; uidsrc=&quot;1&quot; ontl=&quot;0&quot; /&amp;gt;
  &amp;lt;/tskset&amp;gt;
  &amp;lt;!-- TimelineOptions Set --&amp;gt;
  &amp;lt;options dateformat=&quot;255&quot; panzoomt=&quot;9&quot; projsummfmt=&quot;3&quot; showdates=&quot;1&quot; showprojsummdates=&quot;1&quot; showtoday=&quot;1&quot; showts=&quot;1&quot; timelineheight=&quot;110&quot; timelinewidth=&quot;-1&quot; timescalet=&quot;8&quot; todayt=&quot;10&quot; /&amp;gt;
  &amp;lt;!-- Milestone Set --&amp;gt;
  &amp;lt;mlset&amp;gt;
    &amp;lt;m id=&quot;{00000000-0000-0000-0000-000000000000}&quot; x=&quot;0&quot; y=&quot;35&quot; fmt=&quot;2&quot; uid=&quot;4294967295&quot; uidsrc=&quot;1&quot; ontl=&quot;0&quot; /&amp;gt;
  &amp;lt;/mlset&amp;gt;
  &amp;lt;!-- Text Style Set --&amp;gt;
  &amp;lt;txtset&amp;gt;
    &amp;lt;style id=&quot;0&quot; type=&quot;0&quot; thm=&quot;0001&quot; clr=&quot;FFEE2222&quot; strk=&quot;0&quot; und=&quot;0&quot; ital=&quot;0&quot; bold=&quot;0&quot; font=&quot;Segoe UI&quot; sz=&quot;8&quot;&amp;gt;
  &amp;lt;/txtset&amp;gt;
&amp;lt;/tlviewdata&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Seemed like a rather large bit of xml data to store in a property bag. Made me think—why store information this way, rather than on each item directly? My assumption is, doing it this way, likely prevents any event handlers from being triggered, when simply modifying what items are appearing in the view. One step better might be to store it in JSON format; A bit more concise and likely easier to deal with from browser.  If I recall, looking at the obfuscated “sp.ui.timeline.js” there was quite a bit of code to serialize the JavaScript objects into XML.&lt;/p&gt;

&lt;p&gt;At any rate, now that I have some sample data, I copied the data and pasted the code into some a .cs file using the “Paste Special”, “Paste XML As Classes”. I found this worked a little better than using xsd.exe to take XML –&amp;gt; XSD –&amp;gt; CS (xsd.exe had generated more unboxing code :T ). I had to fix a little bit of data typing but easier than typing up all the classes by hand.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/20140209-002.png&quot; alt=&quot;Image of Visual Studio&#39;s &#39;Edit&#39;, &#39;Paste Special&#39;, &#39;Paste XML As Classes&#39; menu.&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Now that I had C# classes, I can de-serialize, manipulate, serialize and store back into SharePoint. I’m a bit lazy, so I have leveraged .NET server side (was already in a provider hosted solution). I would have rather liked to have done this on the client, but, that means I have to find a good library that can serialize/de-serialize JavaScript objects from/to XML (in browser). If anyone knows of a good one, I would greatly appreciate a link Smile&lt;/p&gt;

&lt;p&gt;All this headache for doing something, that should be, so simple. I hope I have, at the very least, saved someone the work when automating the creation of Timeline views. I’ll try to follow up with a commented XML document and/or a set of documented classes with XML serialization attributes.&lt;/p&gt;
</description>
				<pubDate>Sun, 09 Feb 2014 00:00:00 +0000</pubDate>
				<link>/blog/2014/02/09/sharepoint-2013-discovering-timeline-view-automation/</link>
				<guid isPermaLink="true">/blog/2014/02/09/sharepoint-2013-discovering-timeline-view-automation/</guid>
			</item>
		
	</channel>
</rss>
