GUI Builders Pitfalls
Articles —> GUI Builders Pitfalls
Laying out a user interface can sometimes seem daunting, especially to the novice unfamiliar with the types of user interface components available. GUI builders - drag and drop tools for user interfaces - can seem to be an easy way to construct user interfaces without the necessity of learning the fine-grained details. However, GUI builders inherently obscure the underlying code - and there are many occasions in which diving into code is necessary to customize, adapt, debug, or even write an application. Below are several reasons to learn the basics before relying heavily on a GUI Builder.
- Readability: Some GUI builders append source code in a manner which can be cryptic and difficult to follow. For instance, the names of components may not be informative insofar as what the component does. In some cases, a GUI builder may rely heavily on action delegation, making it difficult to identify what code is being called and when.
- Code Sharing: In the context of reading someone else's code, a reliance on a GUI builder without knowledge of what lies under the hood makes it difficult to read, incorporate, and/or adapt code that is unfamiliar to the programmer.
- Debugging: Understanding the Listener flow, and how a data model maps to a user interface is integral in debugging issues related to a user interface. A GUI Builder can obfuscate what listeners are registered where, and what variables represent what visual component. This obfuscation can make it difficult to pinpoint bugs or misbehavior, especially if one does not know the basics of the API the project relies upon.
- Customization: While GUI builders can create nifty user interfaces, knowing the user interface API allows one to truly customize the user interface. Two examples: a drop-down JComboBox and drag-scrollable JScrollPane are two examples of this sort of customization.
A GUI builder can be advantageous, but knowing the problems one may face makes one better prepared to deal with them should they arise. One should not shy away from learning the fine-grained details, and one should not have a reliance on a GUI builder without some knowledge of what's going on 'under the hood'.
Comments
- asif rosha - July, 12, 2020
Thanks for the helpful tutorial. Just a question, if I want to rotate a transformed point cloud (xyz = -8.7 23.2 73.2) so it aligns with the centre (x,y,z)=0, how can I use the rotation from prcomp? I want to align the current xyz of the cloud (that I’m working with) to the xyz=0, and then transform it to the centre (which should be straightforward). Thank you!