Let me start this post off by announcing that I am, to all accounts, a programming dinosaur. I started cutting code back when MS-DOS 2.1 was the OS de rigeur. Of course, I then moved ‘up’ into Win32 programming when the wonderful world of GUI interfaces rose to prominence.
I clearly remember observing (with smug satisfaction) back in the late nineties, when the first ‘web applications’ were coming out, how primitive and non functional they were. I mean – no pop up validation screens? Sortable list boxes? Tree views? Hah, it would never catch on. Not until they had all the bells and whistles of a native Windows app.
Fast forward to a couple of weeks ago, when I was sitting in front of my screen, about to start writing a Win32 application for a client. One key requirement for the app was a constantly updating listbox for a data stream.
“Oh”, I automatically thought to myself. “We could have the new data smoothly sliding in at the top of the listbox, pushing all the other lines down in a ballet of animation. Hey, and what about we do the ‘Yellow Fade‘ thing with the new incoming information to further alert the user. Ooh, and lets have the older information simply fade out the bottom of the screen…”
I reached for the Win32 API that comes with my programming tools. Did I find any functions or routines that would help me do this? Go on..guess!
I read the next requirement. “The presented data must formatted to be easily readable, with the font size and type able to be customised by the user. The time and date must be bolded at the start of each line, and the medical keywords within the description should be italicised with possibly a link to a definition database.”
Ever tried to do this in standard WinForms? I wonder what language can easily handle this sort of ‘on the fly’ formatting? Can you spell HTML and CSS?
Do you see what is happening here? After years and years of wishing that web applications were more like Win32 applications, I am now fervently wishing that my Win32 applications acted and behaved like 99% of online apps currently do, complete with all the Ajax goodness!
Surely not! I mean, I was writing printf(‘Hello World!’) back when David Heinemeier Hansson was still doing core dumps in his diaper, and Thomas Fuchs was stuffing Junior Lego bricks up his nostril.
And what was my elegant solution to this dilemma? That’s right – I embedded an Internet Explorer ActiveX control within my WinForms to do the data presentation using HTML, CSS and a generous dose of Scriptaculous javascript.
But Shhhh…don’t tell anyone, lest I be laughed and jeered at by the Rails crowd, or alternatively be publicly tarred and feathered by the Windows dev guys…
(Guest post by Devan Sabaratnam)
May I suggest WPF?
@mgroves – Thanks for the tip, but this application was actually built with a particular 4GL RAD tool, which does not support .NET (yet), so we couldn’t use Windows Presentation Foundation. It was to do with deployment to several older OS machines which may not have had .NET 3.0 installed on them.
In any case, the main gist of the article was to highlight how my thinking has changed and done a complete 180 through the years.
I will continue to scan TheDailyWTF.com to see if my app will rate a mention there in the near future! 🙂