# Monday, 13 July 2009

Episode 33

In this interview, Corey Schuman describes Silverlight. He discusses the difference between Silverlight and other technologies, such as Windows forms, ASP.Net and Flash.

10 mins, 30 secs

Monday, 13 July 2009 05:50:55 (GMT Daylight Time, UTC+01:00)
# Wednesday, 08 July 2009

Episode 32

In this video, author and speaker Josef Finsel describes moving databases to "The Cloud" using Azure Table storage.  You can read more of his thoughts on the subject at http://azuredba.com/blog.aspx

11 mins, 9 secs

Wednesday, 08 July 2009 12:46:42 (GMT Daylight Time, UTC+01:00)
# Monday, 06 July 2009

Episode 31

In this interview, Jim Wooley discusses the relevance of stored procedures and best practices for accessing a database.

13 mins, 32 secs

Monday, 06 July 2009 00:16:55 (GMT Daylight Time, UTC+01:00)
# Saturday, 04 July 2009

Contribupendence Day is the brainchild of Microsoft Developer Evangelist Jeff Blankenburg.  He came up with the idea a year ago and this is the second year in which I have participated.

Jeff pointed out that most of us sometimes get to work with outstanding people (true for me) and that we often don't take the time to recognize the contributions of those people (also true for me). To correct this, he deemed July 3 "Contribupendence Day" - a day in which we can contribute to the independence from mediocrity of outstanding colleagues.  

Jeff suggested that we do this by choosing a few excellent past or present co-workers and writing a recommendation on a networking site. I chose four former co-workers and wrote a recommendation for each on LinkedIn. I won't list their names here, but you are welcome to view my LinkedIn profile and see what I wrote.

I don't expect anything in return but I didn't expect anything last year and I ended up reaping benefits anyway.  I wrote a number of recommendations last July in response to Jeff's call. A couple months later, I found myself out of work and looking for a job. One strategy in my job search was to request LinkedIn recommendations from former co-workers. I believe that I received better responses from these requests because I had so freely given recommendations earlier in the year. I was touched and delighted by the outpourings of those willing to write nice things about me in a public forum. During my job search, several interviewers told me they read my LinkedIn profile and were impressed with the quantity and quality of the recommendations I received.

So take a few minutes today to speak honestly about those who have impressed you. You never know when or how the favor will be returned.

Saturday, 04 July 2009 00:44:26 (GMT Daylight Time, UTC+01:00)
# Friday, 03 July 2009

CodeStock 2009 is in the books. I didn't attend last year, but this year, the Knoxville developer conference expanded to two days and more than doubled the number of attendees.

This conferences ranks high on the important value-per-dollar scale. As a speaker, the $25 conference fee was waived; I shared a ride to Tennessee with five other attendees; and I used the last of my Marriott points for the hotel. All told, I had 2 days of great content for under a hundred bucks in meals and gas. By far, my biggest cost was the two vacation days I had to spend in order to attend.

I saw some very good sessions and met a lot of bright people. In one spontaneous open space, I solicited feedback on the layout of my blog. As a result, I've removed some unneeded links, moved the RSS feed to the top of the main page and enabled Google analytics.

I even had a chance to talk with CodeStock organizer Mike Neel near the end of the conference.

I presented a session on Microsoft Managed Extensibility Framework. It was well-received and many in the audience were actively engaged, asking questions that indicated they grasped all the concepts I was trying to communicate. 

You can download the slides for my MEF presentation from the link below.

The content and samples of this presentation are covered in the articles below.

Friday, 03 July 2009 13:59:07 (GMT Daylight Time, UTC+01:00)
# Wednesday, 01 July 2009

Episode 30

This is only the second year of CodeStock but Mike Neel managed to expand the Knoxville conference to a 2-day event and more than double attendance to 376.  In this interview, Mike talks about the conference and the developer community in the Heartland region.

17 mins, 15 secs

Wednesday, 01 July 2009 12:32:53 (GMT Daylight Time, UTC+01:00)
# Wednesday, 24 June 2009

I'm really looking forward to attending the CodeStock conference in Knoxville, TN this weekend.

The speaker lineup looks amazing (not just because I'm in it) and the two-day format should give me time to talk with a lot of attendees outside of the sessions.

I will bring my video camera to CodeStock in hopes of recording more interviews for my online TV show "Technology and Friends". In this show I interview technologists about their passions.  Past shows have focused on topics such as frameworks, careers, events and community-building. A typical show lasts 10-20 minutes, so it tends to be very focused. You can see the first 29 episodes by clicking here: http://www.davidgiard.com/CategoryView,category,Interviews.aspx

If you would like to be on this show, please e-mail at me at  and suggest a topic you would like to cover.

And if you see me at CodeStock, please stop me and say "Hello".

Join me at CodeStock

Wednesday, 24 June 2009 13:40:18 (GMT Daylight Time, UTC+01:00)

Mike Cramer and I grew up in suburban Detroit when Mark "The Bird" Fidrych burst onto the sports scene.  Tall, lanky, long-haired and filled with quirks, the Bird captured the imagination of both kids and adults during his time with the Detroit Tigers. His career was brief but spectacular. He won Rookie of the Year in 1976, but an misdiagnosed arm injury the following year hindered his performance for the rest of his career.  Several attempted comebacks fell short and Fidrych pitched his last Major League game in 1980.

In 1976, Fidrych was famous for both his pitching prowess (he started the All-Star game and was runner-up in the Cy Young voting as a rookie) and for his on-field personality.  I saw him pitch once that year.  I was 14 years old and I remember well his enthusiasm for the game.  He would talk to the baseball between pitches and sometimes he would get down on his hands and knees to smooth out the dirt of the mound. He never hid his joy after getting a batter out or retiring a side or winning a game.

Now Mike Cramer has a film which features Mark Fidrych and the effect he had on a young boy in suburban Detroit - an effect The Bird still had when the boy grew up and struggled with his empty life at middle age and set out across the country to find the answers from his boyhood hero.

Mike's movie - Dear Mr. Fidrych - debuts this Friday night June 26 at the Detroit-Windsor International Film Festival.

Mr. Fidrych will not be in attendance.  The Bird passed away less than three months ago, killed while working alone on a dump truck on his Massachusetts farm.

But the Bird is in this film and I believe he will be at this screening in spirit. I hope you go watch it. The Bird and the movie may inspire you the way he inspired me when I was a kid; the way he inspired Mike Cramer and the boy turned man of the movie.  Maybe he'll inspire a generation of sports fans and movie fans who never got a chance to see him.

Maybe this is the comeback that baseball denied The Bird.

Wednesday, 24 June 2009 03:40:49 (GMT Daylight Time, UTC+01:00)
# Tuesday, 16 June 2009

Episode 29

Berlin software developer Ziad Hakim recently completed his first iPhone application. In this interview, Ziad discusses his application and the process of developing for the IPhone.

12 mins, 18 secs

 

Tuesday, 16 June 2009 03:10:41 (GMT Daylight Time, UTC+01:00)
# Monday, 15 June 2009

In previous articles, I showed how to create a simple MEF contract based on a string and a contract based on an Interface.

Recall that MEF uses a contract that matches Import and Export components at runtime.  Contracts are defined by Import and Export attributes applied to declarations and definitions, respectively.

In this article, I'll show how to add metadata to your export data and to read that metadata at runtime.

We'll start with the sample created in my article about Interfaces.  In this sample, we created three projects:

  • MEFInterface contains the IToDo interface.
  • MEFConsoleApp1 is our console application.  It contains the Import property based on the IToDo interface.
  • MEFComponent1 is a class library containing an exported property implementing the IToDo interface.

We can add metadata to an Export with the ExportMetaData attribute.  The ExportMetaData attribute accepts two parameters: the name and the value of metadata applied to that export.  When MEF imports this export, the metadata is imported as well and is accessible from code.  Below is an Export from our sample with the ExportMetaData attribute applied.

    [Export(typeof(IToDo))]
    [ExportMetadata("Priority", 2)]
    public class FirstTask : IToDo
    {
        ...
    }

We apply a similar attribute to the other Export in MEFComponent1

    [Export(typeof(IToDo))]
    [ExportMetadata("Priority", 1)]
    public class ImportantTask : IToDo
    {
        ...
    }

MEFConsoleApp1 contained an Import that declared a collection of IToDo objects. To access the metadata of this collection, we should change the declaration to an ExportCollection. An ExportCollection implements the IEnumerable interface, but also exposes MEF metadata.

        [Import(typeof(IToDo))]
        public ExportCollection<IToDo> ToDoList { get; set; }

The code telling MEF to match up contracts remains the same; but the code to access the data and metadata changes to loop through the ExportCollection, as shown below.

            foreach (Export<IToDo> exTd in ToDoList)
            {
                IToDo td = exTd.GetExportedObject();
                Console.WriteLine(td.TaskName);
                int priority = Convert.ToInt32(exTd.Metadata["Priority"]);
                Console.WriteLine("Priority=" + priority.ToString());
            }

In the above code, exTd is an Export object.  The Export object contains not only the IToDo object we imported (via the GetExportedObject method); it also allows us to retrieve metadata.  Since metadata is a set of name-value pairs, we can retrieve a value by passing the name to the Metadata collection.  In this case, we pass get the value of Metadata["Priority"].

In this article, we showed how to apply metadata to an MEF Export and how to retrieve that metadata at runtime.

Code: MEFDemo3.zip (574.93 KB)

Note: The code in this article uses MEF CTP 5.

MEF
Monday, 15 June 2009 12:10:38 (GMT Daylight Time, UTC+01:00)