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 be more flexible about where inside the class we place methods.
While the functionality of our code ...