News for hackers. Stuff that matters.
Re:Show HN: Our first iPhone app, built entirely in JavaScript by mcrider on Tuesday February 14, 2012 @07:39PM (#3592483)
Whoa, didn't know Titanium compiles javascript into native code. Cool! But Phonegap has a pretty rich set of plugins and its relatively painless to extend Phonegap's functionality with a plugin. Did you have to hack in your geofencing capability? There's no plugin framework?
Re:Show HN: Our first iPhone app, built entirely in JavaScript by robterrell on Tuesday February 14, 2012 @08:57PM (#3592666)
No, Titanium doesn't compile to native code. He's using that as shorthand for "Titanium uses JavaScriptCore to implement a bridge that lets your JavaScript call native code". Your JavaScript remains interpreted (and will not be JIT compiled, as in Safari, since your app won't have the JIT entitlement) but in my testing of JSCore it's not generally a bottleneck.
Re:Show HN: Our first iPhone app, built entirely in JavaScript by stevenou on Tuesday February 14, 2012 @07:49PM (#3592511)
There is a module framework, but since the Titanium framework already created a CLLocationManagerDelegate in their GeolocationModule, I didn't see a clean way of adding geofencing in a separate module. So I hacked it right into the existing GeolocationModule. Again, the performance difference between native code and rendering HTML5 is huge, and that's why we decided against PhoneGap. Personally, if HTML5 wrappers were the only option, I probably would've just sucked it up and went native Obj C. Like someone else mentioned, there are a lot of challenges to making an HTML5 app perform like a native one.