whiskeylover/idreamoftoast — pull request #17 by danriti (2013-05-21 02:59:01+00:00)
Title: Merge separate html files into one

@whiskeylover so I noticed that you initially developed the site, you split the front end functionality into two separate html files:

- `index.html`
- `dream.html`

This design doesn't take full advantage of the "single page app" design because it requires you to load a second html file while using the site. While it's not a major disadvantage, to truly harness the power that is Backbone (and all other Javascript MVC frameworks), you really want to front load as much as physically possible on the first load.

Thus, I'm proposing the following change:

- [x] Merge `dream.html` into `index.html`
- [x] Make use of Backbone views to separate the two existing views (index and dreams)
- [x] Make use of Backbone routes to allow easy navigation through the application

The proposed routes are:

- `/` goes to what is currently loaded in `index.html`
- `/#dreams` goes to what is currently loaded in `dream.html`
- `/#dreams/:name` goes to what is current loaded in `dream.html#show/pizza`
- `/#about` will goto the future about page

I understand this is a major change, however this is the right time to do it, as it will allow us to be more flexible in the future and grow the sites features.

As always, I'd like to hear your thoughts and lets discuss before we make any changes!