How does Titanium SDK work in the various platforms it supports (in 2013)?
Asked Answered
T

2

5

I haven't been able to find clear information about how Titanium SDK works.

  • What javascript engine is used in the various platforms? Wikipedia says they announced a plan to use v8 in 2011, but doesn't mention them actually using it. Do they use v8? Which platforms do they use that for?
  • How are native UI elements hooked into? Is UI really OS dependent, or does its API build to the lowest common denominator in some way?
Triserial answered 27/9, 2013 at 21:44 Comment(2)
possible duplicate of How Does Appcelerator Titanium Mobile Work?Echolalia
Yes thanks, Wahhab already gave me that link. It's from over 3 years ago and doesn't answer most of my questions. I'd like a more current assessment.Triserial
E
4

This is really too broad a topic, but I'll give a mile high view and show you some videos that dive into more detail.

In the current iteration, the high level view works the exact same way as in "How Does Appcelerator Titanium Mobile Work?", the main difference is that now Android uses V8, iOS uses JavaScriptCore, and they have added an MVC layer on top of Titanium called Alloy that lets you split things up nicely.

The two main platforms do things fairly radically differently under the covers, check out this video on iOS internals, and this one on Android internals.

The view system works by native objects being wrapped by JavaScript objects, with a bridge between them that sends eventing information and updates. If you really want to know more, just look at the source, but that is not at all necessary for development.

But, all that is about to change with Ti.Next, which will be a fundamental shift from cross-coding UI components per platform, the core engine will be the same across platforms, and written in ASM generated code, all that to say, don't get hung up in the details, just code the thing.

Echolalia answered 28/9, 2013 at 18:49 Comment(1)
This is really helpful stuff! Thanks! I'll accept this as an answer in a few days if its the best then ; )Triserial
C
2

How Does Appcelerator Titanium Mobile Work?

This question would give exactly your answer

Ok and here answers of your questions specifically

1)JavaScript V8 engine is used only on android (Not iOS) to boost the performance of android app

2)The UI is OS dependent because titanium converts the js code into native so the same elements would look in different way in android and iOS

Thanks

Congener answered 27/9, 2013 at 21:47 Comment(1)
Thanks! Thats super helpful, not sure why i didn't find it originally. I would be inclined to have a more up to date answer tho. The one you linked to is from 2010Triserial

© 2022 - 2024 — McMap. All rights reserved.