mozilla/talkilla — pull request #174 by tOkeshu (2013-07-23 10:27:21+00:00)
Title: App port refactor

This pull request address several things at once, mostly because these
things were tied together and the cleanup made sense as a whole.

## `SidebarApp` refactor

The `SidebarApp` object has been updated to reflect the same behavior
and organization as the `ChatApp` one. A new `js/static/sidebar`
directory has been created and stores the app, models and views used
by the sidebar.

Frontend test files have also been reorganized to reflect these changes.

## No more `app.port`

The `app.port` object doesn't exist anymore. Now, both `ChatApp` and
`SidebarApp` objects constructs their own port instance, which
constructors — named `AppPort` — lives in `static/js/port.js`.

## No more `app.data.user`

As for `app.port`, now apps create their own user model instance, and
pass it to views or other models when appropriate.

## No more `app.data.users`

As for `app.port` and `app.data.user`, the `SidebarApp` is now
responsible of creating and owning a collection of users.