benkeen/couchdb-fauxton — pull request #3 by robertkowalski (2014-11-02 17:14:17+00:00)
Title: Pr/119 refactor

I am bad at explaining things without examples and I had some time today, so I figured out how we can make this work. These included some changes I had to make:

- use events instead of callbacks, fix scoping with `this`
- move methods from outside to collection
- reinitilize views/routeobject before navigation
- remove hack in router
- refactor overloaded eventHandler with implicit assumptions
on argument parsing/argument order

**TODO**: take most of the contents of `initialize` of the route into an own function, and call this from `initialize` and `onSelectDatabase`

**NOTE**: I added a separate commit which tries to share my thoughts why I did several things. You can easily delete that using a `git rebase -i HEAD~3` - just delete the entry for this commit from the list