London Titanium Podcast Episode 1 – Titanium Data Handling

On Thurs 6th Feb, Pratik Patel (CTO of TripLingo and TITAN) spoke at the London Titanium Meetup on Data Handling within Titanium Apps. Looking at performance considerations, data options available and thoughts on architecture. He even threw in some live coding. He discusses SQLITE, JSON, NOSQL, UNDERSCORE and more.

This will be an ongoing series of recorded talks, past, future and present.
Hope you enjoy.

Founder of Spirit Quest Limited, freelancing in web design/development space since 1998 and speaker. I come from a design/UX/UI background yet moved into frontend LAMP based systems before immersing myself in mobile development. Have worked with Government/Public Sector, Charities and Ethical Businesses. Involved in Titanium Mobile development since 2010. Co-Founder and current organiser of the London Titanium Usergroup. Mobile Dev for T-10, the NASA "Most Inspirational" winning 2013 Space Apps Challenge. I freelance, contract and have a few apps brewing to be released this year.


Comments

  • Sam

    I’m trying to understand (via audio) the performance trick Ketan used for Tableview rows:

    _ = require(/libs/underscore);

    // So the Slow performance:
    var rows = _.each (rawArr, function() { createTableViewRow(…) })

    // Better Performance:
    var rows = _.map (rawArr, function(num){ return createTableViewRow } … ?

    Couldn’t visualize the better performance example?

  • Dave

    Yea ideally some of the code snippets / examples would be beneficial.
    There’s only so much you can gain from the audio recap.

  • Sam

    Did you get how the better performance pseudo would look like for creating the rows out of the Array?

    I’m imagining create the row once, and pass it to each of the data?

    var row = Ti.UI.createTableViewRow();

    var TableViewrows = _.map (rawArr, function(obj){ return row.title = obj.title } … ?

    not getting it via the audio :)

  • Yozef

    Yeah, seems like I’ve been creating the rows the bad way, by looping through the array, and creating a Row for each object in the array.

  • pratik patel

    I posted the code snippet here:
    https://gist.github.com/prpatel/8936551
    Remember, this is ‘demo code’ so don’t just copy and paste it. You’ll need to study it a little and adapt it to your needs.
    Also remember that using createTableViewRow is perfectly acceptable (and desirable) in some situtations, particularly when:
    * you need to have elaborate styling involving multi-line text, images, etc
    * you have a small number of rows in the table

    Another technique I mentioned is that using createTableViewRow with dynamically loaded rows after the first full “screen” can work, just need to be careful and test.