We also
had addressed some of the View part in the form of the Icons, but the most important
View element, the display of time, was still largely untouched.
The display code of a real-time application is notorious for being dif?¬?cult to get
right. Had Secio been a real organization, its experienced developers would have been
throwing up their hands at this point and saying ???All you??™ve done so far are the easy
FIGURE 9.2 Time manipulation (70 minutes)
198 DIGITAL WRISTWATCH
bits, and we never had problems with those anyway. Getting the display to update
smoothly in real time is hard work, and you??™ve not even touched on it. Besides, that??™s
the area where our developers make most of their mistakes: they just can??™t seem to get
the thread synchronization and semaphores right, no matter how many times we
explain it.???
What then can we do for Secio? First, we can take a long step away from the
implementation details toward the problem domain and see what actually needs to
happen on the watch display from the end user??™s point of view. Let??™s take the most
used application, Time. What is it displaying? The current time, of course! Now, the
value of the current time is changing all the time, so are the updates for that something
we need our models to specify? In a sense, maybe not: what is being displayed, on a
high level of abstraction, is simply the current time.
Pages:
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368