A computer-implemented method for providing a graphical state diagram model based on a graphical user interface, the method comprising: providing, by a processor, a graphical user interface design and development environment, the graphical user interface design and development environment allowing a selection of one or more graphical elements; receiving, by the processor, one or more selections of the one or more graphical elements from the graphical user interface design and development environment; creating, by the processor, a graphical user interface based the one or more selections of the one or more graphical elements in the graphical user interface design and development environment; generating, by the processor, a graphical state diagram model that is based on the created graphical user interface, the graphical state diagram model providing a graphical state machine representation of the created graphical user interface comprising one or more states representing a state of the one or more selections of the one or more graphical elements in the graphical user interface design and development environment, the graphical state diagram model including: a state for an event associated with the created graphical user interface, and one or more sub-states corresponding to event handling and callback processing associated with the one or more graphical elements from the created graphical user interface; updating the graphical state diagram model by the processor in response to a modification of the graphical user interface through the graphical user interface design and development environment, wherein the graphical state diagram model is updated to reflect a modification of the created graphical user interface, the updates including modifications to the state for the event associated with the created graphical user interface or the one or more sub-states corresponding to event handling and callback processing, the graphical state diagram model being updated dynamically as the created graphical user interface is changed without regenerating the graphical state diagram model; and executing the graphical state diagram model in the graphical user interface design and development environment, wherin the graphical user interface design and development environment provides a graphical execution environment. providing, by a processor, a graphical user interface design and development environment, the graphical user interface design and development environment allowing a selection of one or more graphical elements; receiving, by the processor, one or more selections of the one or more graphical elements from the graphical user interface design and development environment; creating, by the processor, a graphical user interface based the one or more selections of the one or more graphical elements in the graphical user interface design and development environment; generating, by the processor, a graphical state diagram model that is based on the created graphical user interface, the graphical state diagram model providing a graphical state machine representation of the created graphical user interface comprising one or more states representing a state of the one or more selections of the one or more graphical elements in the graphical user interface design and development environment, the graphical state diagram model including: a state for an event associated with the created graphical user interface, and one or more sub-states corresponding to event handling and callback processing associated with the one or more graphical elements from the created graphical user interface; a state for an event associated with the created graphical user interface, and one or more sub-states corresponding to event handling and callback processing associated with the one or more graphical elements from the created graphical user interface; updating the graphical state diagram model by the processor in response to a modification of the graphical user interface through the graphical user interface design and development environment, wherein the graphical state diagram model is updated to reflect a modification of the created graphical user interface, the updates including modifications to the state for the event associated with the created graphical user interface or the one or more sub-states corresponding to event handling and callback processing, the graphical state diagram model being updated dynamically as the created graphical user interface is changed without regenerating the graphical state diagram model; and executing the graphical state diagram model in the graphical user interface design and development environment, wherin the graphical user interface design and development environment provides a graphical execution environment.