<?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>Look alive. Here comes a buzzard.</title>
	<atom:link href="http://blog.glenc.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.glenc.net</link>
	<description>Treading water in a sea of man-made confusion.</description>
	<lastBuildDate>Thu, 15 Oct 2009 17:10:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Copying a web part page including web parts</title>
		<link>http://blog.glenc.net/2009/10/15/copying-a-web-part-page-including-web-parts/</link>
		<comments>http://blog.glenc.net/2009/10/15/copying-a-web-part-page-including-web-parts/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 17:09:31 +0000</pubDate>
		<dc:creator>glenc</dc:creator>
				<category><![CDATA[Office System]]></category>
		<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://blog.glenc.net/?p=129</guid>
		<description><![CDATA[Out of the box, there is no way to copy a web part page and have it retain all of its web parts &#8211; including List View web parts.  I tried the following methods:

Download .aspx from Pages doc lib, rename and re-upload.  All list view web parts are stripped during this process.
Use the Send To [...]]]></description>
			<content:encoded><![CDATA[<p>Out of the box, there is no way to copy a web part page and have it retain all of its web parts &#8211; including List View web parts.  I tried the following methods:</p>
<ul>
<li>Download .aspx from Pages doc lib, rename and re-upload.  All list view web parts are stripped during this process.</li>
<li>Use the Send To option to make a copy of the .aspx in another folder or doc lib.  Same result as above &#8211; all web parts are stripped.</li>
<li>Use the Content Structure view to copy the page.  Same result, web parts are stripped.</li>
</ul>
<p>Finally I found a solution &#8211; although it&#8217;s a bit of a hack in my opinion: SharePoint Designer workflow.  The SPD workflow action &#8220;Copy List Item&#8221; will make a copy of a page and retain all web parts including list view web parts.  Here&#8217;s how you can accomplish this:</p>
<ol>
<li>Open SPD, open your site, and create a new Workflow.  Call it &#8220;Copy Page&#8221; or something like that.</li>
<li>Target your Pages library (or wherever your web part pages live) for the workflow and specify that it should be started manually.</li>
<li>Add a single action:  Copy List Item.  When adding the list item, you can select &#8220;Current Item&#8221; for the page to copy, and then specify the target list as the same Pages library.</li>
</ol>
<p>Now you&#8217;ll be able to start the Copy Page workflow on any page in your pages library.  When it creates a copy it simply appends the date and time to the file name so you won&#8217;t wind up over-writing the existing page.</p>
<p>With a little more work it should be possible to create an Initiation Variable for your workflow and rename the page as a part of the workflow.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.glenc.net/2009/10/15/copying-a-web-part-page-including-web-parts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing Sublime &#8211; Easy Subversion Management for Windows</title>
		<link>http://blog.glenc.net/2009/08/21/introducing-sublime-easy-subversion-management-for-windows/</link>
		<comments>http://blog.glenc.net/2009/08/21/introducing-sublime-easy-subversion-management-for-windows/#comments</comments>
		<pubDate>Fri, 21 Aug 2009 18:26:28 +0000</pubDate>
		<dc:creator>glenc</dc:creator>
				<category><![CDATA[Subversion]]></category>

		<guid isPermaLink="false">http://blog.glenc.net/?p=126</guid>
		<description><![CDATA[I&#8217;d like to take a few moments for some shameless self promotion.  Yesterday I was happy to release Sublime 1.0.  Sublime is a Subversion management application designed for Microsoft-centric environments.
Subversion is an excellent SCM tool &#8211; arguably the leading SCM tool available today. But with its roots firmly in the open source / linux community, [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;d like to take a few moments for some shameless self promotion.  Yesterday I was happy to release <a title="Sublime - Easy Subversion Management for Windows" href="http://sublimesvn.com" target="_blank">Sublime 1.0</a>.  Sublime is a Subversion management application designed for Microsoft-centric environments.</p>
<p>Subversion is an excellent SCM tool &#8211; arguably the leading SCM tool available today. But with its roots firmly in the open source / linux community, there aren&#8217;t a lot of Windows-based applications for managing subversion.  Tools like VisualSVN server make it easy to install and configure Subversion, but it requires access to the server for management.  Web-based Subversion apps can be found, but they are often built in PHP and may not fit with a &#8220;Microsoft Shop&#8217;s&#8221; IT strategy.</p>
<p>Sublime was designed for exactly these reasons.  Sublime provides a web-based management tool for your Subversion infrastructure.  It allows users to <a title="Browse subversion repositories" href="http://sublimesvn.com/tour/public-home.html" target="_blank">browse</a> and <a title="Create subversion repositories in Sublime" href="http://sublimesvn.com/tour/public-create-repository.html" target="_blank">create repositories</a>, <a title="Manage subversion permissions in Sublime" href="http://sublimesvn.com/tour/public-edit-repository-permissions.html" target="_blank">manage permissions</a>, and enable email alerts all from a simple web interface.  Server administrators can configure <a title="Automated subversion backups" href="http://sublimesvn.com/tour/admin-backups.html" target="_blank">automated backups</a>, <a title="Manage subversion users" href="http://sublimesvn.com/tour/admin-manage-users.html" target="_blank">manage users</a> and groups, and <a title="Monitor subversion server health" href="http://sublimesvn.com/tour/admin-home.html" target="_blank">monitor server health</a> all from a web browser.  The Sublime installer will automatically install Subversion if required making the setup process extremely fast and simple.</p>
<p>Ultimately, Sublime makes it easy for dev teams to use Subversion without any bottlenecks.  Users don&#8217;t have to wait for IT to create repositories, users can manage their own password, repository owners can manage permissions, etc.  At the same time, IT has the ability to manage the server and ensure data is backed up all within a Windows-based environment they are familiar with.  Everybody&#8217;s happy <img src='http://blog.glenc.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I&#8217;m super excited about this release.  If you use Subversion today, or are thinking of moving to Subversion from a different SCM tool (or *gasp* no SCM tool), then I would encourage you to take a look at the <a href="http://sublimesvn.com" target="_blank">Sublime website</a> for more information.</p>
<p>Okay.  Plug over.  We now return you to your regularly scheduled blog.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.glenc.net/2009/08/21/introducing-sublime-easy-subversion-management-for-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Looking forward to SharePoint 2010</title>
		<link>http://blog.glenc.net/2009/08/14/looking-forward-to-sharepoint-2010/</link>
		<comments>http://blog.glenc.net/2009/08/14/looking-forward-to-sharepoint-2010/#comments</comments>
		<pubDate>Fri, 14 Aug 2009 22:42:04 +0000</pubDate>
		<dc:creator>glenc</dc:creator>
				<category><![CDATA[Office System]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://blog.glenc.net/?p=122</guid>
		<description><![CDATA[One of my biggest complaints about SharePoint 2007 is that as a developer, it is virtually impossible to employ professional development techniques when building SharePoint solutions.  I&#8217;m talking about source control, continuous integration, test driven development, etc.  Obviously you can use these techniques when it comes to custom web parts, event receivers, and other &#8220;code [...]]]></description>
			<content:encoded><![CDATA[<p>One of my biggest complaints about SharePoint 2007 is that as a developer, it is virtually impossible to employ professional development techniques when building SharePoint solutions.  I&#8217;m talking about source control, continuous integration, test driven development, etc.  Obviously you can use these techniques when it comes to custom web parts, event receivers, and other &#8220;code only&#8221; solutions, but when you&#8217;re talking about larger projects that include content types, SharePoint Designer workflows, custom lists, in addition to custom code, it simply isn&#8217;t practical to try and cram everything into source control.  It&#8217;s just too much effort.</p>
<p>From what I&#8217;ve seen so far, many of these issues will be resolved with SharePoint 2010 and Visual Studio 2010.  I&#8217;m looking forward to digging into a real project so I can find out where the &#8220;gotchas&#8221; are (and I&#8217;m sure there will be plenty), but so far I&#8217;m optimistic.  I am hopeful that as a developer, I will be able to bring professional development techniques to all areas of a SharePoint project.</p>
<p>In my opinion this is critical if Microsoft wants to make SharePoint a true application development platform.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.glenc.net/2009/08/14/looking-forward-to-sharepoint-2010/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>SOLVED: Console Configuration File Error: File Not Found: The system cannot find the file specified. (Exception from HRESULT: 0&#215;80070002)</title>
		<link>http://blog.glenc.net/2009/08/04/solvedconsole-configuration-file-error/</link>
		<comments>http://blog.glenc.net/2009/08/04/solvedconsole-configuration-file-error/#comments</comments>
		<pubDate>Tue, 04 Aug 2009 20:52:40 +0000</pubDate>
		<dc:creator>glenc</dc:creator>
				<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://blog.glenc.net/?p=118</guid>
		<description><![CDATA[I&#8217;ve been wrestling with this error off and on for a while now.  It shows up in the event log of a production MOSS server I help manage.  Here is the error message:
Event Type: Error
Event Source: Office SharePoint Server
Event Category: Publishing
Event ID: 5165
Date: 8/4/2009
Time: 12:57:51 PM
User: N/A
Computer: SERVER
Description:
Console Configuration File Error: File Not Found: The [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been wrestling with this error off and on for a while now.  It shows up in the event log of a production MOSS server I help manage.  Here is the error message:</p>
<blockquote><p>Event Type:<span> </span>Error<br />
Event Source:<span> </span>Office SharePoint Server<br />
Event Category:<span> </span>Publishing<br />
Event ID:<span> </span>5165<br />
Date:<span> </span>8/4/2009<br />
Time:<span> </span>12:57:51 PM<br />
User:<span> </span>N/A<br />
Computer:<span> </span>SERVER<br />
Description:<br />
Console Configuration File Error: File Not Found: The system cannot find the file specified. (Exception from HRESULT: 0&#215;80070002)<br />
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.</p></blockquote>
<p><a href="http://www.google.com/search?client=safari&amp;rls=en-us&amp;q=Console+Configuration+File+Error:+File+Not+Found:+The+system+cannot+find+the+file+specified.+(Exception+from+HRESULT:+0x80070002)&amp;ie=UTF-8&amp;oe=UTF-8" target="_blank">Googling</a> for this error provides some information, but nothing definitive.  After turning up the logging level for the Publishing category, I was finally able to find enough information to locate the root cause.</p>
<p>This problem occurs when you are using a Master Page referencing SharePoint Publishing controls in a site collection that does not have the Publishing Infrastructure feature activated.  In my case, I was using a Master Page with the Publishing Console control on the page.  This Publishing Console was looking for some files in the Master Page gallery (_catalogs/masterpage/EditingMenu/CustomEditingMenu.xml etc) which don&#8217;t exist if the Publishing Infrastructure is not activated.  After I activated the Publishing Infrastructure, the errors went away.</p>
<p>However, ultimately the real solution was to remove the publishing features from the Master Page since I wasn&#8217;t using them anyway.</p>
<p>This problem came about when we re-used the master page from our main intranet on users&#8217; My Sites.  Since the My Site doesn&#8217;t use the publishing features, every time someone hit a my site, these errors would show up in the event log.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.glenc.net/2009/08/04/solvedconsole-configuration-file-error/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Automated backups for VMWare ESXi</title>
		<link>http://blog.glenc.net/2008/12/27/automated-backups-for-vmware-esxi/</link>
		<comments>http://blog.glenc.net/2008/12/27/automated-backups-for-vmware-esxi/#comments</comments>
		<pubDate>Sun, 28 Dec 2008 02:58:00 +0000</pubDate>
		<dc:creator>glenc</dc:creator>
				<category><![CDATA[ESXi]]></category>
		<category><![CDATA[VMWare]]></category>

		<guid isPermaLink="false">http://blog.glenc.net/?p=112</guid>
		<description><![CDATA[Setting up automated backups for ESXi can be a little tricky.  After quite a bit of searching I finally came up with these steps that worked for me.  I don&#8217;t take credit for any of these.  I&#8217;m just providing you with the steps that I followed and the posts that helped me.
DISCLAIMER: [...]]]></description>
			<content:encoded><![CDATA[<p>Setting up automated backups for ESXi can be a little tricky.  After quite a bit of searching I finally came up with these steps that worked for me.  I don&#8217;t take credit for any of these.  I&#8217;m just providing you with the steps that I followed and the posts that helped me.</p>
<p><strong><span style="color: #ff0000;">DISCLAIMER: There are some unsupported steps here.  Proceed at your own risk!</span></strong></p>
<p><strong>Step 1:  Enable ssh access on your ESXi host.</strong> To do that, follow these steps (originally from <a href="http://www.vm-help.com/esx/esx3i/ESXi_enable_SSH.php">this post</a>).</p>
<p><em>NOTE: You actually don&#8217;t have to enable ssh for this, I just find it convenient to have remote access to the host machine.  If you don&#8217;t want to enable ssh, perform steps 1-3 below, then skip on to section 2.  When you reach section 3, rather than using ssh, you&#8217;ll just execute the commands directly on the host machine at the console.</em></p>
<ol>
<li>From the console on your host (actually on the host machine &#8211; not using the Remote Client), press ALT-F1</li>
<li>Type in the text &#8220;unsupported&#8221; and press ENTER.  Note: the text will not appear as you type.</li>
<li>Enter the root password</li>
<li>Enter the command
<pre name="code" class="bash">vi /etc/inetd.conf</pre>
</li>
<li>Find the line starting with &#8220;#ssh&#8221;.  You can search by pressing / and then typing ssh and pressing Enter.</li>
<li>Once you&#8217;ve found that line, place the cursor on the # and press x.  This should remove the # character.</li>
<li>Now type
<pre name="code" class="bash">:wq!</pre>
<p> and press ENTER to save your changes.</li>
<li>Next you must restart the inetd process.  To do that, you first need the process id.  At the console, enter
<pre name="code" class="bash">ps | grep inetd</pre>
<p>You should get something that looks like this:</p>
<pre name="code" class="bash">1273 1273 busybox      inetd</pre>
<p>In this case, 1273 is the process ID.  To kill the process enter kill -HUP &lt;process id&gt;.  So in this case, you would enter the following command:</p>
<pre name="code" class="bash">kill -HUP 1273</pre>
</li>
<li>SSH is now enabled on your ESXi host machine.  To test this you&#8217;ll need an ssh client.  I&#8217;m using a mac so I can open terminal and enter the following command:
<pre name="code" class="bash">ssh root@&lt;myhost&gt;</pre>
<p>If you&#8217;re using windows you may need something like <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/">PuTTY</a> or <a href="http://www.cygwin.com/">Cygwin</a>.</li>
</ol>
<p><strong>Step 2: Configure your backup datasource</strong></p>
<p>Next you need to figure out where your backups will be stored.  It can be on the ESXi host if you like, but really it should be on a SAN or NAS or something like that.  I&#8217;m using a <a href="http://www.netgear.com/Products/Storage/ReadyNASNVPlus.aspx">Netgear ReadyNAS NV+</a> and it works great.</p>
<ol>
<li>Create a share where your backups will be stored and call it something like &#8220;backups&#8221;.  Make sure that anyone can read/write to this share.</li>
<li>Open the VMWare Infrastructure Client and connect to your host machine as root.</li>
<li>Go to the <strong>Configuration</strong> tab for the host and click <strong>Storage</strong>.</li>
<li>Click <strong>Add Storage&#8230;</strong> and create a new datastore pointing to the share you created in step 1.  Call this datastore something descriptive&#8230;  like &#8220;backups&#8221; <img src='http://blog.glenc.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
</ol>
<p><strong>Step 3: Set up your backup script.</strong></p>
<p>I found <a href="http://communities.vmware.com/docs/DOC-8760">this great backup script</a>.  It lets you specify the VMs you want to backup in a separate text file which makes it really easy to add new VMs to the rotation.  It also lets you keep a rotating number of VMs if you don&#8217;t want to over-write each backup daily.</p>
<ol>
<li><a href="http://communities.vmware.com/docs/DOC-8760">Download the backup script</a>.</li>
<li>Copy it to the same backup share you created in the last section.  You can create a directory called _scripts to keep it separate from the actual backups.</li>
<li>Open the script and customize the variables at the top.  In my case, all I had to modify was the <strong>VM_BACKUP_VOLUME</strong> variable.  If you named your datastore &#8220;backups&#8221; you can edit this line to look like this:
<pre name="code" class="bash">VM_BACKUP_VOLUME=/vmfs/volumes/backups</pre>
<p> </li>
<li>Create a new text file in the same directory as the backup script called VMs.txt.  In this file enter the name of each VM you want to back up.  Each VM name should be on a new line.  Your file should look something like this:
<pre name="code" class="bash">VM1
VM2
A_THIRD_VM</pre>
</li>
<li>Connect to your host using ssh i.e. <strong>ssh root@&lt;myhost&gt;</strong></li>
<li>Enter this command:
<pre name="code" class="bash">vi /var/spool/cron/crontabs/root</pre>
</li>
<li>Move the cursor to the very end of the file.  Press <strong>a</strong>.  This will enter edit mode.</li>
<li>Press Enter to create a new line and then add the following text:
<pre name="code" class="bash">02 02 * * *  sh /vmfs/volumes/backups/_scripts/ghettoVCB.sh /vmfs/volumes/backups/_scripts/VMs.txt</pre>
<p>This will run the backup script at 2:02 AM every day.  You can change the frequency or time of day if you like.  This <a href="http://www.adminschoice.com/docs/crontab.htm">crontab reference</a> is helpful.</li>
<li>At this point your entire file should look something like this:
<pre name="code" class="bash"> #syntax : minute hour day month dayofweek command
01 01 * * * /sbin/tmpwatch.sh
01 * * * * /sbin/auto-backup.sh #first minute of every hour (run every hour)
00,10,20,30,40,50 * * * * /sbin/decodeSel.sh #Every 10 minutes, translate the latest IPMI SEL data
02 02 * * *  sh /vmfs/volumes/backups/_scripts/ghettoVCB.sh /vmfs/volumes/backups/_scripts/VMs.txt
</pre>
<p>If you are satisfied, press Escape.</li>
<li>Type the following command to save the file and exit:<code>:wq!</code></li>
<li>The backups are now scheduled</li>
</ol>
<p>At this point, you now have backups scheduled to run every day at 2:02 AM.  You can change which VMs are backed-up by editing the VMs.txt file you created.  You could even set up multiple cron jobs with different backup frequencies, and different VMs.txt files to back up different VMs at different times.</p>
<p>Before finishing however, you might want to do a test run.  If you are still connected to the host machine using ssh, enter the following command:</p>
<pre name="code" class="bash">sh /vmfs/volumes/backups/_scripts/ghettoVCB.sh /vmfs/volumes/backups/_scripts/VMs.txt</pre>
<p><strong>IMPORTANT: This will take a while if you have large VMs.  You may want to edit VMs.txt to target a single small VM as a test run.  If it works for that, it should work for the rest.</strong></p>
<p>One last thing.  Unfortunately, the crontabs/root file isn&#8217;t saved after a reboot.  In order to avoid adding the scheduled job after each reboot you may have to follow one of the <a href="http://communities.vmware.com/message/1111591#1111591">techniques described here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.glenc.net/2008/12/27/automated-backups-for-vmware-esxi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to use source control &#8211; treat it like a video game</title>
		<link>http://blog.glenc.net/2008/11/15/how-to-use-source-control-treat-it-like-a-video-game/</link>
		<comments>http://blog.glenc.net/2008/11/15/how-to-use-source-control-treat-it-like-a-video-game/#comments</comments>
		<pubDate>Sat, 15 Nov 2008 08:26:23 +0000</pubDate>
		<dc:creator>glenc</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Subversion]]></category>

		<guid isPermaLink="false">http://blog.glenc.net/?p=108</guid>
		<description><![CDATA[It struck me the other day that the way I use source control is very similar to how I play video games &#8211; specifically, when and how I save my game.  I like to use source control as a safety net &#8211; it&#8217;s a way to keep track of a place I may need to [...]]]></description>
			<content:encoded><![CDATA[<p>It struck me the other day that the way I use source control is very similar to how I play video games &#8211; specifically, when and how I save my game.  I like to use source control as a safety net &#8211; it&#8217;s a way to keep track of a place I may need to return to.  It allows me to continue on with my work and not be worried if I go down a wrong path.  I can always revert and be right back where I started.</p>
<p>Taking this one step further, we might say that the quick save in a video game is like a commit in source control.  Saving your game with a specific name is like creating a branch.</p>
<p>Let&#8217;s say I just finish taking out a whole horde of zombies (<a href="http://www.l4d.com/">Left 4 Dead</a> anticipation is infiltrating my blog).  I&#8217;ll probably do a quick-save to make sure I don&#8217;t have to re-play the same encounter again.  This is just like committing some code you just finished.  You&#8217;re saving your current progress to make sure you don&#8217;t have to re-write the same code twice.</p>
<p>Now, back to my game, what if I come to a fork in the road.  I can go left through the ominous looking sewer, or I can go right through the abandoned city.  Well at this point I&#8217;ll go and save my game with some sort of name like &#8220;Taking the sewer&#8221;.  That way I can continue playing, quick-saving as I go, but I can always get back to that fork if it turns out I made a mistake.</p>
<p>This is very similar to creating a branch in source control.  You want to start working on something new, or something experimental, and you need to be able to save your progress as you go, but you always may need to go back to that original point.</p>
<p>I find that many developers wait too long to commit their changes.  The more frequently you commit, and the more organized you are about it, the less you have to worry about keeping track of every change you make.  This means you have left cruft floating around in your mind to remember and you can concentrate on writing good code.  I think if developers think about source control the same way they think about saving their game progress, it would help them get into the habit of committing frequently and branching appropriately.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.glenc.net/2008/11/15/how-to-use-source-control-treat-it-like-a-video-game/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>RPoint &#8211; Why Ruby?  What about XML?</title>
		<link>http://blog.glenc.net/2008/08/11/rpoint-why-ruby-what-about-xml/</link>
		<comments>http://blog.glenc.net/2008/08/11/rpoint-why-ruby-what-about-xml/#comments</comments>
		<pubDate>Tue, 12 Aug 2008 04:49:54 +0000</pubDate>
		<dc:creator>glenc</dc:creator>
				<category><![CDATA[RPoint]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://blog.glenc.net/?p=94</guid>
		<description><![CDATA[I wanted to do a quick post on why I chose Ruby for RPoint.  I talked about this a little in the first post but just looking at the examples I&#8217;ve given so far, one could make the argument that rather than creating these scripts in ruby, you could just create a simple XML [...]]]></description>
			<content:encoded><![CDATA[<p>I wanted to do a quick post on why I chose Ruby for RPoint.  I talked about this a little in the first post but just looking at the examples I&#8217;ve given so far, one could make the argument that rather than creating these scripts in ruby, you could just create a simple XML document that defines your structure, templates, etc.</p>
<p>This is very true &#8211; and in fact I have written tools like this in the past.  But here&#8217;s the problem I&#8217;ve encountered with XML.  You end up trying to build a programming language out of XML.  That&#8217;s basically where CAML has ended up.  And I don&#8217;t know a single person who actually <em>enjoys</em> looking at, much less creating, CAML.</p>
<p>Here&#8217;s what I like about the ruby approach.  It let&#8217;s you write something like this:</p>
<pre name="code" class="ruby">site_names = ["Site One", "Site Two", "Site Three"]
at "http://localhost" do
  site_names.each do |name|
    create_web name, TeamSite
  end
end
</pre>
<p>Just the simple addition of an array of site names is something that would be hard to do in XML.  What if you wanted to pull your information from a database?  Or a file system?  Or an Excel spreadsheet?  For any of those you would have to write more logic into your XML mini-language &#8211; constructs like looping, conditionals, some mechanism to handle plug-ins for additional logic, etc.  By leveraging an actual programming language, we get all of that for free.</p>
<p>Want to create 50 test sites?  Here you go.</p>
<pre name="code" class="ruby">at "http://localhost" do
  50.times do |i|
    create_web "Site #{i}", BlankSite
  end
end
</pre>
<p>&#8217;nuff said.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.glenc.net/2008/08/11/rpoint-why-ruby-what-about-xml/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>RPoint &#8211; Hopes and Dreams</title>
		<link>http://blog.glenc.net/2008/08/11/rpoint-vision/</link>
		<comments>http://blog.glenc.net/2008/08/11/rpoint-vision/#comments</comments>
		<pubDate>Tue, 12 Aug 2008 02:47:56 +0000</pubDate>
		<dc:creator>glenc</dc:creator>
				<category><![CDATA[RPoint]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://blog.glenc.net/?p=87</guid>
		<description><![CDATA[Yesterday I posted about RPoint for the first time and I showed you a simple script to create a site structure.  All of that code is working today.  I wanted to keep the example simple and show you something that was actually functional.
Today I want to dream a little.  Here are a [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I posted about RPoint for the first time and I showed you a simple script to create a site structure.  All of that code is working today.  I wanted to keep the example simple and show you something that was actually functional.</p>
<p>Today I want to dream a little.  Here are a few scripts I want RPoint to be able to support.</p>
<h2>Creating a List Template</h2>
<p>This script would create a list template.</p>
<pre name="code" class="ruby">class Milestones
  include ListTemplateMixin

  name "Milestones"
  description "A Simple Milestone List"

  column "Milestone", Text, :is_title => true, :required => true
  column "Description", RichText
  column "Date", Date, :required => true, :default => :today

  view "All Milestones" do
    show_columns "Milestone", "Date"
  end

  view "Overdue Milestones" do
    show_columns "Milestone", "Date"
    where :date => less_than(:today)
    order_by :date => :descending
  end
end
</pre>
<p>Once you had defined your template, you could use it in a few different ways.  First, you could use it in a site creation script:</p>
<pre name="code" class="ruby">at "http://localhost" do
  create_list "My Milestones", Milestones
end
</pre>
<p>Second, and possibly cooler, you could generate a list definition:</p>
<pre name="code" class="bash">>ir generate.rb list_definition --source MilestoneTemplate.rb</pre>
<h2>Migrations</h2>
<p>Migrations in Rails is a great pre-defined structure for handling your database schema and changes to it over time.  It may not be anything too ground-breaking on its own, but it enforces a discipline when it comes to managing your database.  You are encouraged to think about situations where you want to change your database but data already exists.  You can write scripts to migrate existing data to your new structure and it&#8217;s all managed within source control as an ordered list of steps to execute.</p>
<p>I want to be able to do something similar with RPoint.</p>
<pre name="code" class="ruby"># first migration - create my site collection
class CreateSiteMigration
  at :webapp => "http://localhost" do
    create_site "My Site", TeamSite
  end
end

# second migration - add a list and add a lookup to that list on an existing list
class AddIssuesMigration
  at "http://localhost/sites/mysite" do
    create_list "Issues", Issues
    update_list "Tasks" do
      add_column "Related Issue", Lookup("Issues", :field => :title)
    end
  end
end
</pre>
<p>Okay &#8211; that&#8217;s enough dreaming for now.  Just incase anyone missed the intro THIS CODE DOES NOT WORK.  It is completely imaginary.  I am <em>hoping</em> that something along these lines will become reality.  And I hope that you will agree that this would be a much nicer way to create SharePoint solutions than slogging through hundreds of lines of XML.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.glenc.net/2008/08/11/rpoint-vision/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RPoint &#8211; a DSL for SharePoint</title>
		<link>http://blog.glenc.net/2008/08/10/rpoint-a-dsl-for-sharepoint/</link>
		<comments>http://blog.glenc.net/2008/08/10/rpoint-a-dsl-for-sharepoint/#comments</comments>
		<pubDate>Sun, 10 Aug 2008 19:14:01 +0000</pubDate>
		<dc:creator>glenc</dc:creator>
				<category><![CDATA[RPoint]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://blog.glenc.net/?p=72</guid>
		<description><![CDATA[A few days back I talked about how the release of IronRuby would be great for SharePoint scripting.  In my opinion, what makes Ruby such a powerful language is that it is great for creating domain specific languages (DSLs).  I&#8217;m going to keep this post short so I won&#8217;t go into what DSLs [...]]]></description>
			<content:encoded><![CDATA[<p>A few days back I <a href="http://blog.glenc.net/2008/07/25/ironruby-a-sharepoint-developers-best-friend/">talked about</a> how the release of <a href="http://rubyforge.org/projects/ironruby">IronRuby</a> would be great for SharePoint scripting.  In my opinion, what makes Ruby such a powerful language is that it is great for creating domain specific languages (DSLs).  I&#8217;m going to keep this post short so I won&#8217;t go into what DSLs are or examples of them.  If you want to find out more info, look at some other ruby libraries such as <a href="http://rspec.info">rspec</a>, <a href="http://rake.rubyforge.org/">rake</a>, and <a href="http://datamapper.org/">datamapper</a>.</p>
<p>I think that SharePoint is in dire need of better tools to facilitate solution development, deployment, and maintenance.  It is simply too difficult to build a site in one environment and then deploy it in production.  Sure you can do backup and restore, but what about when you want to make some upgrades?</p>
<p>Anyway, this weekend I started working on an IronRuby-based DSL for SharePoint scripting.  I&#8217;m calling it RPoint for now (until I think of something sexier!).  Now, this is very very very early in development and I am sure things aren&#8217;t set up today as nicely as they should be long term, but I&#8217;ve been really excited by the progress and the possibilities.</p>
<p>RPoint will allow you to write code like this to create SharePoint sites:</p>
<pre name="code" class="ruby"># create a new subweb beneath an existing site
at "http://localhost" do
  create_web "New Web", TeamSite
end

# create a new site collection and website structure
at :webapp =&gt; "http://localhost" do
  create_site "New Site Collection", BlankSite, "domain\\user" do
    inside root_web do

      # create our site structure
      create_web "Child Web", TeamSite
      create_web "Another Child", BlankSite do
        create_web "Private Site", TeamSite, :inherit_permissions => false
      end

      # create a few lists
      create_list "Documents", DocumentLibrary
      create_list "Announcements", Announcements

    end
  end
end</pre>
<p>I think that&#8217;s pretty cool.  Beyond simply creating sites, RPoint will allow you to create lists, views and probably upload resources like images and documents.</p>
<p>My goals for RPoint are to be able to do the following:</p>
<ul>
<li>Easily write scripts to create site structures and lists</li>
<li>Rails-like &#8220;Migrations&#8221; for applying changes to existing sites</li>
<li>Custom site template and list definitions in ruby as opposed to XML</li>
<li>Ability to run template/list definitions against a live site or generate schema.xml/onet.xml files for production deployment</li>
<li>Support web-services automation as well as object model automation (this will be tough)
</ul>
<p>SharePoint is a huge product.  The code-base is enormous and the aspirations for RPoint are lofty.  I would greatly appreciate any assistance.  The more hands there are to help, the sooner we will have a tool to make SharePoint development a little easier.</p>
<p>To get RPoint in its current form, you can <a href="http://github.com/glenc/rpoint/tree/master">download it from GitHub</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.glenc.net/2008/08/10/rpoint-a-dsl-for-sharepoint/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>IronRuby &#8211; a SharePoint Developer&#8217;s Best Friend</title>
		<link>http://blog.glenc.net/2008/07/25/ironruby-a-sharepoint-developers-best-friend/</link>
		<comments>http://blog.glenc.net/2008/07/25/ironruby-a-sharepoint-developers-best-friend/#comments</comments>
		<pubDate>Fri, 25 Jul 2008 18:33:37 +0000</pubDate>
		<dc:creator>glenc</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://blog.glenc.net/?p=71</guid>
		<description><![CDATA[I wrote a while back about SharePoint scripting with IronPython.  Well today&#8217;s announcement of the first binary release of IronRuby got me pretty darn excited.  I really like Python, but I LOVE Ruby.  I&#8217;ve been waiting for IronRuby to catch up to IronPython for quite a while and it looks like they&#8217;re [...]]]></description>
			<content:encoded><![CDATA[<p>I wrote a while back about SharePoint scripting with IronPython.  Well <a href="http://www.iunknown.com/2008/07/ironruby-at-oscon.html" target="_blank">today&#8217;s announcement</a> of the first binary release of IronRuby got me pretty darn excited.  I really like Python, but I <em>LOVE</em> Ruby.  I&#8217;ve been waiting for IronRuby to catch up to IronPython for quite a while and it looks like they&#8217;re getting close.</p>
<p>Here&#8217;s a quick guide to getting up and running with IronRuby and SharePoint.</p>
<p><strong>Installation:</strong></p>
<ol>
<li>First, <a href="http://rubyforge.org/projects/ironruby" target="_blank">download the IronRuby release from Rubyforge</a>.</li>
<li>Next, copy the ironruby folder you extract to your Program Files (put it wherever you like &#8211; that&#8217;s where I put mine).</li>
<li>Update your system&#8217;s PATH environment variable to contain the path to the ironruby\bin folder.  So if you placed it in your Program Files, you would add this to your PATH: c:\program files\ironruby\bin</li>
</ol>
<p><strong>Creating a Script:</strong></p>
<p>Next you&#8217;ll want to create a new text file called print_sites.rb.  I recommend the <a href="http://e-texteditor.com/" target="_blank">e text editor</a> by the way &#8211; great tool.  Add the following lines to your file:</p>
<pre name="code" class="ruby">require 'System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL'
require 'Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL'

Uri = System::Uri
SPSite = Microsoft::SharePoint::SPSite
SPWebApplication = Microsoft::SharePoint::Administration::SPWebApplication
</pre>
<p>Okay &#8211; what does that do?  Well the first two lines are like adding a reference to a standard Visual Studio project.  They tell IronRuby that we need to reference (require) the System and Microsoft.SharePoint assemblies.  The next three lines are for convenience.  They set up aliases to the System.Uri class and two SharePoint classes.  In our ruby code, now we can just use Uri, SPSite, etc instead of having to type out the fully qualified path.</p>
<p>Next, let&#8217;s add some ruby code to enumerate all sites in a web application.</p>
<pre name="code" class="ruby">
webapp = SPWebApplication.Lookup(Uri.new("http://localhost"))
webapp.Sites.each do |site|
  puts site.Url
end
</pre>
<p><em>(hmm, looks like I don&#8217;t actually need the SPSite alias after all)</em></p>
<p>Now, save your file.  You can execute it like this:</p>
<pre name="code" class="bash">> ir print_sites.rb
</pre>
<p>If everything is set up right, you should see the URL for each site collection be printed to the screen.</p>
<p>There you go.  Have fun.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.glenc.net/2008/07/25/ironruby-a-sharepoint-developers-best-friend/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
