Web technology is evolving swiftly and discovering new horizons as every year we are seeing something new coming for developers, so if we say if there are apps to develop then there are development tools to help developers. The app market is...
seen from United States
seen from Russia
seen from China
seen from United States
seen from Macao SAR China
seen from China
seen from Türkiye
seen from China

seen from Australia
seen from United States
seen from United Kingdom
seen from United States
seen from Australia
seen from Singapore
seen from United States
seen from United States

seen from United States
seen from Malaysia
seen from China

seen from Malaysia
Web technology is evolving swiftly and discovering new horizons as every year we are seeing something new coming for developers, so if we say if there are apps to develop then there are development tools to help developers. The app market is...
Mobiloitte is a Titanium Apps Development Company. We offer services to design and develop cross-platform mobile apps with Titanium integrated MVC framework, IDE, API, Titanium SDK, and mobile test automation.
Working with the Titanium mobile application framework for the better part of the last year, I have developed a sort of appreciation
Appcelerator Guide
Quizá empiece a subir pequeños textos o blogs con información de Appcelerator para todas aquellas personas que van iniciando con él tal y como yo : )
Quizá...
Learning Appcelerator - Titanium Alloy
https://wiki.appcelerator.org/display/guides2/CommonJS+Modules+in+TitaniumlaNow that I’ve completed my Master’s program I finally have more time to put into personal projects. One of which will (hopefully) be a cross platform mobile app -- the easiest way I have found to do this so far is to utilize the appcelerator titanium studio IDE which takes an app written in Javascript and compiles it into a cross platform app! Alloy also forces users to write their code in an MVC framework (really nice!)
This overall should save a lot of time, however the learning curve is pretty high. This first post will address initial learning curves and how I got around them since documentation is sort of spread out between appcelerator.com and stack overflow and I had a lot of difficulty finding some workarounds.
The first learning curve to overcome was the idea of modules -- Titatnium specific APIs for interacting with hardware in a cross platform way. There are a lot of free modules on the appcelerator store but many of them have not had work done on them in years, and use deprecated methods -- so far this is the biggest drawback of appcelerator so far me since if I cannot find a module in the store, I am forced to explore github modules until I find one that works. Also the modules in the store that have consistent updates can be pretty expensive -- one barcode app from Scandit asks for $199/mo to use their module (pretty outrageous if you ask me, especially when I found a decent free module).
Once a module has been found the easiest way to install these is to copy the .zip link and paste it into help->install mobile module. If the module is compatible with your project it will appear in the tiapp.xml configuration menu options.
The next (and most frustrating) hurdle I had to overcome was how to call funcitons across .js files. The documentation on this is not too clear so here’s exactly how I got it to work eventually.
First I created a normal javascript file and wrote some functions I needed in it like I would normally do in Javascript. To make the functions inside this script visible to the rest of the app, I first need to mark which functions in the script will be public using appcelerators ‘exports’ function call. So for example I wanted to ensure camera permissions were granted through a function called camera -- to make it public I called: ‘exports.camera = camera;’ at the end of the file. If I want more public methods then I need to add them all in this same way to the end of the file. Note: you can also make the call via 'module.exports = camera’ -- however ONLY make your calls in either the way I did it, OR this way -- mixing can cause errors). This now makes this file what is called a CommonJS module.
Second this file must be placed in a new folder (the name doesn’t matter, but I called my folder ‘lib’) and this new folder MUST be under the ‘app’ folder -- so looking at the auto generated file system for an application, right click on ‘app’ and create your new folder and save your .js module there.
Third, in order to use this js module in say app.js, I now have to create a variable that refers to this module (sort of like creating a module object). This is done with: ‘var whatever = require('commonjs');’ (NOTE: do not append .js to the end of the js file name) where commonjs is the module I made earlier. Now I can call functions that I made public like: whatever.camera();
It is important that commonjs modules get placed in their own folder under app -- the require call will start looking in app for modules -- if you want to make calls from other folders in app to the lib folder, you need to go up directories as needed. So say you also have a folder called ‘ui’ in the app folder and from ui you want to call lib-- then the call is var whatever = require(’../lib/commonjs’).
Useful resources:
https://wiki.appcelerator.org/display/guides2/CommonJS+Modules+in+Titanium
https://archive.appcelerator.com/question/146003/accessing-a-function-from-other-js-file