Testing! Testing Graphical User Interfaces is very time consuming and difficult. Graphical User Interfaces expose time related and concurrent side-effects.
It is impossible to test a Graphical User Interface completly!
Definition: A GUI-Builder generates a Graphical User Interface based on a given model.
The model might be graphical or not. Not every GUI-Builder features a Graphical User Interface itself. Suppose a database and program logic rendering this database into a Graphical User Interface is in esscence a built-in GUI-Builder.
A classical GUI-Builder is a limited Vector Graphic Application which generates either a Graphical User Interface or the code for it.
GUI-Builder always addresses the testing of aGraphical User Interface. This is were a GUI-Builder cuts the development workload. The generated Graphical User Interface is either correct or not and testing shall move to the code level –if the GUI-Builder generates code– or to the controller and logic layer.
There is however one precondition: The GUI-Builder must generate the complete Graphical User Interface –no exception!
The existing built-in GUI-Builders usually cover up to 60 percent max of the entire Graphical User Interface. The remaining parts have to be created by other means. A Vector Graphic Application and GUI-Builder might cover all of the Graphical User Interface and is thus the only way to move testing to the controller and application logic. This is Jeszra’s first goal.
Only a Vector Graphic Application and GUI-Builder is a general purpose GUI-Builder.
When using a built-in GUI-Builder inside an applications: then use explicit code generation, to allow for code inspection against the model. Testing these generated code can be automated, too.
GUI-Builders are no editors and don’t reduce code writing. The time needed for testing a Graphical User Interface will be reduced and the visual design and robustness significantly improved. Testing can be enacted on the code level and thus the time spent on coding increased.
There is a current trend toward visually highly interactive and vulpterous interfaces. These trend poses a tremendouse challenge for an application developers. Such enriched applications are no longer sufficnetly testable by human beings! Either the application’s quality must degenerate, or the Graphical User Interface has to be generated and removed from the testing process.
Never modify generated code! Any written code requires vigorous testing. Hence the benefits stemming from using generation are lost when injecting hand-written code.
Instead do modify the code generation. You will reap the benefit of generated code and can custom tailer it to the most specific needs.
Even code reviews are efficient to locate errors inside of generated code. Because you have no inclination to believe in the correctness of generated code.
Jeszra is a Vector Graphic Application design tool, which might also create code. Use Jeszra for designing the Graphical User Interface and Jeszra's code generation to prototype the Graphical User Interface –together with the customer– or to create it.
Jeszra is Open Source Software. Open Source Software is essential for Jeszra to make alternative and custom code generation possible.
Feel encouraged to modify or write your own
code generation. Code generation in Jeszra is
divided between parsing the window structur (analysis)
and putting the pieces together (composing).
The related code generation files for Tcl/Tk are
vgcode.tcl
—analysis–
and tcldumper.tcl
–composing.
Code Generation Overview
The package »tclDumper« contains all code fragments for the code generation. Altering the code generation begins with tcldumper.
Don´t directly edit tcldumper. Instead write the code fragment, you want to be altered, in a separate source file. Make this file available to the package management in Tcl/Tk. From this file load »tclDumper« and replace the fragment in question.
»tclDumper« is required (loaded) by
tcledit.tcl
.
Example 1.1. Customized Code
# yourOwnCodeGeneration.tcl package provide arsDumper 1.0 # Get the Jeszra Code fragments. package require tclDumper namspace eval dumper { proc text {window name text} { return [subst { # The additional custom code: rtl::debug stdout \ "Inject text in text window: $window" # Insert Text into text window $name $window insert 0.0 {$text} # Bindgroups & Tags of $name }] } }