O'Reilly logo

Sencha MVC Architecture by Ajit Kumar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Routing and history

In Sencha Touch, controllers can now directly specify which routes they are interested in. This enables us to provide history support within our app, as well as the ability to deeply link to any part of the application that we provide a route for.

This is achieved by setting the routes configuration on the controller, shown as follows:

refs: {
          usersPanel: 'userlist'
},
routes: {
         'list': 'showUsersList',
         'users/:id': 'showUsersByDepartment'
}

In the previous code, we have defined the routes config on our Users controller where we have defined two routes—list and users/:id . Each of these two routes corresponds to a method inside the controller. The list route points to the showUsersList method of the controller and the users/:id ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required