Beaming stuff
Since I got my new cellphone (lunar grey) I’ve been toying with a project in my spare time, writing an app to sync stuff over IR. It’s been an interesting challenge to do this test-first.
First, I came to the conclusion that the design on the protocol level must match the entities in the protocol specification, which is a set of AT commands on the one hand, and the IrOBEX binary protocol on the other.
In the layers above the protocol layer, I’m free to plunge ahead doing test-first programming as usual, and my spike has yielded in a design which centers around a Communicator class, which has a Device it speaks to. The Communicator encapsulates a state machine and is has methods for initiating dialogs with the cellphone, and whenever a result is received (or it times out) it notifies its owner by callback.
I’m pleased with this design and I hope I will have time to continue writing this app. There are very few apps available for this.