The insurance case described in Chapter 6 is the only example in this book of
modeling just static structures. The rest of the examples also cover behavior, and
some address only behavior. The watch example in Chapter 9 is based on using two
different languages and models of computation. First, the physical structures of
individual watch products are speci?¬?ed by de?¬?ning their elements: displays, icons,
buttons, and time units. The main part of the watch products is, however, the
functionality of different applications, like how time, alarm, or stopwatch
applications work. For this purpose, a state machine is used as a foundation for
the second language. It is then extended with domain-speci?¬?c concepts for
specifying state-based and event-driven watch products. Both languages are further
integrated by using partly the same concepts so that model data speci?¬?ed in one
language can be shared with another. For some domains the static parts, like data
elements, can have such minor roles that creating a separate language for just a few
aspects is unnecessary. It is best to extend the behavioral language to allow
specifying static structures. This was the case with the mobile phone application
(Chapter 8).
You should not choose the MOC solely based on the domain. The expected
generated code also in?¬‚uences the modeling language choice.
Pages:
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430