Definition of "Native"? HTML/CSS apps?
I'm struggling with misinterpretation, differing opinions, and ambiguous language with regards to Titanium Mobile, and exactly what it does.
I've come here for definitive answers.
The word "native" is uttered frequently on this website and introductory videos. I know what's implied by this, but I'm not clear on the truth - and everyone has a different opinion. Most people are telling me that it is "compiled to native code". Is this true? Really?
I believe that the UI APIs and other APIs are executed natively. Platform-specific library. I found a presentation that was given at OSCON. In these slides, it is stated that: "A Titanium application is a JavaScript program that is interpreted at runtime on the device". Now that sounds plausible to me. But that's not "compiled to native code".
Apparently, I can develop my apps in HTML/CSS. I can see that within the app.js, I can attach a web view webkit browser component. But then the javaScript within my HTML is treated differently from the javaScript in my main program. It would just run within webkit. No "native" advantage here. Or have I got it wrong?
3 Answers
-
@daniel Have you seen the latest marketing ? Go look at the front page, it's shameless.
-
Its pretty simple daniel…
1.when you code your app in Titanium(in java script) , during compiliation (on the development machine)..the Titanium SDK coverts all the javscript codes to native codes..While deployment the native codes specific to the Devices are alone deployed or packaged for the devices…
2.create a sample application in Titanium and compile it for android.After a success full run on the emulator.. go to the code base of the sample project and inspect the files and folder architecture under build directory… you can see them similar to those encountered if you develop natively for android using Eclipse…
-
Daniel -
Titanium creates both native code and runs via an interpreter at run-time. The 'heavy-lifting' is done native code side.
So, on animations, you are really accessing the core animation libraries on the device. That's native code. But you are setting up the transforms, etc, using JavaScript.
There is no 'hype' here - native code is generated. Look at the source that's created.
You get code efficiency and cross-platform for 80% of the APIs in question. Developers build high-profile, high-performing apps all the time (look at the home page for examples) and collectively, we're the largest publisher of iOS apps on the market today.