titanium 入门 3 Alloy: 惯例优于配置( convention over configuration)
访问量: 14537
alloy 框架跟Rails特别像:
app |
Contains the models, views, controllers and assets of the application. All work should be done here. See folder descriptions below. |
app/alloy.jmk |
Build configuration file. |
app/alloy.js |
Initializer file used to preconfigure components or override Alloy methods before the main controller is executed. |
app/config.json |
Project configuration file. |
app/assets |
Contains image assets and other files that need to be copied into the Resources directory. |
app/controllers |
Contains controllers in the format filename.js to a corresponding view file app/views/filename.xml. |
app/lib |
Contains application-specific library code, typically in the CommonJS format. |
app/migrations |
Contains database migration files in the format <DATETIME>_filename.js. |
app/models |
Contains model files in the format filename.js. |
app/styles |
Contains view styling in the format filename.tss, which is applied to a corresponding view file app/views/filename.xml. |
app/themes |
Contains themes to customize the assets and styles of the entire GUI. |
app/views |
Contains views in the format filename.xml with the optional corresponding files app/controllers/filename.js and app/styles/filename.tss. |
app/widgets |
Contains widget files. Each widget will have its own app-like directory structure. |
i18n |
Contains internationalization and localization files. Same usage as with a Titanium application. |
Resources |
Contains the Titanium files generated by the Alloy interface from the app directory. All files will be overwritten each time the application is built. |