The Future of the PixelUI beta
Some project side struggles I am facing currently.
The future of the PixelUI beta
Thoughts ahead…
It has been almost a year since I began coding for this project. It is by far the grandest project that I’ve ever created. While it’s not overly complex by any means, I have learnt a LOT from it.
1 | U8G2 u8g2; |
However, there was a point, at which I doubt myself, can PixelUI really be called an UI library?
Like while I’ve built the core pillars – event routing, widget drawing, and an animation system, there is still a lot of architectural bloat that should not belong in an dedicated UI library.
For example, the application framework is tangled up with the whole project, It also lacks of a widget tree system, by far the widgets are flat.
And I really don’t know if I should vendor the u8g2 & etl code alongside my project.
Is using the
u8g2api throughout the project a bad idea?
YAGNI
Even though people usually try to convince to follow the YAGNI principle, It is hard for me to supress this urge to refactor, especially when many other great embedded UI libraries out there are beautifully decoupled and independent.
Generally I wouldn’t consider myself as a perfectionist, however when it comes to the project, it struggles.
YAGNI principle suggests that one should not reinvent the wheel or add abstractions without clear reasons. Here what I am facing is that, u8g2 is already a great library out there for people who want to draw any thing on a monochrome display. However, in order to Make My Library Look More Professional, I want to dissect the U8G2. Specifically, I want to abandon the model-specified driver layer, and integrate the buffer drawing API directly into my library. While this will undoubtly expand the versatility, it also makes the library harder to use, as users could not no longer simply pass a reference of u8g2.
Trade offs happen, and it happen a lot.
Since some freshmen I know is using this library, I can tell that they really enjoy the idea of being able to develop a basic menu or other interesting applications with just a few lines of code, right after implementing u8g2 & ETL, the latter of which is also an easy job to do.
