Why to mix front-end MVC framework with back-end MVC framework?
Therefore I upgraded my good old sencha-touch-rails gem and now will explain a little how to use it.
It will insert only the core of Sencha Touch framework, but with enabled Ext.Loader, so the components will be loaded on the fly when it’s requested.
Now lets rename our application.css to application.scss, and we’ll be able to use @import rather than *= require (Sencha Touch is using a lot of Sass mixins and variables in different places, so @import is more friendly to it and does not require extra tuning and load order attention).
Sencha Touch comes with set of ready to use themes (sencha-touch, cupertino, cupertino-classic, tizen, bb10, wp and mountainview).
As I start a fresh project, I wonder how to name my first controller… Thе minimum is not to create controller at all. I’m gonna create a blank action with enabled layout in my ApplicationController, and forward root to ‘application#blank’. It’s working.
app/controller/application_controller.rbdef blank; render inline: "", layout: true; end
We need a Sencha application initialization script, and it will be nice to use coffeescript. Create init.coffee file:
That’s it. We have a nice looking page with bottom navigation bar and page transition effect.