Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Javascript Objects & Titanium

Hi have some general questions about best practices when coding for titanium.

  1. Does titanium have problems with object oriented javascript? For example
    ~~~
    var data = {
    color: 'red',
    size: 5.5,

returnInfo: function() {
return this.color;
}
};
~~~

  1. Does Titanium manage memory for you? In Obj C you must alloc and release objects, what happens in Titanium?

  2. My application seems to work with SDK 3.1.3 but not 3.2 when using Titanium. Are there some general differences that I need to be aware of?

Thanks in advance!

— asked April 20th 2010 by Alex Wolfe
0 Comments

2 Answers

    1. yes
    2. yes, but may be a good practice to close or remove the windows, views, elements you don't need it anymore.
    1. maybe somebody from the stuff can give you an answer
    — answered April 21st 2010 by Dan Tamas
    permalink
    0 Comments
  • I know that it is an old discussion but I’d love to start it again. Actually I didn���t find anything clear enough about best practices developing Javascript for Titanium. Maybe I didn’t look for it correctly. I’ve been reading “JavaScript: The Good Parts” again, but exists another different recommendation regarding Titanium development?

    — answered November 7th 2011 by Cleydson Silva de Andrade
    permalink
    2 Comments
    • Hm, discussion is two years old.

      Anyway, you can find some interesting stuff in Wiki (although some things could and should be better) and in QA (which I currently cannot find :) ).

      You could also ask here once more :D

      — commented November 7th 2011 by Ivan Škugor
    • Ops…
      You are right. Javascript - Mobile Best Practices

      I’m totally newbie in Titanium world. Tks a lot.

      — commented November 7th 2011 by Cleydson Silva de Andrade
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.