Sencha Architect 2¶
Sencha Architect 2 is a great tool for creating ExtJS and Sencha Touch applications. In this article we will show how you can easily use Bancha and Sencha Architect together. For general information about Sencha Architect, please go to the Sencha Website.
Setup Sencha Architect
Setting up Sencha Architect to use Bancha is simple.
Just click in the Project Inspector (top right of Sencha Architect) on the plus sign and select Resource/JS Resource. Now set the url to /bancha/js/ScriptTagInitializer.js.
Creating Bancha models
- Create a new Model
- Set userClassName to the CakePHP model name (e.g. User)
- Add a new config 'bancha' and set it to true
Because Sencha Architect 2 does not provide any way to augment the data, we can't display the available model fields inside Sencha Architect. Of course, in the browser Bancha will automatically inject all the fields, validation rules, associations and proxy configuration.
Using CakePHP Controller Methods
Screencast of usage in Sencha Architect
We have created an example app using the above described integration with Sencha Architect 2. It handles authentification, has different user levels and uses MVC. Here are the resources: