dyoo / WeScheme

29 stars 16 forks source link

we have multiple copies of the jquery library floating around #45

Closed dyoo closed 12 years ago

dyoo commented 12 years ago

there's one under war/editor, and another under war/js/jquery. Artifact of some experiments a long time ago with structured editors. We should clean this up so that we're using a single version.

bhickey commented 12 years ago

You might want to consider using jQuery from a CDN: http://docs.jquery.com/Downloading_jQuery#CDN_Hosted_jQuery While we're solidly under the free quotas, it should improve load times for users.

bhickey commented 12 years ago

FYI -- the copy under war/editor is jQuery, and the version under war/js/jquery is jQueryUI.

dyoo commented 12 years ago

Ah, thanks Brendan!

Ok, I see now. What really should happen is directory consolidation. The stuff in 'editor' is a mix of your structured editor work and the jquery libraries and some extra plugins.

From grepping through the sources, I see the following references:

kui ~/workspace/WeScheme $ grep -r 'editor/' *
war/openEditor/index.jsp:    <script src="/editor/jquery.js"></script>
war/openEditor/index.jsp:    <script src="/editor/debug.js"></script>
war/run.jsp:<script src="/editor/jquery.js"></script>
war/run.jsp:<script src="/editor/jquery.createdomnodes.js"></script>
war/view.jsp:<script src="/editor/jquery.js"></script>
war/copyright/index.jsp:<script src="/editor/jquery.js"></script>
war/console.jsp:    <script src="/editor/jquery.js"></script>
war/console.jsp:<script src="editor/jquery.createdomnodes.js"></script>
war/about/index.jsp:<script src="/editor/jquery.js"></script>
war/contact/index.jsp:<script src="/editor/jquery.js"></script>
war/index.jsp:<script src="/editor/jquery.js"></script>

Your suggestion to use the CDN for jQuery sounds ok, but it slightly complicates off-network development. Keeping a local copy of our dependencies means that we can do local development of some of WeScheme without the network. I have to write down how to do this, but you can even run the compiler service locally, which truly allows for local development.

(There was a request a year or so ago from sk to be able to demo WeScheme in an environment where there was no network access. I remember doing the work to remove all the CDN links and making the compiler service a parameterizable thing.)

dyoo commented 12 years ago

Moved the jquery file over to /js/jquery as /js/jquery/jquery-1.3.2-min.js, and fixed up all the references. Closing issue.