Archive for the ‘Silverlight’ Category

Genealogy meets Programming

Thursday, March 3rd, 2011

I recently spent parts of a weekend trying to see if I could display my family history information on my web site. Yeah, I could have uploaded my family tree to Ancestry.com, but where would be the fun in that? This is all about fun and learning. So far, I had actually done nothing with the web site my kids gave me for Christmas, and it was time to try something.

About a year ago I started using Family Tree Maker to collect the information I’d been collecting for the last thirty years. It’s a great app, though I haven’t compared it to any others. One of the neat things is that it links up to ancestry.com and does a behind-the-scenes query for people in your tree, allowing you to find cool stuff like my wife’s grandfather’s entry documents and other family trees with the same people in them. By this point, I’ve put over 1700 people in my tree between the folks in the documents my parents gave me and the people I’ve found on the web. But how to share this information?

For starters, I needed to get my family tree into a form that I could work with. Family Tree Maker can export the information in the GEDCOM 5.5 file format. This is a pretty straightforward clear-text format that wasn’t very hard to write a simple parser for. I figured that my first attempt to make the data available on the web would be by using Silverlight. This might not be the obvious first step to many of you, but I’m the Development Manager for Microsoft’s Expression Blend which is a great tool for building and designing Silverlight applications. I started by building a Microsoft .NET Windows Presentation Foundation (WPF) application because I have written client .NET code recently enough and haven’t really written a Silverlight app before beyond a test app before, and I figured that client code would be easier to debug.

A GEDCOM file consists of several interrelated datasets. I only worried about People and Families because I didn’t feel the urge to share my sources. I also took a lot of shortcuts because I just wanted to be able to present the people, their families, and birth and death information, which meant I could bypass lots of the file format. For my purposes, GEDCOM contains a list of people and another list of families. Each person has an index, a name, birth and death info, and indices for families they are parents of and the family they are children of. Each family has an index for the Wife and Husband, and a list of indices for the children. I read both the People and the Families into dictionaries keyed by the indices. Then at runtime, I could easily look up people, find their families, and look up the related people from the family.

One thing I realized was that there was a lot of info in a GEDCOM file. FTM allows you to “privatize” the file by removing the first names and birth information of living people. This is pretty good, but it leaves a bunch of things in the file. One can find the Social Security Numbers of people who have recently passed away. I’m not sure why you should be able to see my family’s SSNs, even those of dead people. I used my parser to strip the file down to just what I’d display. This was pretty handy, but I found that some people without birthdays or date of death information had their names showing up in the file. This isn’t what I wanted, so I opened the file up in notepad and removed those names.

So now I have a simple web app. I’ve spent no time on the visual design, which you can tell with just a glance. I’ve added a search feature and a travelogue with back and forward buttons. It still needs an alphabetic list and some indication of where you are in the tree. It’d be great to have a view that posted families in context of other people “nearby” or the ability to list everyone who was of a particular generation or who was alive at a particular time. I’ll try to post about my experiences updating the app.