Saturday, 17 June 2006

Tech Ed 06 Day 5



# 
The last day of Tech Ed is different from all the others.  Many people have left already, and all the big announcments have been made.  They do schedule some excellent presentations for Friday, so it is worth hanging around for.

I did manage to attend another session Thursday afternoon.  Steve Lasker gave a presentation about occasionally connected systems.  This talk covered the current and future technologies available from Microsoft to deal with moving data offline, then syncronizing with the server when after returning online.  Good session on a very relevant topic.

Thursday night's party was great fun.  I skipped the ball park food, and went to the upper levels where they had a buffet, and beer options beyond Budweiser products.  I met up with my buddy Jim Topp, and we took in the concert, as well as a significant number of Samual Adams Boston Lagers, together.

The opening act was fine, but not inspiring.  Train was excellent.  They are definately a party band.  Along with all their own songs, they did two Zepplin covers, and closed with Aerosmith's "Dream On".  I would definately pay to see them again.

By Friday morning, I had answered, or at least addressed all of my TFS issues.  Before leaving for the party on Thursday, I brought Randy Miller a printout of CMMi KPAs not fullfilled by the MSF Guidance that my CMMi manager put together.  Randy's response was, "You rock!"  I'm looking forward to working with Randy, and Kevin Kelly as we move forward.  One member of the team with whom I didn't get to talk to enough was Noah Coad.  Noah was at the BOF sessions on Tuesday, but we only spoke briefly Wednesday morning. 

My first session on Friday was Architecting Your Own Enterprise Framework with Brian Button.  Brian shared the lessons he learned working on the Enterprise framework in the Patterns and Practices group.  I plan to download the slides when I return to my office, so I can review the wisdom contained therein.  Brian shared what worked for his team, and what didn't.  The most prominent idea that I left with was the "Rule of 3".  If you see a solution implemented three times, then it should go into a framework, but not before.  According to Brian, frameworks are not developed in the heads of designers, but should be extracted from working code.  This guidance basically follows the YAGNI principle.

During a half-hour break, I caught up with /\/\o\/\/ again to ask him about PowerShell resources for developers.  He pointed me to  Windows PowerShell Programmer's Guide  Unfortunately, it is not currently available in a printable format, but this is an exciting find. 

My next session was Rapid Development of Data End-to-End Solutions and How They Work in an N-Tier Model given by Jay Schmelzer. This was the most code-intensive session I saw all week.  Jay dispensed with slides, and built a data access compenent and windows form to connect with Northwind.  Next he migrated his DAL to a webservice, and showed the changes required to maintain full functionality in the application.  Jay is very energetic, and this was a fantastic session.

My final session after lunch was Architecting Applications for a Service-Oriented World.  Beat Schwegler did an admirable job making SOA appear to be a real technology/architecture.  In contrast to the previous session, Beat used slides exclusively to walk us through a conceptual scenario focusing on maintaining existing IT systems investments, while adding additional value by connecting legacy systems through service contracts.  This is the first time someone has convinced me that SOA is more than just a marketing term from Microsoft.

Throughout the conference, the continuous themes were quality and value.  Microsoft is providing tools to insure quality in the software I produce, while it is up to me to insure that I am producing the right software.  If I build a quality product that doesn't meet the needs of the user, then I have not added any value.

++Alan
 Tuesday, 16 May 2006

PowerShell Script to Create a WorkItem



# 

Here is the PoSh script I demonstrated at the Atlanta Code Camp for creating a workitem in Team Foundation Server.  It is quite possible that there is a better way to load private assemblies into a PoSh session, but this works.

I did not run the script in my presentation, but pasted sections into the shell, to demonstrate how PoSh allows you to create objects from .NET types and interact with them at the command prompt.

##############################################################################
##
## Create-Workitem.ps1
##
## This script is converted from the C# Work Item Edit sample in the Visual
## Studio 2005 SDK.  I have ignored error checking, so you must have a valid server,
## with at least one team project.
##
## The purpose of this script is to demonstrate how a developer can use the Windows 
## PowerShell to automate tasks using private .NET assemblies.
## 
## In order to run this or any other PowerShell script, you will need to configure
## your PoSh environment to run scripts.  Type Help Set-ExecutionPolicy at a PoSh
## prompt to learn more.
## 
##############################################################################

$key = Get-ItemProperty HKLM:\SOFTWARE\Microsoft\VisualStudio\8.0

$dir = [string] (Get-ItemProperty $key.InstallDir)

$dir += "PrivateAssemblies\"

$lib = $dir + "Microsoft.TeamFoundation.WorkItemTracking.Client.dll"

[Reflection.Assembly]::LoadFrom($lib)

$lib = $dir + "Microsoft.TeamFoundation.Client.dll"

[Reflection.Assembly]::LoadFrom($lib)

"Please enter your Team Foundation Server Name:"
$server = [Console]::ReadLine()
$server = $server.Trim()

"Connecting to " + $server + "..."
$tfs = [Microsoft.TeamFoundation.Client.TeamFoundationServerFactory]::GetServer($server)

$type = [Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemStore]

$store = [Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemStore] $tfs.GetService($type)

$workItem = new-object Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItem($store.Projects[0].WorkItemTypes[0])

"Created a new work item of type " + $workItem.Type.Name

$workItem.Title = "Created by Windows PowerShell!"

$workItem.Save()

++Alan

PoSh | VSTS    Comments [0]
 Thursday, 11 May 2006

Speed Up Your PowerShell



# 

I've been having fun with the latest drop of PoSh.  I'll be showing a demo of how to manage workitems on Team Foundation Server with a PoSh script at Saturday's CodeCamp.

One annoyance with the current RC is that it is slow to start.  I saw a thread on the newsgroup about performance and found this nugget:

set-alias ngen C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ngen.exe
ls $pshome/*.dll |%{ngen install $_.fullname }

The ngen utility compiles .NET assemblies to native code.  Without this step, the PoSh process was performing a JIT compile on all the PoSh assemblies.  Apparently, this is supposed to happen at the end of installation, but doesn't as a result of a bug.  For now, this makes my play... er, work with PoSh even more fun.

++Alan

PoSh | Tools    Comments [0]
 Wednesday, 26 April 2006

Windows PowerShell



# 

According to this, PowerShell nee MSH nee Monad is on the verge of release.

This is exciting news for me because I spent this week learning the tool. I have had requests to make bulk updates to work items in Team Foundation Server. I decided to investigate MSH as a platform for creating custom scripts to fulfill this request.

Now that it is on the verge of release, I won't have to overcome resistance to deploying pre-release tools. Life is good.

++Alan

[UPDATE] Keith Hill suggests some new acronyms for the Windows PowerShell.  I vote for POSH.

"Oh the posh posh traveling life, the traveling life for me..."

PoSh | Programming | Tools | VSTS    Comments [0]