Given that CesiumViewerWidget is going away soon, the only thing in the Cesium repo still using Dojo will be Sandcastle. There’s been some talk about if we will remove Dojo completely.
I propose that we plan to remove Dojo due to it’s bulk (still in the history, I know) and dependency confusion it creates - Cesium absolutely does not require Dojo. I would say to rewrite Sandcastle to not use Dojo, but we’re pretty busy so I instead suggest changing Sandcastle to use hosted versions of Dojo as I think Scott suggested, and only rewrite it later if there is enough feedback to do so from folks on closed networks.
If we build widgets on Dojo later, they can live in a separate repo.
Doesn’t the build system also use Dojo? Removing it completely is fine by me, but I just figured I’d mention this additional dependency.
Also, while we’re discussing dependencies, is there any reason we can’t switch from Java to a node-based local server? We already have node in the repo so that would get rid of the Java dependency as well. I realize this is a “development only” dependency, but since we already use node for other things, it would remove another item from the list.
I don’t know about the build. Scott - if the build does use Dojo, how hard is it to remove? It seems like a silly thing to depend on Dojo for.
As for node, if the performance is reasonable, I am all for it.
The only reason we use the Dojo build in the release process is because the CesiumViewer application uses Dojo. If we change that, we can make a new build process for that application.
Do we agree on the following?
- Change Sandcastle to use hosted Dojo
- Change CesiumViewer to not use Dojo
- Update the build for CesiumViewer
- Remove Dojo from the repo
- [separate issue] Consider using node for the build. Sounds like too much fire and motion for right now.
Basically agreed. Scott can we use a minified, trimmed-down version of Dojo for Sandcastle? It doesn’t use all the widgets & experiments, so we don’t need a whole source tree there. I think we could get it working on disconnected networks without much weight.
The only problematic one is “Update the build for CesiumViewer”. We would need to find an alternate build tool and if we want to switch to node, we would better off doing it all at once. Instead of switching to a different java based tool and then immediately switching again.
If CesiumViewer the application only uses Cesium modules, we’ll just use the r.js optimizer to produce a minified layer, the same way we already do for Cesium.js.
Sounds like we’ve almost converged, but Scott did you see Ed’s question?
can we use a minified, trimmed-down version of Dojo for Sandcastle? It doesn’t use all the widgets & experiments, so we don’t need a whole source tree there. I think we could get it working on disconnected networks without much weight.
Sure. I did a quick check and Dojo 1.9, minified only, without dojox, is
about 4MB, including the various UI image files.
So basically Sandcastle includes minified dojo as a local app-specific third-party dependency? At 4 megs that sounds good to me.
Do you consider rewrite Sandcastle by vue.js?
在 2013年5月29日星期三 UTC+8下午8:37:51，Patrick Cozzi写道：
I think rewriting Sandcastle in a modern framework like Vue/React might be nice - I think even just a plain HTML/CSS rewrite to make it more responsive and make better use of screen real-estate would be amazing. I really like how the Babylon playground looks and feels: