Removing logic from Dojo widgets

Hi guys,

Some of you know I have a branch going to remove Cesium-specific logic from Dojo-specific widgets. This began life as “helpers” with the intention of being a simple helper function to take the place of the “Skeleton” or “Hello World” example code which keeps getting repeated everywhere. Within an hour of development it had easily swallowed all of the logic in Widgets/Dojo/CesiumWidget (the widget that has no UI on it, just a bare globe). There was hardly anything Dojo-specific inside the widget, so on my branch that widget is now an empty shell that just requires in the functionality from the non-Dojo “helper” widget.

I’m thinking I should ditch the name “helpers” and go back to calling it a widget, because that’s what it turned into. But, the “Widgets” directory is excluded from the Cesium.js combine step, and I specifically wrote this to be included in that step, because the whole point is to make the code available to projects that aren’t using Dojo and/or require.js.

Options: I could call it a “widget” (which it is), and move it to the widgets folder, and then have the build script specifically include or exclude individual files from the “Widgets” folder and its subfolders (which might get messy). Or, I could have the build script include the top level of “Widgets” but not any of its sub-folders, which would be reserved for Dojo and other 3rd-party toolkit widgets. This would pull in the Timeline widget (the non-Dojo one, not to be confused with its Dojo counterpart of the very same name). That won’t work well currently because of a dependency on a graphic, but eventually I’d like to replace all our icons with SVG anyway (that’s a separate topic). So I think in the meantime I should just have the build script exclude all of Widgets, then re-include the new non-Dojo Cesium widget.

It’s certainly not a perfect solution. Comments? Ideas?

                 --Ed.

I’m fine with only including specific widgets (the stand-alone Cesium widget being the only one at this time). However I hesitate for us to go too far down this road without a well laid out plan in place. So far we’ve been making small incremental improvements to the original prototype widgets we’ve made; but at some point they all need to be scrapped so we can start over.

In order for widgets to work in the long run, then need to be designed (from a U.I. standpoint) and properly implemented (from an architectural standpoint). A lot of planning and discussion needs to happen for that to occur. What we have now was always meant to be thrown away.

So I’m fine with whatever incremental improvements you want to make now, but I just want to be up front in saying that anything we do now is likely to be thrown our or rewritten later.

I thought I did a big write-up on what I would like to see happen at some point, but I can’t find it on the wiki. I’ll see if I have an email I wrote somewhere and get it up on-line. At the same time, I encourage anyone with an interested in GUI design and usability to contribute their own ideas about what they would like to see.

Understood. I’m still pushing ahead with this because it will be immediately useful to a lot of people to have our prototype widgets available free of Dojo. Let us know if you find the write-up you mentioned.

          --Ed.