[openspending-dev] OpenSpendingJS refactoring/clean-up

Tryggvi Björgvinsson tryggvi.bjorgvinsson at okfn.org
Mon May 27 23:50:48 UTC 2013


Hi,

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

-- 

Tryggvi Björgvinsson

Technical Lead, OpenSpending

The Open Knowledge Foundation <http://okfn.org>

/Empowering through Open Knowledge/

http://okfn.org/ | @okfn <http://twitter.com/OKFN> | OKF on Facebook
<https://facebook.com/OKFNetwork> | Blog <http://blog.okfn.org/> |
Newsletter <http://okfn.org/about/newsletter>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/openspending-dev/attachments/20130527/561f7c85/attachment.html>


More information about the openspending-dev mailing list