Skip to content

Instantly share code, notes, and snippets.

@lbrenman
lbrenman / _readme
Last active October 30, 2020 14:05
Appcelerator Titanium Hello Alloy Model
Hello Model
Models are useful for updating controls based on data updates. Without models when data changes you need to manually update every control that is associated with the data (e.g. label, tableVIew, …). By binding your controls to a model, you can simply update the model’s data and all the controls will be updated automatically.
Here are the steps for a basic model demo. For reference, the online docs are here:
http://docs.appcelerator.com/platform/latest/#!/guide/Alloy_Data_Binding-section-36739592_AlloyDataBinding-Model-ViewBinding
* Add model and select “properties”
@lbrenman
lbrenman / _readme
Last active April 19, 2017 22:28
Appcelerator Titanium ti-mocha simple titanium example
Titanium has no built in Unit Test as Xcode/ObjC and Android Java have
Jasmine and Ti-mocha are the two main unit test frameworks for titanium
Jasmine runs without requiring the app to run
Ti-mocha runs while the app is running
Using T-Mocha
@lbrenman
lbrenman / _readme
Last active August 29, 2015 14:06
Appcelerator Titanium tijasmine simple titanium example
tijasmine Unit Test Demo
* Have a working project
- Note that i created a utils.js file in the lib folder with my business logic methods
e.g.
exports.concatName = function(a,b) {
return a.substring(0,1).concat(b);
}