Skip to content

Commit

Permalink
small format changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraen committed Apr 22, 2012
1 parent 4975853 commit 237b7a3
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions README.rst
Expand Up @@ -11,16 +11,13 @@ using basic technics and principles.

Component oriented
==================
TitanTricks has been completely refactored to commonJS modules. Following Appcelerator guidelines, the app only uses
commonJS modules.
TitanTricks has been completely refactored to commonJS modules, following Appcelerator guidelines.

Specific app components are defined inside 'app' folder, using one js file for each component (AppWindow, DemoWin, IndexView...)

Reusable components are now in commonJS modules, under 'components' folder.
Also, reusable components are now commonJS modules, under 'app/ui/components' folder.

All TitanTricks components can be easily reused. Copy and paste 'modules' folder and require() them. Since TitanTricks modules
are organized in types (UI, network, data...), you may want to load in properties of a global object. Note that, at this time,
TitanTricks only provides UI components, but this may change in future
All TitanTricks components can be easily reused. Copy and paste 'components' folder and require() them in your project.


Coding style and commonJS modules
Expand Down Expand Up @@ -48,7 +45,7 @@ Specific styles for some demos are declared inside each demo view.

Tools.js file includes some useful and reusable functions and is required all along the project.

If you don't know how to use commonJS modules on Titanium, these two reads will help a lot:
For more info about how to use commonJS modules on Titanium, these two reads will help a lot:

http://wiki.appcelerator.org/display/guides/CommonJS+in+Titanium

Expand All @@ -67,7 +64,7 @@ to avoid pollute the global scope.
var Mods = require('/ModulePaths');
var AppWindow = require(Mods.APPWINDOW);
var AppWindow = require(Mods.APPWINDOW);
var appWin = new AppWindow();
Expand Down Expand Up @@ -116,7 +113,11 @@ launch the demo from the index table.
}
demoInfo.createView = function(){
//implement here your demo
var view = new DemoTemplateView(demoInfo);
//implement here your demo and build over the view component
...
return view;
};
module.exports = demoInfo; //make it public
Expand Down

0 comments on commit 237b7a3

Please sign in to comment.