« List.append() - Fragmentation in MIDP | Main | Improvement of multilingual support - Expense Report (4) »

11 December 2008

Reorganisation of internal state management - Expense Report (3)

After releasing Expense Report version 0.4.2, I decided to reorganise the internal state management. Because, the following two major functionalities remained to be added, which expected to be so complicated that implementation could get much confused:

  • Synchronisation between mobile phones.
  • Exporting data for PC software.

Both required asynchronous I/O, and did the users many steps to operate. I needed to prepare for mechanism that could afford adding such complicated features.

Previously, pressing command buttons by the user only triggered state transition. Therefore, all state transition occurred inside CommandListener.commandAction() method. Since asynchronous operations were going to be introduced, I decided to reorganise the internal state management. Finally, I got a huge switch-case block, which looked as if it was a window procedure in Windows programming. It must be later split into several pieces, or be replaced with table-driven state machine, or I have to rewrite it by using the State design pattern.

|

« List.append() - Fragmentation in MIDP | Main | Improvement of multilingual support - Expense Report (4) »

Expense Report」カテゴリの記事

Mobile」カテゴリの記事

Programming」カテゴリの記事

TrackBack

TrackBack URL for this entry:
http://app.cocolog-nifty.com/t/trackback/532178/45454776

Listed below are links to weblogs that reference Reorganisation of internal state management - Expense Report (3):

« List.append() - Fragmentation in MIDP | Main | Improvement of multilingual support - Expense Report (4) »