Re: kiss_sdl - Simple universal GUI widget toolkit for SDL

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

Re: kiss_sdl - Simple universal GUI widget toolkit for SDL

A bit about theory. Some may think writing code is just about implementation, but there has to be theory, otherwise it becomes clumsy, unnecessarily too complex, inflexible, inefficient and often unreliable.

The GUI toolkits are mostly complex, and it is a problem how to make them simpler. Immediate GUI, using the widget functions as if conditions in the event processing loop, makes it simpler, and more easily changeable. And this is implemented in kiss_sdl, but implementing all the possible functionality for widgets still makes widget toolkits complex. This is because what software is, different from things like electronics for example, it has to be very flexible, thus the number of possibilities that may have to be implemented, is great. Electronics has to be flexible too, but the difference is in degree.

Thus what the solution should be to still make it simple. Implementing all possible functionality is evidently not an option. Also implementing all possible functionality often makes it more difficult to use a library or toolkit, because of its complexity, and because it is mostly impossible to foresee all possible functionality, with that solution adding a new functionality requires overcoming all the complexity there. Just providing examples is another extreme, but not good either, because examples are often too particular, and it is mostly impossible to write one example that is generic enough. So there has to be something in between. I didn't find a term for that, so i had to coin a term. I call it principal code.

Principal code is implementing the core functionality and most important functionality, so that it can be changed to implement any specific functionality, and doing that is easy. When there is a principal code, then the developers don't have to start from nothing every time, and write the same basic things again and again. Yet it often implements the most that is necessary, and only with a few small changes it is possible to make what one needs. Also most of the simple things can be written using a principal code only, without any changes. This is the way to provide flexibility and generality, while still maintaining simplicity.

Principal code is a general term for any kind of code. What concerns GUI, then it's called principal GUI. Because GUI used to be the most complex of the libraries, then the first to implement that principle is GUI.

kiss_sdl - Simple generic GUI widget toolkit for SDL2

SDL mailing list
[hidden email]