Titanium Livestream March 2019 Recap: The Databind Edition

Welcome back for another edition of Titanium Livestream recap!

For the latest installment of our Titanium Livestream series (featured on Twitch), Developer Evangelist Rene Pot switched gears for a deep dive tutorial on databinding with Titanium. In the full episode, which you can watch below, Rene demonstrates some useful databinding techniques and explains how the code is handled under the hood — even showcasing how to implement your own custom databinding.

To get things started, Rene demonstrates (from start to finish) how you can bind a collection to a ListView, and also how to bind a model to a window. This includes an under-the-hood look at the generated code, as well as a display of how that code is rendered in Titanium. To try this yourself, check out our demo app on GitHub for a reference to the code that offers even more functionality.

Following the main tutorial, he then dives into how Titanium users can use the code generated to roll your own custom databinding. Once again, if you’d like to get your hands dirty, take a look at our chat widget to try out custom databinding for yourself. Don’t forget, you can also reference the official backbone.js page for more information.

We host our Titanium Livestream every month. So, be sure to mark your calendar and tune-in for the next one on Thursday, April 11 at 1 p.m. EDT. And check out our event page on Twitch to stay up-to-date on all Titanium Livestreams.

You can catch the full episode below, or visit our YouTube channel to check all installments.

1 COMMENT

  1. Thanks Rene. Good summary of data binding in Titanium. Learnt something new which is that model.attributes.title is a more performant way to access a property rather than model.get(‘title’). Thought it strange though when you set an id in your custom data when in the transform function you already had the model (and hence an id). I normally do:

    function transform(model)
    {
    var model = model.toJSON();
    //do something to the model
    return model;
    }

    Also, creating models in Alloy needs the model definition name ie
    var model = Alloy.createModel(‘modelName’, data);

Comments are closed.