Cicero or Kikero?

I’m often curious about how people pronounce their names.

There is a scene from the 1939 version of Goodbye, Mr. Chips in which Robert Donat accedes to the growing trend to pronounce Latin according to scientific rather than poetic principles – Kikero, with a hard ‘c’ rather than a soft one.

The controversy over the conventional pronunciation of Latin is captured in this 1916 article from the New York Times in which a defender of the Italianized pronunciation frames it in terms of Germanic (for it was German philologists who researched and then championed the original pronunciation of Latin) scholarship versus (wer-sus) the pronunciation of the Roman Curia. 

“The Germans, representative of the real and uneffete Romans, have a passion for uniformity and discipline.  Why should two sounds of c be uttered in concillium?  The Latin consonants must march goosestep.  What has made France, England, Italy, decadent and degenerate?  Soften the sound of your c’s and g’s, and you soften the character of the people so abasing them.”

Sometimes, of course, people really don’t care how their names are pronounced.  In exceptional instances, however, there is always a chance that one risks giving offense – Fran-ken-STEEN, as Gene Wilder insisted, not Fran-ken-STAHYN.

As an opportunity to have dinner with Tim Heuer of the Microsoft Silverlight Team approached this week, the correct pronunciation of his name became a small source of anxiety.

When a colleague asked me about it, I suggested that it was pronounced like howitzer without the itz.

Immediately afterwards, I became concerned that it actually was pronounced in the German fashion, HOY-er.

It turned out that both are incorrect.  After consulting with a Microsoft Evangelist, Glen GOHR-dun,  I discovered that Tim’s name is pronounced HYEW-er.

Shawn Wildermuth called me out over the weekend for pronouncing Rocky Lhotka’s name with a long O rather than a short one.  Again the anxiety of pronunciation struck.  Rocky’s last name is actually pronounced LAHT-ka, like the character from Taxi.

Shawn’s last name, in turn, is pronounced with a short rather than a long U – as in MOTHER and not like VERMOUTH.  His first name is not Irish, but instead is derived from the Shawnee Indian nation – such strange things we discuss in the backrooms of conferences.

Since some Wintellect consultants were also with me lounging in the speaker’s room during the Silverlight Firestarter, I inquired into the pronunciation of Jeff Prosise’s name.  The I in his last name turns out to be long, while the stress is on the penultimate syllable: PROH-sahys, like precise but more emphatic.

Silverlight Resources

ATL-Silverlight-Firestarter-logo_resized

Today’s Silverlight Firestarter in Atlanta was a remarkable event due in large part to the remarkable audience.  We started off with about 110 attendees, and while some left throughout the day, just as many came in to replace them.  By my session, which was the last presentation of the Firestarter, the audience was still enthusiastic and responsive – really amazing considering they’d been receiving a massive Silverlight brain-dump for the past nine hours from some of the best Silverlight developers and architects in Atlanta.

As promised, I am posting the various websites I discussed during my presentation on the Silverlight Ecosystem – the combination of corporate and community resources that make up Silverlight.

Silverlight Control Suites:

The Silverlight Toolkit: http://silverlight.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=24246

SL Extensions and Silverlight Contrib: http://www.slextensions.net

Telerik: http://www.telerik.com/products/silverlight.aspx

Component Art: http://www.componentart.com/

ComponentOne: http://www.componentone.com/

Infragistics: http://www.infragistics.com/

Cellbi: http://www.cellbi.com/default.aspx

DevExpress: http://www.devexpress.com/

Divelements: http://www.divelements.co.uk/silverlight/

FarPoint: http://lab.fpoint.com/inputsilverlight/

Netika Tech: http://www.netikatech.com/products/toolkit

Intersoft: http://www.intersoftpt.com/

Vectorlight: http://www.vectorlight.net/controls.aspx

Visifire: http://visifire.com/

Xceed: http://xceed.com/Upload_Silverlight_Demo.html

 

Silverlight Book Recommendations:

Pro Silverlight 3 in C# – Matthew MacDonald (Great reference work)

Silverlight 2 in Action – Campbell & Stockton (Excellent beginner’s book)

Foundation Expression Blend 3 with Silverlight – Victor Gaudioso

Foundation Silverlight 3 Animation – Jeff Paries

Data-Driven Services with Silverlight 2 – John Papa

 

Silverlight Tutorials:

Channel 9

http://silverlight.net/learn/tutorials.aspx

 

Silverlight Blogs:

The Silverlight Geek (Jesse Liberty)

method ~ of ~ failed (Tim Heuer)

Brad Abrams

Shawn Wildermuth

Jeff Prosise

85 Turns (Corey Schuman)

Dan Wahlin

Adam Kinney

Charles Petzold

Page Brooks

Rob Zelt

 

Silverlight Forums:

http://silverlight.net/forums/ (You can usually get your SL questions answered within a day, if not within minutes, at the silverlight.net forums)

http://silverlight.net/community/communitygallery.aspx (An excellent place to look for some inspiration)

 

Free Silverlight Code:

http://www.codeplex.com/site/search?projectSearchText=silverlight

 

Silverlight Contests:

http://telerikwatch.com/2009/07/telerik-silverlight-contest-win-500.html (Due September 14th)

http://www.componentart.com/community/competition2009/ (Due September 22nd)

Between posts …

I had every intention of writing the sequel to Reporting Services and WCF, but life has caught up.

I’ve been busy working with Corey Schuman on throwing the Atlanta Silverlight Firestarter Event, for which I also need to finish practicing a short presentation on Silverlight resources. 

Besides that, I’ve also been working with several Atlanta software community people on organizing a Leading Edge Microsoft User Group.  The goal of the group is to cover the CTP drops and Microsoft Research bits that do not normally get covered in the standard user groups.  You can find our website here: www.alemug.net .

So it’s been a busy couple of weeks.  During that time, Philip Munz, Ioan Hudea, Joe Imad and Robert J. Smith have fed my zombie jones with a mathematical model of zombie outbreaks: http://www.mathstat.uottawa.ca/~rsmith/Zombies.pdf

I have every intention of continuing with the WCF article.  After that, I also intend to do a walkthrough of the steps required to build a WPF application using the MVVM pattern – I don’t think there are any breakdown articles on the web about this – followed by posts about MVVM in Silverlight and a comparison of various UI design patterns – MVVM, MVP (PV and SC), MVC.  Finally, I want to post about a dream (a vision?) I had about Martin Fowler in the year 2029.

Reporting Services and WCF

Ingredients: Visual Studio 2008, SSRS 2008, AdventureWorks2008

While stand alone *.rdlc reports allow one to use data objects as a data source, it would be convenient to be able to do the same thing using published reports.  The XML data source indirectly makes this possible by accepting a path to an *.asmx web service as a valid “connection string” value. 

There seems to be some confusion over whether this can be done with WCF Services as well.  The short answer is yes, as long as the WCF service endpoint appears as a typical web service.  In other words, it must use basicHttpBinding as its binding type.  On the client side, consequently, the reporting services data source must use integrated security (Windows Authentication) for its credential type. 

Given these strictures, if you already have web services exposed for your data, it should take little to no effort to consuming those WCF services from a report.  I will walk through some simple examples on how to do this.  Ultimately the complications are derived not from structuring the WCF service methods themselves, but rather in figuring out how to use the Query syntax that comes with reporting services – which basically serves as a declarative style for generating SOAP service calls.  This problem, it should be pointed out, is not peculiar to WCF services, but was already a road block in figuring out how to make reporting services talk to *.asmx web services.

In working through the details of making reporting services consume a WCF Service, I was greatly aided by two sources.  The first is Jesse Ezell’s blog which beautifully summarizes the steps required, although he makes the task seem rather harder than it actually is and almost convinced me to abandon the effort early on.  The second is an MSDN article written by Jonathan Heide that deals with the query syntax for using reporting services with XML data sources.  I highly recommend both.

The following walkthrough will introduce five services and five reports, each progressively more complicated.  All examples are included in the download linked at the top.

1. A Simple Service

The simplest meaningful service for reporting returns data without taking any parameters.  For this example, we will not implement our own message contract, although the next example will demonstrate some advantages to doing so.

The service method in this example returns an enumeration of Employee types.  Below is the Employee Data Contract and the Interface definition for the service method:

namespace MyReportingService
{
    [DataContract]
    public class Employee
    {
        [DataMember]
        public string FirstName { get; set; }
        [DataMember]
        public string MiddleName { get; set; }
        [DataMember]
        public string LastName { get; set; }
        [DataMember]
        public string JobTitle { get; set; }
        [DataMember]
        public string Email { get; set; }
        [DataMember]
        public int EmailPromotion { get; set; }
    }
}
namespace MyReportingService
{
    [ServiceContract]
    public interface IEmployeesService
    {
        [OperationContract]
        IEnumerable<Employee> GetAllEmployeesRPCStyle();
    }
}

In the actual implementation of the service method, I happen to be retrieving records from the AdventureWorks2008 database.  For our purposes, however, we now have everything we need with just the interface and the data contract to hook reporting services up to our WCF service.  Make sure the binding is set to basicHttpBinding as Visual Studio likes to default to wsHttpBinding when one creates a new service.

Make sure the service is running before continuing to the next step.  If the Reports project and the WCF project are in the same solution, the easiest way to do this is to right click on the service project and select Debug|Start new instance.

The first step in setting up a report that consumes a WCF service is to create an XML Data Source in Visual Studio.  When we do so, we will be prompted for the following information.  Be sure to set XML as the Type and enter the URI of the service as the Connection String:

datasource

We also will need to set the Credentials used for your data source.  As far as I know, web service calls through reporting services always requires that Windows Authentication be used, though perhaps a future release of SSRS will allow us to create a data source that talks to a secured service:

credentials

Having done that, we can now use the Report Wizard to create a new report.  On the first screen, set the data source we just created as the Shared Data Source for the report.

SetDataSource

The next screen, the query screen, is where we’ll be spending most of our time from now on.  Select the Query Builder… at the top of the query screen.  Using the query builder will allow us to test our XML query as we go along.  In the Query Builder window, choose Text as the Command type if it isn’t already selected.

The basic syntax for making a service call will include a Query tag with a nested Method, SoapAction, and ElementPath.

<Query>
<Method Name="GetAllEmployeesRPCStyle" Namespace="http://tempuri.org/"/>
<SoapAction>http://tempuri.org/IEmployeesService/GetAllEmployeesRPCStyle</SoapAction>
<ElementPath IgnoreNamespaces="true">*</ElementPath>
</Query>

There are some things worth noticing here. 

  • We are using the default namespace for our service.  If one overrides the default namespace, the custom namespace will need to go into the Method and the SoapAction.
  • The Method Name, for a service method that doesn’t use its own message contract, is just the name of the service method.
  • The SoapAction specifies the full path to the service, which includes the service namespace, the service name (we are using an interface for our *.svc service, so we want the name of the interface rather than the implementing class), and the service method.
  • ElementPath, which is a specialized version of XPath, parses the data returned from the call.  IgnoreNamespaces should be set to true to enable us to be ignorant of some of the specifics of the SOAP message that has been returned by the service.
  • On this first swipe we will use the “*” as a wildcard syntax to return any repeating data that is found in the result.

If we click on the red bang (or hit F5) the query will run and we can immediately see if the query is written correctly.  The query above will return the following data in the Query Builder:

query1

This is basically the data we want returned but it isn’t shaped quite right.  The “xmlns”, “a” and “i” columns are present because the enumeration we want is actually wrapped up in several other elements, each with attributes that show up in the flattened data.  To get rid of these, we need to specify more precisely the data we want in the ElementPath.

The enumeration of Employee types is wrapped in a Result element, which in return is wrapped in a Response element.  By convention, the names of these elements are based on the name of the service method like this: [ServiceMethodName]Response/[ServiceMethodName]Result.

Instead of simply wildcarding it, we can rewrite the ElementPath to fully specify the data we want:

<Query>
<Method Name="GetAllEmployeesRPCStyle" Namespace="http://tempuri.org/"/>
<SoapAction>http://tempuri.org/IEmployeesService/GetAllEmployeesRPCStyle</SoapAction>
<ElementPath IgnoreNamespaces="true">
GetAllEmployeesRPCStyleResponse/GetAllEmployeesRPCStyleResult/Employee
</ElementPath>
</Query>

This query actually still returns the same data in the image above, but it puts in a good position to start shaping the data the way we want.  Squiggly brackets can be appended to any element in our ElementPath in order to specify the attributes we want to be displayed.   In this case, however, we will use empty squiggly brackets to indicate that we do not want any attributes to be returned for our wrapper elements.  The following ElementPath:

<ElementPath IgnoreNamespaces="true">
GetAllEmployeesRPCStyleResponse{}/GetAllEmployeesRPCStyleResult{}/Employee
</ElementPath>

will return us the following shaped result:

query2

This gets us closer to the shape we want.  You may notice, however, that the columns are in the wrong order.  To be more precise, they are in alphabetical order, which may not be exactly what we want.  There are two ways to fix this.  First, in the Data Contract for the Employee type, we can set a particular order for the Employee properties to be rendered in the returned SOAP message.  This is done by using the Order property off of the DataMember attribute of our properties:

 

[DataMember(Order = 0)]
public string FirstName { get; set; }
[DataMember(Order = 1)]
public string MiddleName { get; set; }
[DataMember(Order = 2)]
public string LastName { get; set; }
[DataMember(Order = 3)]
public string JobTitle { get; set; }
[DataMember(Order = 4)]
public string Email { get; set; }
[DataMember(Order = 5)]
public int EmailPromotion { get; set; }

While this is typically a good idea for versioning Data Contracts, there is a simpler way to order the columns using, once again, the squiggly brackets:

<ElementPath IgnoreNamespaces="true">
GetAllEmployeesRPCStyleResponse{}/GetAllEmployeesRPCStyleResult{}/
Employee{FirstName, MiddleName, LastName, JobTitle,Email, EmailPromotion}
</ElementPath>

There is a final thing we will want to do with out ElementPath.  The underlying type for EmailPromotion is actually an Integer.  If we use the ElementPath as it currently stands, however, EmailPromotion will be used as a String (the default type) when it is consumed by the report.  Sometimes this doesn’t matter.  If we wanted to aggregate on EmailPromotion, however, in order to do sum values or average values, we would have to convert the value of EmailPromotion in an expression to make it possible.

Fortunately, we can also specify the type of each Employee column in the ElementPath.  Return types are indicated by placing the Visual Basic type name – Short, Integer, Long, Decimal, Single, Double, Date, String, Boolean, etc – between ellipses after the column name.

I should point out that since we are simply parsing XML using the ElementPath syntax, and since the SOAP message tells us nothing about the underlying types of the data that is returned, the actual property types of the Employee Data Contract are in effect irrelevant as far as reporting services is concerned.  They could all be typed as objects and it would not matter to the design of the report.  The typing occurs in the ElementPath and nowhere else.

The query for our report should now look like this:

<Query>
<Method Name="GetAllEmployeesRPCStyle" Namespace="http://tempuri.org/"/>
<SoapAction>http://tempuri.org/IEmployeesService/GetAllEmployeesRPCStyle</SoapAction>
<ElementPath IgnoreNamespaces="true">
GetAllEmployeesRPCStyleResponse{}/GetAllEmployeesRPCStyleResult{}/
Employee{FirstName, MiddleName, LastName, JobTitle,Email, EmailPromotion(integer)}
</ElementPath>
</Query>

and our data will look like this:

query3

I will continue this series by talking about WCF Message Contracts and how to pass parameters in the next post.

Mike Strobel’s WPF Blog

I’ve been working with Mike Strobel for several weeks now at my current client.  He is an amazingly able WPF developer who has been plugging away at the technology since the days when we were still calling it Avalon (I must say, I really prefer the Microsoft code-names for their technologies to the utilitarian acronyms they eventually morph into – for instance, isn’t the “Atlas” moniker much superior to “ASP.NET AJAX”).

A day doesn’t go by that I don’t look at his code and have a small mental epiphany usually accompanied by the mumbled statement “I didn’t know you could do that with WPF.…”

After a bit of encouragement Mike has finally started blogging.  The first post is an explication of his history with WPF and the various ways he is currently using it.  One of the interesting things he reveals is that he not only is doing both game development and enterprise development using WPF, but that he is able to apply techniques he discovers (invents?) in one domain to the other.

You can find Mike’s blog here: http://codedreams.blogspot.com .

I hope that over the next few weeks you will be as blown away as I have been with the remarkable things he has been able to do on the WPF platform.

A UI Design Pattern Love Song

Much has been written about the MVC but never, I believe, a love song … so here you go: a love song to the Model-View-Controller. 

This small experiment in erotic didacticism is sung to Some Enchanted Evening from Rogers and Hammerstein’s South Pacific.  I have embedded a video of Ezio Pinza and Mary Martin singing the original in case you need some help with the tune.

Some enchanted evening
You may see a pattern,
you may see a pattern
Across a crowded room
And somehow you know,
You know even then
That somewhere you’ll see it
Again and again.

Model-View-Controller
Someone may be coding
You may hear him coding
Across a crowded room
And night after night,
As strange as it seems
The shape of that pattern
Will drift through your dreams.

Who can explain it?
Who can tell you why?
Fools give you reasons,
Wise men never try.

Model-View-Controller
First it has a model,
Yes it has a model
To represent your store,
It’s your data store
Your persistence layer
Where all of your data
Is written and saved.

Model-View-Controller
Has a presentation,
And that presentation
Of state is called a View.
A view of your store
On your GUI layer
It’s bound to your model
And registers change.

Model-View-Controller
Third has a controller
That facilitates
Changes to model state
On your model layer
In response to acts
That come from your user
With keyboard or mouse.

Once you understand it,
Never let it go.
Once you understand it,
Never let it go!

Synchronizing Style Hierarchies with Control Hierarchies in WPF

WPF provides two ways to apply styles to control elements: by name and by type.  In the typical named style implementation, one declares both the name by which a style can be referenced as well as the control type to which it can be applied.  For instance, a style declaration for a ComboBox would look like this:

<Style x:Key="ComboBoxStyle" TargetType="ComboBox">
    ...
</Style>

When styles are applied in this way, the underlying WPF rendering mechanism understands type hierarchies.  Consequently, this style could also be written with a TargetType higher up in the Control type hierarchy and still work:

<Style x:Key="ComboBoxStyle" TargetType="Control">
   ...
</Style>

This is a handy feature when you want to build a custom control but want to preserve your styles.  For instance, the ComboBox control has no built-in ability to trigger commands.  If you want to use MVVM, however, this is quite a shortcoming.  You can overcome this problem by building a custom control based on the ComboBox type and implementing the ICommandSource interface to pick up the SelectionChanged event:

class CustomComboBox: ComboBox, ICommandSource
{
     ...
}

Since my CustomComboBox inherits from the WPF ComboBox, the named style I use with a TargetType of ComboBox will automatically be applied to it and the following XAML:

<Window x:Class="SampleWPFProject.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:sys="clr-namespace:System;assembly=System"
    xmlns:custom="clr-namespace:SampleWPFProject"
    Title="Window1" Height="300" Width="300">
<Grid>
    <Grid.RowDefinitions>
        <RowDefinition Height="25"/>
        <RowDefinition Height="25"/>
    </Grid.RowDefinitions>
    <StackPanel Grid.Row="0" Name="stackPanel1" Orientation="Horizontal">
        <TextBlock Margin="0,0,10,0" Width="60">Employees</TextBlock>
        <ComboBox x:Name="cbEmployees" SelectedIndex="0" Width="200" 
                  Style="{StaticResource ComboBoxStyle}">
            <ComboBoxItem>John Adams</ComboBoxItem>
            <ComboBoxItem>Ben Franklin</ComboBoxItem>
            <ComboBoxItem>Pat Henry</ComboBoxItem>
        </ComboBox>
    </StackPanel>
    <StackPanel Grid.Row="1" Name="stackPanel2" Orientation="Horizontal">
        <TextBlock Margin="0,0,10,0" Width="60">Tasks:</TextBlock>
        <custom:CustomComboBox x:Name="cbTasks" SelectedIndex="0" Width="200" 
                   Style="{StaticResource ComboBoxStyle}">
            <ComboBoxItem>Write Constitution</ComboBoxItem>
            <ComboBoxItem>Write Declaration</ComboBoxItem>
            <ComboBoxItem>Go for a ride</ComboBoxItem>
        </custom:CustomComboBox>
    </StackPanel>
</Grid>
</Window>

will fortuitously render itself like this, with the nice curvy boarders specified in my “ComboBoxStyle” style definition:

styleSample

But what if I want to apply my custom style arbitrarily to all ComboBoxes in my application?  This is where typed styles are very handy.

I can change the “key” element of the ComboBoxStyle to apply it generically to all ComboBoxes like this:

<Style x:Key="{x:Type ComboBox}" TargetType="ComboBox">
   ...
</Style>

Inside my XAML, I would simply remove the reference to the named style:

<ComboBox x:Name="cbEmployees" SelectedIndex="0" Width="200">
   ...
<custom:CustomComboBox x:Name="cbTasks" SelectedIndex="0" Width="200">

Unfortunately, the typed style does not understand that my CustomComboBox inherits from the ComboBox type, and the rendered window looks like this, reverting to the default ComboBox styling for my custom class:

 styleExample2

I could simply copy the entire original style and create a new one that specifies the CustomComboBox as the key, instead.  There is a shorter way, however.  I can take advantage of the BasedOn attribute of the style resource.  Rather than copy the entire style, I will create a new style based the original style and set the key to our custom type:

<Style x:Key="{x:Type ComboBox}" TargetType="ComboBox">
   ...
</Style>

<Style BasedOn="{StaticResource {x:Type ComboBox}}"  
       x:Key="{x:Type custom:CustomComboBox}" 
       TargetType="ComboBox"/>

Typically the BasedOn attribute is used to extend a base style with certain changes: for instance, off of a base style that sets  Button backgrounds to blue, one might want to create another that overrides the background color and sets it to orange.

This example shows that it can be used in a rather different way, however, to take a pre-existing typed style and apply it to a different type.  In this particular case, it is being used to align custom styles that are part of an inheritance hierarchy with custom controls that are part of a related type hierarchy.

Should it become necessary to extend the CustomComboBox control with a new custom control, in turn, one should be prepared to similarly extend the style hierarchy using the BasedOn attribute in order to maintain synchronization between one’s presentation and one’s functionality.

UI Design Pattern Resources

knitting

I had a great time at Codestock this year.  It wasn’t the pot-smoking, free-loving, mind-altering tribal experience I was afraid of and I didn’t see a single guitar the entire time – though I did talk with one guitar player.

The organizers – Michael Neel, Alan Stevens and Wally McClure — did a fantastic job and the Knoxville community is quite amazing and enthusiastic.  I also got to meet many people I had previously only known by reputation.

I presented on “The Uses and Abuses of UI Design Patterns” on Saturday afternoon.  I wanted to build out some examples of using a modified MV-VM pattern in WinForms and ASP.NET before publishing the code samples, but wanted to make sure I published out the references from the slide deck.

The point of the references is that while UI design patterns are all plagued by a tendency to have fuzzy boundaries – that is, it can be difficult to compare patterns between different technologies and sometimes can even be difficult to distinguish patterns used in one technology – there is still a paper trail on the Internet that give us clues as to where the design patterns (MVC, MVC Model 2, MVP, SVC, PV, PM, MVVM) came from and how they were originally intended to be used.

In general, the Supervising Controller and Passive View patterns are the best defined, while MVC is perhaps the least well defined.  MV-VM, on the other hand, has some of the best examples on usage – not least because it is so tightly associated with WPF.

1988 – MVC: Journal of Object Oriented Programming Vol 1 Issue 3 http://portal.acm.org/citation.cfm?id=50759&dl=GUIDE&coll=GUIDE&CFID=41635617&CFTOKEN=20661505

1997-99 – MVC Model 2: Java Sun JSP Architecture http://java.sun.com/blueprints/guidelines/…/application_scenarios/index.html

2004 – MVP: Martin Fowler  http://martinfowler.com/eaaDev/uiArchs.html

2004 – Presenter Model  http://martinfowler.com/eaaDev/PresentationModel.html

2006 – Passive View and Supervising Controller: Martin Fowler http://martinfowler.com/eaaDev/ModelViewPresenter.html

2005-09 – MVVM: John Gossman http://blogs.msdn.com/johngossman/archive/2005/10/08/478683.aspx

MVVM: Josh Smith  http://msdn.microsoft.com/en-us/magazine/dd419663.aspx

An additional resource is this site http://c2.com/cgi/wiki?ModelViewControllerHistory from which we learn that the first MVC pattern can be attributed to Trygve Reenskaug sometime in the 70’s.

Perhaps the most authoritative source for the origins of the MVMV pattern, in turn, comes from the WPF MVVM toolkit (available on Codeplex) where we are told:

Model-View-ViewModel (MVVM) is a derivative of MVC that takes advantage of particular strengths of the Windows Presentation Foundation (WPF) architecture to separate the Model and the View by introducing an abstract layer between them: a “Model of the View,” or ViewModel. The origins of this pattern are obscure, but it probably derives from the Smalltalk ApplicationModel pattern, as does the PresentationModel pattern described by Martin Fowler. It was adapted for WPF use by the Expression team as they developed version 1 of Blend. Without the WPF-specific aspects, the Model-View-ViewModel pattern is identical with PresentationModel.

The Hazards of Love in Atlanta

On Wednesday, June 3rd, The Decemberists performed at the Tabernacle in Atlanta.  It’s taken me about the intervening two weeks to fully digest it all.

My friend and colleague, Tim Price-Williams, is a big fan of the Tabernacle and drew out a diagram for me and my wife on where to sit and how to get those seats.  First, we needed to arrive two hours before the doors opened at 7.  Then we were to sit outside the left (not the right, or the far right VIP entrance) doors.  As the doors opened, we needed to proceed to the left and up the stairs to the first balcony.  Tim drew a map of the second balcony and then pointed out the four seats he deemed acceptable, just to the left and the right of center stage and flushed against the forward railing.  Wait an hour for the opening band.  Then wait another hour for the main show.

We messed up Tim’s well laid plans from the get go when I forgot to pick up the baby sitter on the way home from work.  After that we were stuck in remarkably heavy traffic and didn’t find parking until about 6 o’clock.  As we waited in line I made a quick trip across the street to pick up a chicken sandwich at Ted’s Montana Grill for dinner.  I’ve been habituated to fast-food chicken sandwiches for years and was pleasantly surprised to find that the basic recipe can indeed be improved upon.  The line started moving at 6:45 so Tamara and I had to eat quickly.

This is where Tim’s advice came in very handy.  He recommended that we each have our tickets in our hands to be scanned – if one of us fell along the way the other could continue on to the prized seats on the balcony.  Everyone else apparently wanted to stand in front of the stage, so we had no problem getting to the second balcony (we didn’t even realize that there was a first balcony above us) and managed to get two seats a row back from the ones we had coveted. 

The opening band was Blind Pilot (we joked that they were composed of the injured members of Stone Temple Pilots) but it turned out that they are another band from the pacific northwest with an eclectic instrumentation and a folksy/rock feel.  They were really good.  But we were there to hear The Hazards of Love.

The Hazards of Love is a concept album by The Decemberists.  Based on an apparently original Welsh mythology cycle, it was written by lead singer Colin Meloy while in Paris.  It’s received some mixed reviews while the standout songs have been The Rake’s Song and The Wanting Comes in Waves.  Part of the difficulty follows from trying to understand what the songs are about, which is particularly difficult for me since I generally don’t hear lyrics.  Tamara has made some progress in untangling the characters and the events of the songs, however, and during the break between Blind Pilots and The Decemberists she explained quite a bit of it to me.

The Tabernacle, by the way, is a renovated classic movie theater that looks much better with the lights out than with them on.  It is an amazing venue.  The backdrop for the show – gigantic gauze sheets hanging from the ceiling – along with impressive lighting made it even more so.

We didn’t know exactly what to expect since concept albums are typically something done in a studio.  We thought that this would be a modified presentation of some highlights from the album.  Instead it was a full performance of Hazards of Love straight through and faultless.

As the performance progressed, I came to realize that I had fundamentally misunderstood the relationship between the album and the concert.  Normally a concert tour is meant to reproduce an album for fans.  In this case, I slowly realized, the album is just a memento of the concert itself.  I don’t go to that many rock concerts, so it doesn’t mean much when I say it was the best one I’ve seen.  It was, nevertheless, an event that has left a deep impression on me and still stays with me after these weeks.

The core members of The Decemberists were dressed in formal suits for the performance of Hazards.  Shara Worden and Becky Stark, who sing on the album as the Forest Queen and the heroine Margaret, respectively, were dressed in renaissance fair costumes appropriate to the theme.  Shara Worden has the attitude of Joan Jett and the voice of Grace Slick.  Becky Stark was simply ethereal waving her arms about like Elfine Starkadder the whole time.

Again, I have trouble what actually happened during the performance of Hazards itself.  There are large portions of it I can’t even quite remember, and all I have is the strong impression that something amazing occurred.

I do remember that after The Decemberists, Ms. Worden and Ms. Stark finished with Hazards of Love, and after a half-hour intermission, The Decemberists came back out and performed some songs from their previous four albums.  Then Shara Warden and Becky Stark closed the show with a cover of Heart’s “Crazy On You” which I still can’t get out of my head.  For an encore, Colin Meloy constructed a story about the building of the trans-American railway with audience participation while the rest of The Decemberist led a conga-line through the hall.  I also vaguely recall singing Sixteen Military Wives as a round with the floor, the first balcony and the second balcony performing the parts.  The second balcony was clearly the best.

On the drive home I fell into a melancholic mood; I had the sense that some part of me had been sleeping for a long time and that after waking it up I had left it behind at the Tabernacle.  I now find myself replaying The Hazards of Love again and again on my iPod trying to recapture how that lovely night felt.