As described in the earlier outline for my modeling project (and yes, I know I've been slow getting new posts up), the first step in creating a model-driven runtime for calculator applications is to have a working single-calculator program upon which to base the work—something, that is, that can be turned into a generic, configurable runtime. The primary benefit here is that we’ll then be able to see the incremental stages of development of the process that will, I imagine, shed some light on the general nature of runtimes as compared to specific applications.
It also affords the opportunity to explore “modeling” itself in its different expressions. Fact of the matter is that all software engages in modeling processes: the purpose of software is to essentially configure a universal machine (the computer) to behave in ways that reflect various tasks and processes (whether human or automated). To give a simple example, a spreadsheet models forms and processes that originally existed on paper; the software was modeled after some real artifact. Indeed, when I wrote the Windows 3.0/3.1/NT/95/98/2000/XP/Vista Calculator program, I directly modeled it after the $9.95 “Dynatone” job I’d bought at K-Mart when I was in high school. That is, I made the program behave pretty much like the physical device.
In this two-part article, then, we’ll discuss how the conceptual “models” of appearance and behavior typically manifest themselves in a combination of code plus data, which in our case means and C# and XAML. As you may already realize from your own work, appearance and behavior end up being spread around throughout an application’s code, mostly because writing a single application simply doesn’t require a cleaner separation. Granted, facilities like XAML and “code-behind” have gone a long way to at least separate appearance and behavior, which is fabulous for collaboration between designers and programmers. Yet still, the behavioral “models” in a typical application are not only spread around within the code itself, but is also expressed to some degree in the very structure of that code.