Day 49 - Message In A Bottle…
29 07 2008For those old enough to remember the 80’s [hands up if you can remember the "60's" as I can too? ;-) ] you may remember the song that Sting sang when he was with the band The Police:
“I hope that someone gets my
I hope that someone gets my
I hope that someone gets my
Message in a bottle, yeah
Message in a bottle, yeah”
So what on Earth has this got to do with writing software or the 30 Day push (now expired by almost 30 days)?
![]()
Well…. Let me explain.
First off, I have to put things in context. I’ve been treating what I wrote in June this year during the now much blogged about “30 Day” event as a “Prototype” as I mentioned in my previous blog post. As I indicated I used a good part of last week to rethink design, not UI so much as code. The “guts” of the application. It has been my intent, as I’ve mentioned many times, to use what I do with MixAction as a core basis for further products, many of which will be far more complex, far more specialized and a darn sight more expensive to purchase.
In order to do this I’ve been looking around at a lot of places and as always core simplicity wins the day. Steph has a fantastic article in his blog on exactly this kind of idea, titled How To Write Maintainable Code. It’s worth the read. Please do read it and return here.
As you read (if you clicked the link) Steph begins his article with
“write your code from the perspective of the person who’s going to use it.”
OK. It’s not that Steph says anything we aren’t already supposed to know - or do! It’s just that we bloody well tend not to do so.
That’s where the subject of this post comes in. Messages. With the rise of RAD programming (Rapid Application Development) and the IDE’s that support them we tend to forget, unless we write components regularly or earn our crust developing them (or work in C++) the basic tenets we learnt when we cut our teeth programming in Windows. Say back in Windows 3.0 (I admit I ignored Windows 1.0 and 2.0).
Messages.
Our RAD IDE’s and their component libraries shield us from them, and so, along with pointers, many of us (especially those who use Delphi, as I do, or the flavors of VisualBasic or the newer .Net tools) only use them to respond to component style “events” but never actually code them ourselves (in this example I’m referring to application level messages, not system messages).
Applying Steph’s ideas and using things like messages (where appropriate) we end up with a real *engine* not just a program. An engine can be re-used. A program has to be either cut and pasted if you want to re-use, turned into a cumbersome DLL or component (which pretty much means you’ll have to do some extra messaging work anyway) or rewritten from scratch.
Now there are tons of situations where you don’t need messages. In fact more often than not you won’t need them at all. But when you need to separate code from the GUI and that code is doing things you need to know about, messages can be your friend.
In the case of MixAction (and subsequent products) this is part of the solution I’m applying.
Through using messages I was able to kill six, what are now, superfluous threaded timers that tied the “engine” to the GUI and a lot more besides. That’s six less conditional compilation problems I have to deal with and 100% FREE!
Don’t get me wrong here, threaded timing is cool and useful too, but it’s not always necessary and can be a major PITA to debug (hence it’s value in writing anti-piracy routines).
So there you have it. For the last three or four days I’ve been working away getting things clear of the GUI but still maintaining (in the end) all the benefits of RAD component based development through a process I myself have rarely bothered with since I began using VB and Delphi (the latter first in 1995).
Not rocket science - and the bleeding obvious to many, especially the C++ people, but well worth considering.
Scott Kane
Quote of the day:
That which has always been accepted by everyone, everywhere, is almost certain to be false. - Paul Valery
Categories : 30 Day Release, 30days/feed, General ISV Issues, ISV Software Design, Starting An mISV




Recent Comments