August 31, 2004

Managing MIDlet Life-Cycle with a Finite State Machine

Posted at August 31, 2004 11:31 PM in J2ME .

Although this may be obvious to some, this article introduces the reader to finite state machines as they apply to MIDlets. For those who slept during CS101, this will be a good review. ;)

A MIDlet class may manage its own logic and life-cycle, but often a better choice is for it to delegate these responsibilities to a finite state machine (FSM). An FSM provides a simple and effective means to control your MIDlet's life-cycle and overall application behavior. This article shows you how.

The article sums up a finite state machine:

A finite state machine is a computation model consisting of a set of finite or constant states that define behavior, a start state or initial state, an application-specific input alphabet used to determine the transition to make, a transition function that uses application rules or conditions to determine the next state to go to - the state transitions - and input events that trigger the state transitions.


Managing the MIDlet Life-Cycle with a Finite State Machine

Trackback

You can ping this entry by using http://www.mamlambo.com/mt/mt-tb.cgi/384 .

Comments

Post a comment










Remember personal info?