
In the previous chapter, we finally make flickry to work in the wild. But this doesn’t satisfy me, there are still some exciting improvements that could be done!
In this chapter, we will discuss about url routing or history management in this app.
Save The URL
Web pages or apps are url-based. However, Sproutcore apps are single-page app whose url never changes. This feature may sometimes challenge the habbit of users.
Apps like Gmail have already been enhanced for url routing support, which can be used to navigate inside app with the string after “#”. e.g.
http://yourapp.com/#controller/action/parameter
The content of emphasized string won’t make browser to refresh or go to any other address, but it’s useful to send state info to your app in order to decide which page or state you really want to see.
And users can really bookmark your url and click the back and forward buttons of browser!
In Sproutcore, url routing can be done with the help from SC.routes.
Important Changes
Before going any further, I am afraid that you have to do some patches on the existing files due to my own negligence.
In short, I’ve fixed a lot wired problems in Flickry and forgot to track down the minor changes to the project. You’d better pull the latest files from brach chp4.
Now I’m going to explain some of the most crucial ones. Read More