New personal project: Appcelerator (Titanium) Interface Designer
I’ve been working on several iOS application lately and building the interface is the most painful part. I’ve already developed simple JS framework which accelerates the process but I still feel my work could be a lot more effective if I have visual tool for base UI development. Since I’m Flex developer I’m kinda sure I’ll be able to develop it using this (and Adobe AIR) technology.
Project features
- Ability to visually design view layer of whole application
- Wire views together (using events/signals)
- Design table view’s item renderer
- Export code using my (currently private) framework
- Export code in MVC structure
- Save project as XML fire
I’ll keep you informed about project progress. Alpha version should be done within few weeks.
JS snippet: Recursively merging two objects in JS
Here’s easy and comfy way of merging 2 objects in JavaScript.
ObjectHelper = {
/**
* Recursively merge two objects
* @param {Object} targetObject
* @param {Object} sourceObject
*/
mergeRecursive: function(targetObject, sourceObject) {
for (var property in sourceObject) {
try
{
targetObject[property] = (sourceObject[property].constructor == Object)
? this.mergeRecursive(targetObject[property], sourceObject[property])
: sourceObject[property];
}
catch(e)
{
targetObject[property] = sourceObject[property];
}
}
return targetObject;
}
}
Usage is really simple:
var objectOne = {foo: 'bar'};
var objectTwo = {lol: 'cat'};
var mergedObject = ObjectHelper.mergeRecursive(objectOne, objectTwo);
// result {foo: 'bar', lol: 'cat'}