Appreciate the new release but the updated folder structure and zip files are confusing. Are there now three folders required for this addon? MovementSpeed, WidgetTools and WidgetToolbox_3.0?
Also, why is WidgetToolbox_3.0 present in both MovementSpeed and WidgetTools zip files? Seems like it should be one or the other. Not both. Are they identical?
Originally posted by @mario-64 in #22
I believe communicating the my reasoning for making the recent changes is in order. I am outlining them in detail in this post.
TLDR:
- Only one copy of the
WidgetTools_3.0 addon folder needs to exist (even though it is included in both the Movement Speed and Widget Tools compressed install bundles).
- That means three separate addon folders within
Interface/Addons: MovementSpeed, WidgetTools & WidgetToolbox_3.0.
- No extra stuff has been added unnecessarily that wasn't there previously (in fact space and load times are reduced in reality).
- This restructuring is more optimized, even if you only use Movement Speed, but the savings are greater if you use multiple addons made with Widget Tools like my other addon that recently got revived, Remaining XP.
I have optimized and streamlined the loading process. In essence, it is the same as it has been since outsourcing settings UI and data management code to Widget Tools toolboxes. It was a simpler install before because Movement Speed was its own bundle and included all necessary files, folders and the helper addon. When I started adding detailed settings, I made the decision to separate that code out so it could be shared by all of my addons so I don't have to repeat logic as "spaghetti code" for each. I continuously refined it with the end goal to make this shared code available for anyone to use and build upon if they wish. I did a lot of work to reach a state when I can start doing that, and with this latest release of Widget Tools 3.0 (& Widget Toolbox 3.0), I felt confident enough to move forward with that plan. The first step was to get it out there. The next step is to iron out any kinks and write some introductory documentation for developers on how to start using and building with this tool. That said, the new structure is not solely optimized specifically for this purpose, if I were to use it only for my own projects, it is still an improvement on the previous architecture:
The duplicate WidgetToolbox_3.0 folder is the old "Toolbox" folder, it used to be included in all my projects the same way. It has been made into its own addon to achieve two thigs:
- Only one copy of it needs to exist. If multiple addons used it in the past, each of them had a copy of the Toolbox in its own folder. Separating the Toolbox out into its own main addon folder means that it will take up disk space only once for one copy, not multiple times for each addon that bundled it in.
- Previously, each addon using the same Toolbox had to have the game client read every single duplicate file each time. Previously, it was only partially optimized so even though most of the code was only run once, having to have the toolbox files containing the shared code be re-read in first place which was some unnecessary work.
Having the Toolbox as its own addon entry means it will only ever be installed, loaded and read once no matter how many addons use it.
But why have the Toolbox in the first place? What is Widget Tools vs a Toolbox?
- Widget Tools is the brains that handles the Toolboxes, loads them, and provides them to addons for use along with other shared core utilities. It has been a separate addon for a while now for similar reasons why the Toolbox is now. Each of my addons had Widget Tools in its own compressed install bundle but it installed in its own separate main addon folder, preventing actual duplication on disk in practice. If you only used Movement Speed, you might not have noticed.
- Widget Tools used to also have an entire copy of the Toolbox folder, and it still does—the only difference is what I outlined above. It in itself now installs in a separate main addon folder, so even if you only use Movement Speed, that Toolbox folder is no longer installed and read by the game twice: once for Movement Speed and once for Widget Tools itself. The game only reads Movement Speed-specific files for Movement Speed and Widget Tools-specific files for Widget Tools, and this separated Toolbox addon (the
WidgetTools_3.0 folder) is only loaded and read by the game when Widget Tools orders it on the request of an addon and provides it for use for every addon (including Widget Tools itself).
So why not have Widget Tools be the entire Toolbox itself?
- If multiple different addons use a shared code, when these different addons get updated separately, and they require changes to that shared code, updating one addon would now require every other addon to implement the updates to that shared code first. This means new versions of them must then be released in unison or risk causing some of them to stop working after that one addon makes changes to the shared code they all rely on.
- Widget Tools was meant to be a stable lightweight addon with long time support that manages the shared code to allow it to be modular in a predictable way. Different addons can now freely make changes individually to the shared code in their separate updates if they include their own updated Toolbox of a different version. Widget Tools handles that updated Toolbox as a separate module to prevent every other addon using an older or different version of a Toolbox from breaking. This behavior is unchanged form the previous versions, it was there just wasn't as visible.
- Widget Tools is more "evergreen", it offers foundational utility code that is not expected to change much over time to prevent addons relying on it to have to wait for updates, but more importantly, to have to rewrite and sync up their code every update because of the changes made. Toolboxes, on the other hand, are more complex and they handle stuff that is expected to change more often and what specific addons might require specific versions of they can easily include in their own files. The recent change is how that Toolbox is bundled, installed and loaded, the improvements to which is what I described above.
Movement Speed 3.3 uses Widget Tools 3.0 and both use the same Widget Toolbox 3.0 foundational module as they have in the past. They both need it and since they currently use the same one, only one copy of it is needed to be installed.
Focusing only on Movement Speed, no other addons: Was this development direction (made years ago) a good idea in the first place?
- I do like the deep customizability and quality of life the advanced custom settings I built provide. I plan to expand upon Font appearance options (it has been requested too) and display background options in the next updates. The reality is, managing those settings, the data and the UI is complex. What's more complex is doing it as optimally as one can. I do believe, however that having these features the default coding tools of the game don't provided out of the box is worth it.
- Movement Speed wasn't even my first addon release, it was Remaining XP. I wanted the same level of customization for both, and that alone lead me to utilize shared code between them fairly early on. As they evolved, so did the shared code. I continued to expand it but I also had to optimize it (especially if I also wanted to offer it to other developers to use eventually).
- Optimizations lead to the separation of the Widget Tools addon, and that now lead to the separation of the Toolbox module. I knew the install would be more complex (and possibly overengineered) but the end result would be better. That was the hope.
If it was good enough, it might just help other developers too, providing quality of life, development utilities and advanced settings for addon customization without requiring all of what's needed to be developed separately from the ground up.
I will release a revised install bundle soon that has everything needed for Movement Speed.
- I did not do that, because I was planning to have this handled by CurseForge. The vast majority of players use CurseForge to install my addons. It automatically installs required dependencies alongside Movement Speed, so no one would have to Worry about Widget Tools or the Toolbox module. They install and update Movement Speed, and everything else is taken care of.
- Unfortunately, the new update has been stuck in review limbo for the past day. This would be the first standalone release of Widget Tools, so that is why they are likely checking it manually. I considered this but I did not expect it to take this long. The only thing we can do now is wait.
- For Wago.io, there was no easy way to set similar automatic dependency handling, I will have to investigate and do some extra work to get that going. The new version of Movement Speed (and Widget Tools) are already live there, but they have to be installed manually, separately as of yet. Please be patient until I can sort that out (hopefully today or tomorrow).
- In the meantime, as the title of this last section states, I am planning to release a full bundle (all 3 folders) on GitHub for easier manual install, just like previously—the only difference in the (more optimal, if confusing) end result being the number of folders: not two, but three.
- I will also likely remove some of the added extra fonts because I failed to appreciate how much disk space they take up compared to how infrequently most of them are expected to be used—if at all. There is little point in optimizing the code for install and load size and have that be made pointless by adding a bunch of chungus font files for little actual benefit.
Thank you all for all for using my addons, providing feedback and reporting issues!
I hope my decision to seemingly complicate the matter does not scare anyone away, nor does it complicate your lives too much.
Please, do feel free to share any feedback. good or bad, regarding this development direction and any potential issues caused by it in this thread.
Originally posted by @mario-64 in #22
I believe communicating the my reasoning for making the recent changes is in order. I am outlining them in detail in this post.
I have optimized and streamlined the loading process. In essence, it is the same as it has been since outsourcing settings UI and data management code to Widget Tools toolboxes. It was a simpler install before because Movement Speed was its own bundle and included all necessary files, folders and the helper addon. When I started adding detailed settings, I made the decision to separate that code out so it could be shared by all of my addons so I don't have to repeat logic as "spaghetti code" for each. I continuously refined it with the end goal to make this shared code available for anyone to use and build upon if they wish. I did a lot of work to reach a state when I can start doing that, and with this latest release of Widget Tools 3.0 (& Widget Toolbox 3.0), I felt confident enough to move forward with that plan. The first step was to get it out there. The next step is to iron out any kinks and write some introductory documentation for developers on how to start using and building with this tool. That said, the new structure is not solely optimized specifically for this purpose, if I were to use it only for my own projects, it is still an improvement on the previous architecture:
The duplicate
WidgetToolbox_3.0folder is the old "Toolbox" folder, it used to be included in all my projects the same way. It has been made into its own addon to achieve two thigs:Having the Toolbox as its own addon entry means it will only ever be installed, loaded and read once no matter how many addons use it.
But why have the Toolbox in the first place? What is Widget Tools vs a Toolbox?
WidgetTools_3.0folder) is only loaded and read by the game when Widget Tools orders it on the request of an addon and provides it for use for every addon (including Widget Tools itself).So why not have Widget Tools be the entire Toolbox itself?
Movement Speed 3.3 uses Widget Tools 3.0 and both use the same Widget Toolbox 3.0 foundational module as they have in the past. They both need it and since they currently use the same one, only one copy of it is needed to be installed.
Focusing only on Movement Speed, no other addons: Was this development direction (made years ago) a good idea in the first place?
If it was good enough, it might just help other developers too, providing quality of life, development utilities and advanced settings for addon customization without requiring all of what's needed to be developed separately from the ground up.
I will release a revised install bundle soon that has everything needed for Movement Speed.
Thank you all for all for using my addons, providing feedback and reporting issues!
I hope my decision to seemingly complicate the matter does not scare anyone away, nor does it complicate your lives too much.
Please, do feel free to share any feedback. good or bad, regarding this development direction and any potential issues caused by it in this thread.