Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenSpendingJS refactoring/clean-up #39

Open
trickvi opened this issue Sep 12, 2013 · 0 comments
Open

OpenSpendingJS refactoring/clean-up #39

trickvi opened this issue Sep 12, 2013 · 0 comments

Comments

@trickvi
Copy link
Contributor

trickvi commented Sep 12, 2013

Moved from openspending/openspending#664

Background

http://lists.okfn.org/pipermail/openspending-dev/2013-May/000783.html

I've been looking at openspendingjs and trying to wrap my head around
it, with the intention of setting up a build process for it and allow
people to contribute new visualisations.

I think openspendingjs is in serious need of some refactoring and a
clean-up. If this is something we want people to contribute to we have
to make it easy for them to do so. In it's current state it's
under-documented, has some weird stuff in it, is tightly coupled with
specific sites, and has a confusing hierarchy.

Here are a few things I noticed as I randomly browsed through:

  • 'flash' directory in openspending_js_ with a flash implementation of bubbletree (is it used?)
  • 'app/datacache/' has json files that aren't used in openspendingjs (e.g. cofog1-cofog2.json)
  • 'app/deficit-and-debt/' only includes an html file with some inline scripting
  • What's the difference between 'app' and 'widgets' (site-specific vs. general)?
  • Does openspendingjs really use all the libraries in 'lib/vendor/' (I haven't checked)?
  • 'widgets/treemap/js' seems to include it's own thejit (javascript infovis toolkit) library
  • Result of the build script isn't obvious (spits out 'prod/boot.js')

I'm not looking for a bikeshed discussion and I'm not pointing fingers.
I'm just raising some things I noticed to show what I mean by
refactoring and clean-up. This should help us get started on discussing
openspendingjs. Here are some questions:

  • What is it we want openspendingjs to do? ( http://www.ur1.ca/e2g62 ?)
  • Can we make the project structure simpler/readable? (or at least document it?)
  • Will it break anything (external) if we refactor/clean-up openspendingjs?
  • Can we make it easy for visualisation creators to add visualisations to openspendingjs?
  • Is there somebody who would like to help us refactor/clean-up openspendingjs?

I don't think cleaning openspendingjs up is a huge task. It would make
the build process a lot easier (not having to deal with a lot of cruft)
and more importantly make it a lot easier for people to contribute
visualisations that use data in openspending.org

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant