Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is UI state?

What is UI state? Can you give me an example of something like that might be? Does it refer to things like keeping track of what tab is open for example?

like image 340
Tower Avatar asked Jun 23 '11 14:06

Tower


People also ask

What is UI state in Android?

The UI state is application data transformed by the ViewModel. The UI notifies the ViewModel of user events. The ViewModel handles the user actions and updates the state. The updated state is fed back to the UI to render. The above is repeated for any event that causes a mutation of state.

What is UI work?

User interface (UI) design is the process of designing the look, feel and interactivity of a digital product. When you use an app or visit a website, you move through different screens and interact with various elements in order to find your way around and complete certain tasks.

What is Phone UI?

A mobile user interface (mobile UI) is the graphical and usually touch-sensitive display on a mobile device, such as a smartphone or tablet, that allows the user to interact with the device's apps, features, content and functions.

Why is UI important?

Why is user interface important? User interface is important to meet user expectations and support the effective functionality of your site. A well-executed user interface facilitates effective interaction between the user and the program, app or machine through contrasting visuals, clean design and responsiveness.


2 Answers

I think the idea is that the application has state, and the UI reflects that state.

So when you app starts it goes like the following

1) Initial state (app is started up)
2) Loads initial data ("loading state")
3) Is ready for interaction ("ready state")

Now lets say the user starts an interaction by opening a form.

4) User opens form and goes to ('editing form state')

The user can cancel or save so now the states diverge. If cancel

5) The 'editing form state' receives the cancel event, discards the changes, and goes back to "Ready"

If save

5) The app goes to "Saving" state, then when done goes back to "Ready" or "Error"

The great thing about this conceptualization is that it allows your 'state chart' to update the application elements depending on the state. For example, in 'loading' or 'saving' states you can mask the UI or disable the buttons. The key point is that the views don't need to know about the state, all it does is sit around and be manipulated. Its the state code that manages what views are doing what at any given time.

Note that is also correct for views in your UI to have state. For example, a button can have states like, 'mouseenter', 'mouseexit', 'clickdown', 'clickup', 'inactive', etc. A custom view in your UI can be considered to have states when it renders itself differently depending on the data it represents.

You might want to take a look at

http://www.wisdom.weizmann.ac.il/~harel/papers/Statecharts.pdf

like image 147
hvgotcodes Avatar answered Nov 15 '22 08:11

hvgotcodes


UI state simply means the state of the UI. Keeping track of what is in the controls, and which are visible is indeed a part of the UI state.

like image 41
Marcin Avatar answered Nov 15 '22 08:11

Marcin