Download presentation
Presentation is loading. Please wait.
Published byMatilda Thornton Modified over 9 years ago
1
State Machines & User Interfaces Author:Brian O’Byrne Presented By: Dongkai Hu
2
When designing software, the application has two parts: 1.USER INTERFACE [UI] 2.MODEL
3
MODEL: Represents the problem to be solved. It has no UI and no concept of how users might interact with it. It is accessed through a set of APIs
4
UI Let users exploit the model to perform necessary tasks. The UI depends upon the model and is a client to the model’s services.
5
Fig 7. The complete MVC Architecture for a Thin-Client Web Application
6
When applying MVC approach to design on server side, you find yourself with two projects that, while interdependent, have different requirements and priorities. One project is concerned with producing an accurate model of the problem and providing services for the UI. The other is focused on producing a UI appropriate for your users.
7
To solve the problem, we introduce state machine concept on MVC style design [the current state + an event + some conditions] determines [the actions + the next state]
9
The author use java to write a software called JStateMachine. JStateMachine is freely available software project to control a UI at run time by keeping it within the bounds of a statechart, this state machine lets you produce your own MVC-like-view and controller classes, and link them through a representation of statecharts.
10
The key to JStateMachine’s control is a representation of the Statechart that it keeps in memory while the application is running.So it can handle: Transactional conversations Default states Application exceptions
12
What can JStateMachine do? UI classes and Instances Event Processing Writing the UI AutoViews ExceptionHandling Access Control
13
Conclusion User interfaces can benefit greatly from the behavioral definition given by finite state machine concept and state chart diagram notation. This behavioral definition is largely independent of the appearance or deployment technology used. The JStateMachine framework is a good example that lets you make best use of such a definition by referring to the statechart while the UI is running and ensuring the chart is following at all times. With the definition available at run time, it is easy to include extras such as access control, exception handling, and rapid prototyping.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.