Two Sundays out of every five I provide technical support for the children’s ministry team at our church, setting up and looking after the laptops and label printers in the sign-in area. The church uses a third party, on-line application for this and when everything is running smoothly it’s a great solution. But sometimes we have problems with our internet access and then we have to revert to a paper-based process. If our church was small that wouldn’t be a big deal, but we’ve reached the kind of numbers where handwriting labels is really not OK any more – for example on Easter Sunday we signed in almost 400 under elevens across the two morning services, that’s 80 more than the same Sunday last year! So I decided we need an offline system that does just enough to keep the queues moving, and our fantastic volunteers smiling, when we need to resort to “Plan B”.
A couple of years ago I worked on a project were we built a reasonably complex WPF application. Now I’m not going to take much credit for the architecture of that application (Colin the Geek was the brains behind that one) but I did get my hands pretty dirty with XAML, two-way data bindings and commands when I wasn’t managing the project or the customer. At the time I also wrote a little WPF application that we used at a Boys Brigade annual display in the church to host a quiz game I called “Our Survey Says” (loosely based on the UK television show called “Family Fortunes”). Given that our sign-in environment is windows based, I figured a WPF desktop application would be a good place to start.
I’m not going to go into much detail about the solution here – the code is in GitHub (github.com/ajwgibson/CcvSignIn) and should pretty much speak for itself. I (mostly) used the MVVM pattern with two-way data binding but I stopped short of using commands and just bound button clicks to (code-behind-style) events for the small number of places that was needed. It runs off a CSV data file (using the excellent LinqToCSV library) and works with the Dymo LabelWriter 450 using the Dymo SDK. It makes some horrible assumptions about the label template. It’s not well architected or elegantly written – it doesn’t even have any automated tests. But remember that this application will be used by three or four people, to do one specific job, on a handful of Sundays each year, so I haven’t invested a huge amount of time in it to be honest.
The one thing I do want to highlight is the styling.
Most of my work these days is web-based. I’m a coder, not a designer, so while I understand CSS I’m never going to make a website or a web application that looks beautiful. Which is why I love Twitter Bootstrap and other frameworks like it, because they let me build a modern, responsive site that isn’t ugly. I can focus on the functionality and (pretty much) forget about the look and feel.
Going back to WPF was definitely a shock to the system – I’d totally forgotten how much work it is to style a WPF application compared to web pages. I mean, seriously, all that XAML!!! So I was really chuffed to find “Modern UI for WPF”, (https://github.com/firstfloorsoftware/mui) which describes itself as “a set of controls and styles converting your WPF application into a great looking Modern UI app”. I installed the Visual Studio extension (I used Visual Studio Community 2013 by the way) and never looked back. Thanks to MUI, I was able to build a good looking application with very little effort.
I don’t know if we’ll end up using the application or not – sadly there’s no easy way to push the data back up to the master system when we’re back on-line, so it’s little more than a label printing tool. But it was an interesting side project for me