The modern agile software development approach to design and coding came out of the lessons learned by software professionals. This method applies to a GUI as much as to any other code. One of the main keys of agile software development is the continuously applied process of refactoring.
One practical example of how refactoring our code can help us in our software development work is by first implementing some simple functionality using functions.
As our code grows in complexity, we might want to refactor our functions into methods of a class. This approach would enable us to remove global variables and also to be more flexible about where we place the methods inside the class.
While the functionality of our code has not changed, the structure has.
In this process, we code, test, refactor, and then test again. We do this in short cycles...