Diary of a trip to the UK and Ireland – Thanks for all the fish

This is the penultimate entry in my on-going diary, a 90 second recording, in which I take a moment to thank everyone and capture for a good laugh,  my  absurd tendency to unconsciously modify the way I speak,  wherever I go.

[This post is just one line, offering a link to the recording]

Posted in Community, z Silverlight Archives | Tagged , | 1 Comment

Help Wanted

I’m hoping to find volunteers to help me catalog and create a comprehensive, up to date guide to Silverlight resources.

Specifically, I’m hoping you’ll take on the task of itemizing resources  for one of the following areas

  • iStock_SurveyXSmallGetting Started With Silverlight
  • Transitioning to Silverlight 4
  • Forms, Controls and Events
  • Displaying Data
  • Graphics and Animation (and the VSM)
  • Understanding Silverlight Internals (e.g, the Property System)
  • Silverlight & Windows Phone 7
  • WCF RIA Services
  • MVVM
  • MEF

It is my hope that each volunteer will be able to list all the resources you can find for one of these areas, and mark each resource by Source, Type and Status:

Continue reading

Posted in Community, z Silverlight Archives | Tagged , | 4 Comments

Diary of a trip to the UK and Ireland – Pain in the Ash

Dateline 21-April-2010 St. Andrews Scotland

The User Group meeting in Dundee (“Silverlight From Zero”) and in the shockingly beautiful city of Edinburgh (“Silverlight LOB Applications Development with MVVM and TDD”) both went very well.  The turnout was good at Dundee and extraordinary in Edinburgh, with a very warm reception in both cases.

It turned out that my very nice if somewhat small hotel in Dundee had no booking for me on  the 19th or 20th….

Continue reading

Posted in Community | Tagged , | Comments Off on Diary of a trip to the UK and Ireland – Pain in the Ash

Diary of a trip to the UK and Ireland – User Groups

Dateline: Newcastle Upon Tyne, 17-April  09:44 BST

Another terrific experience last night, speaking at a room in Newcastle University to a group of professional and intrepid coders. I’m told that setting a meeting on Friday night is a recipe for talking to an empty room, so I’m very grateful to the throngs (okay, the small gathering) that showed up for Silverlight, HVP, Test Driven Development, MVVM and most important, pizza and American beer.

Continue reading

Posted in Community | Tagged | 8 Comments

Diary of a trip to the UK and Ireland – Continued

Dateline Hetton, near Skipton.

Kings College The presentation in Cambridge was great fun, preceded by a quick walking tour with Rachel Hawley (who, it turns out, I’ve known thrice without understanding she was all the same person!  She was involved in hiring me to write a (mostly) political column in 2006/2007 for Simple Talk, then again in helping me with CodeRush and finally with arranging the Cambridge part of my trip, not least acting as tour-guide.

Continue reading

Posted in Community | Tagged | 6 Comments

Diary of a trip to the UK & Ireland – Day 3

Dateline London 14-April 2010

MagicRoundaboutYesterday (Tuesday) was terrific.  The drive from Bristol to London was punctuated by a quick side-trip to  drive through the Magic Roundabout (you didn’t think I could resist, did you?)  It was brilliant.  You can go all around, but you don’t, and it is not at all confusing or difficult. It is very straightforward.  First I drive from the entry at the bottom of the map to the first exit (pointing directly to the left).  Then I reentered and cut across the center to go out M4, which I realized later is the yellow arrows in the illustration in yesterday’s post.

Then, on to London. Now, I drive in Boston and have been a cabbie in NY, but nothing quite prepared me for London, downtown, rush hour.  I opted to put the car in a car park and walk around, but the spots were fairly tiny (of course, right after passing up one spot as too small, I watched a woman younger than my daughter effortlessly back into that very spot in her minivan!)

Continue reading

Posted in Community | Tagged , , | 8 Comments

Diary of a trip to the UK & Ireland – Day 2

A Massachusetts Yankee in Queen Elizabeth’s country.  It will take a very (very) long time for me to be able to walk up to a woman I don’t know (such as at a hotel or in a restaurant) and say “Excuse me, can you tell me where I find the toilet?”  Unless Guy Smith-Ferrier is winding me up, that is very much the normal way to ask, and no one things a thing about it.  He seemed quite surprised that I’d have any hesitation!

Second, all in all, the traffic engineering here is far superior to the States.  The bad news, and I can’t imagine the reason, is that they don’ have left-on-red (in all of the US except New York City, if you come to a red light and you are making a right turn, you may come to a full  stop and then if it is safe, you may continue.)

Continue reading

Posted in Community | Tagged | 6 Comments

Diary of a trip to the UK & Ireland

I’ve been looking forward to this trip to the UK & Ireland for months, and I am extremely happy to be here.  I will write and speak about all of this from the “Microsoft Community” perspective , but this blog post is a personal, and on going, diary of an American stepping through the looking glass.

Now, I’ve been here before (England in 1972, England, Scotland and Wales in 1976, England and Wales in 1985). Ah, I was so much older then, I’m younger than that now.

Driving

I did drive here in 72 and 76, so of course I didn’t hesitate to rent a car, despite the rather alarmed tone in Guy Smith-Ferrier’s voice when he asked, thrice, if I had driven on the left before. 

On the other hand, driving a stick for the first time in 10 years, with the steering wheel in the passenger’s seat, driving on the left, after flying across five time zones, in downtown London, at night,  may not have been the best plan. 

Most of the time, it it really isn’t a problem, everything more or less makes sense. But  the brain begins to overload at 60 mph when it is trying to assimilate the basic rules  like “keep left except to pass,” and you are seeing signs that have somehow gone through the looking glass (is that 60 in a circle the speed limit?), road markings that don’t quite make sense (what, for God’s sake is a blue rectangle with a single white slash?) and you are seeing some of the most beautiful gothic buildings juxtaposed with electronic adverts for Wired Magazine.  It all goes by in a flash, and while, shockingly, there are no flashing blue lights in the rear view,  it is clear you’re not in Kansas anymore.

Then you get off the M-way, and soon  a bus is heading at you in the dark, you have to make a right turn, he’s on the wrong side,  and the GPS is barking commands like “make a right here damn it!”

More soon…

(By the way, the elevators here are zero-based; a C programmer’s world if ever there was one)

This work is licensed under a Creative Commons license.
Posted in Community | Tagged | Comments Off on Diary of a trip to the UK & Ireland

New Video Series – Getting Started With Silverlight

I’ve begun a new series of videos on Silverlight that begins with installation and creating a simple grid with two controls, and that will, over time, cover an entire course of Silverlight applications programming.

Each video stands on its own, but my hope is that put together they will provide a complete survey of Silverlight programming.  The first two videos in the series are Getting Started With Silverlight and Adding Controls To A Silverlight Application.

twitter_48 I will tweet about each video in the series as it is released, and all of them will be listed here.

Note, the new Twitter bird is from the generous folks at Function Design.

This work is licensed under a Creative Commons license.
Posted in z Silverlight Archives | Tagged , , | Comments Off on New Video Series – Getting Started With Silverlight

An Annotated Line of Business Application

MiniTutorialLogo

The Silverlight HyperVideo Player has met with strong support and interest. This mini-tutorial is the first in a series that will walk through the design and delivery of this project.

This series will pretend that the design existed before we began coding, and will not take you through its evolution over the months between December 2009 and March 2010. In short, this series is a “drop-line” exercise highlighting how the program works with a focus on teasing out general principles of creating mid-sized line of business Silverlight applications.

Understanding the Silverlight HVP

If a picture is worth a thousand words, a video must be worth an order of magnitude more. This video, created as part of the HVP sample set, explains the concepts behind the HVP.

Design Guidelines

I’m a big believer in diving right into the code, but I did want to mention just a few of the design/coding guidelines I imposed on myself when writing this, and we can explore their motivation, implications and outcome as we go:

Overarching message of the code: Silverlight is an application development framework: treat it like one.

  • Write Clean Code
  • Use Test Driven Development
  • Let the Design Emerge
  • Understand that the first version is just the launching point for subsequent versions
  • Community involvement (including design and coding) should grow over time
  • When possible, illustrate “best practices”

Getting Started

The premise of agile programming dove-tails neatly with the approach I’ve been advocating for two decades: get it working and keep it working.  I can’t claim any high minded values behind this; it is just what works for me. Worse, it is what I end up doing, even when I’m supposed to be doing design-first.  I simply can’t design in a vacuum and I get very tired and crabby when I do try to design in advance because it doesn’t work. It never works because

  • I learn more about how I want the design to be as I write code
  • Requirements change
  • The bigger the design, the more likely I am to get it wrong
  • Requirements change
  • The bigger the design, the more reluctant I am to change it
  • And requirements change

The old argument was “don’t paint yourself into a corner.”  On reflection, what I found was I was always painting myself into corners, but if I only painted for a few minutes before fixing the problem I was a lot better off than if I’d spent all day at it.

Emerging Design

I love the term emerging design because it sounds so much better than “figure it out as you go.”

We’ll come back to the most effective technique I know of for making all this work in large complex applications when we talk later about Test Driven Design, but let’s get started.  Here is what I know:

  • I want the program to be created from independent components, and MEF will provide a great solution to that.  MEF is non-trivial, however and I don’t want to deal with anything that complex until I have something working.
  • Creating a media player is lots of fun, lots of folks have done it, most of the implementations suck. There are Microsoft folks working on an open source solution (The Silverlight Media Framework that they, for some bizarre reason, refer to as the “Smurf”) that not only doesn’t suck (except its acronym) but is really good.  Let’s use that.
  • MVVM is hot stuff.  Moreover, it’s hot stuff for all the right reasons. Let’s use that.

The First Thing To Get Working

One of the premises of “Emerging Design” that I like  a lot is this: don’t design anything until you’re going to implement it.  Do not say to yourself “I know I’m going to need this, so let me put in all the hooks I’ll need.”  Reason: when you predict what you’ll need, you are usually wrong. Work done today does not save you work later, but work not done today may never need to be done at all.

In that spirit, the first thing to do is to create an application that has the Silverlight Media Framework player in it, and get that working in a very simple page.

I’m going to re-create the source bit by bit, and make that incremental source available with each mini-tutorial (see bottom of this posting)  but please understand that these are not the versions that I created the first time. I’ve condensed the process here to facilitate focusing on what matters, and to reduce confusion. You can find all my dead-ends, mistakes and changes of heart enshrined in the source code history here.

Since adding a SMF is a well documented and short set of steps, I’ll just take my lead from the SMF documentation and create a simple Silverlight Application named HVPT1 (Tutorial 1). That will create two projects: HVPT1 and HVPT1.web.  The startup project will be HVPT1.web, the startup page will be HVPT1TestPage.aspx and the first Silverlight page will be in the HVPT1 (client side) project, the file mainpage.xaml

Getting the SMurF Libraries

For the SMF to work, we need the four SMF libraries, which can be downloaded from here, as well as the IIS Smooth Streaming Player Development Kit which is available here.  The Smooth Streaming Player Development Kit (SSPDK) is unpacked by double clicking on the downloaded .exe.  Place all five DLLs (the four from the SMF and the unpacked SSPDK into the same directory.

In HVPT1 add a reference to all the DLLs except SilverlightMediaFramework.data.dll and then replace the header of HVPT1.MainPage.xaml with the following:

<UserControl x:Class="HVPT1.MainPage"
    xmlns:p="clr-namespace:Microsoft.SilverlightMediaFramework.Player;assembly=Microsoft.SilverlightMediaFramework.Player"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignWidth="640"
    d:DesignHeight="480">

Note that the second line declares a namespace alias “p” that refers to the Microsoft.SilvelrightMediaFramework.Player.  You can now declare the player and its source, which must be a streaming media file. Here’s the entire .xaml file:

<UserControl x:Class="HVPT1.MainPage"
    xmlns:p="clr-namespace:Microsoft.SilverlightMediaFramework.Player;assembly=Microsoft.SilverlightMediaFramework.Player"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignWidth="640"
    d:DesignHeight="480">

    <Grid
        x:Name="LayoutRoot">
        <p:Player>
            <p:CoreSmoothStreamingMediaElement
                AutoPlay="True"
                SmoothStreamingSource="http://video3.smoothhd.com.edgesuite.net/ondemand/Big%20Buck%20Bunny%20Adaptive.ism/Manifest" />
        </p:Player>
    </Grid>

</UserControl>

Build the application and watch the streaming movie. There is nothing more satisfying than getting something (anything) working!

SMurF

SaveBlue


Download the source code

This work is licensed under a Creative Commons license.
Posted in HyperVideo Player, Mini-Tutorial | Tagged , | 5 Comments

Silverlight HVP on Silverlight TV

JLSLTV2

 

The Silverlight HyperVideo Project has made two guest appearances on Silverlight TV. 

In the first, I talk with John Papa about the project itself and how it has evolved.

Then, during Mix, Tim Heuer and I sat down with John to discuss What’s New In Silverlight 4, and I managed to sneak in a few comments about the HVP as well.

Silverlight TV has numerous great interviews, and is quickly becoming a valued asset throughout the Silverlight community. 

SilverlightTV_100px

Tens of thousands of people view each episode. Check it out here.

Then take a look at John Papa’s site as well.

Then come back here, because the last thing I want is for you to decide you like JP so much you stop visiting. Next thing you know, I’m sitting in the dark.

 

This work is licensed under a Creative Commons license.
Posted in HyperVideo Player | Tagged , , | 2 Comments

WCF Ria Services For Real

MiniTutorialLogo

In my previous post I discussed creating the database and tables for the Silverlight HVP configuration data.  All that was great, and worked just dandy until it was time to get the data from the database server to the application running on the client.

“But,” I thought, “How hard can it be?”  I’ve done a few mini-tutorials… should be straight-forward… And it was… sorta.

Continue reading

Posted in z Silverlight Archives | Tagged , | 6 Comments