SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 319 | Next

Steven Kelly and Juha-Pekka Tolvanen

"Domain-Specific Modeling"

The other alternative,
use of state machine based approaches (as in Chapter 9), was considered over kill.
From the designs expressed with DSM, the generator produces code that can be
executed both in an emulator for testing purposes and in the target device. Next, we
describe the structure of the code generator and then show samples of the generated
code.
8.5.1 Generator Structure
Following the chosen function-based approach, each UI control, dialog, and phone
service was implemented as a corresponding Python function de?¬?nition. The main UI
controls, like Form, also had internal functions. This approach also in?¬‚uenced the
generator structure: each modeling concept mapped to one or more generator
modules; one generator module takes care of List, another SMS, and so on. The
general structure of the generator is illustrated in Fig. 8.8. An autobuild generator
produces the Python script and starts an emulator to execute the application.
The generator ?¬?rst produces the imports necessary for the application (like appuifw
for UI elements or messaging for sending text messages) and de?¬?nes the functions
used from the library. Then the main part of the generated code is taken from dialogs,
UI controls, and phone services described in the design models. These generator
modules, identi?¬?able by their language concept name, are collected together in a gray
rectangle in Fig.


Pages:
307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6