Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?
like image 853
B T Avatar asked Sep 27 '13 21:09

B T


2 Answers

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.

like image 102
Josiah Hester Avatar answered Oct 12 '22 13:10

Josiah Hester


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

like image 20
Wahhab_mirza Avatar answered Oct 12 '22 12:10

Wahhab_mirza