Introduction The state machine is a very useful concept for structuring applications. The well-considered use of state machines will aid in keeping both user interface logic and application logic organized and maintainable. This will result in code that has both increased flexibility and robustness, not just for mobile applications but for all application development. Because mobile applications need to manage screen real estate and system resources efficiently and deterministically, state machines are particularly useful in mobile software development. State machines can be used to manage what sets of resources are being kept in memory at any given time as well as what user interface elements are occupying different areas of a mobile device's screen. For these kinds of tasks, state machines are ideal.This chapter introduces and explores the uses of state machines and explains how they can be used to help you write efficient and robust mobile applications. |