Live data from Hacker News

Nativescript: Build truly native apps with JavaScript

nativescript.org

21–30 of 71 posts

Re: Nativescript: Build truly native apps with JavaScript

#21

Earlier quoted context omitted.

Those are rendered with a webview. Nativescript is rendered with native components.

How do "native" hybrid apps such as, react native, titanium, etc. access the native components of the phone? I have been developing a side project using ionic and have had a fairly positive experience so far, but from what I understand ionic/phonegap apps are just wrapped web browsers is that right?

It's pretty much identical at a high level: there is a proxy layer that is much like a message passing system. A component (web view, JS engine, etc.) says, "Take a photo with the camera" and the proxy layer calls the native code needed to take the photo with the camera.

The actual camera data is just abstract data, it doesn't care if it was generated from a JS call or from a native call.

PhoneGap and Cordova are, at the core, just a standard proxy layer and plugin API. The other "pure JS" solutions have their own custom layers.

Re: Nativescript: Build truly native apps with JavaScript

#23
post #4

Earlier quoted context omitted.

I try to keep track of all those platforms, and you're right, it's hard. My findings are summarized at http://www.mobilechameleon.com/ (hosted for free by Weebly, a YC alum).

Holy shit I never realized how many hybrid app frameworks there are. Nice site by the way.

Well, it appears there are only 2 in the most interesting category: Titanium and NativeScript.

My sense is that it's surprising we still don't have a decent way to build native apps in JavaScript. Titanium looked like the answer but I have trouble following where they're going. NativeScript looks promising so far but cannot figure out the tie-in to Telerik.

Re: Nativescript: Build truly native apps with JavaScript

#24

Earlier quoted context omitted.

I don't know about React native, but I used Titanium for a while and this looks very similar. The biggest conceptual difference from what I can see is that Nativescript allows you to make calls to any native API method. With Titanium you can only call those native APIs that have been wrapped. With Titanium, I suppose you could say that the cross-platform wrapper API and the product are one in the same. Nativescript p…

I just took a look at Titanium and holy moley their documentation was overwhelming. I haven't used a "native" hybrid app framework yet (only have experience with ionic), but NativeScript looks a bit more accessible to me than Titanium does.

I say the documentation is pretty ok once you get familiar with how the API is laid out. And for everything else they have the developer QA section, which is like a self-hosted stack-overflow.

I've been building a couple of simple apps on it the last few months, and it has been a pleasure.

I should be clear here -- I've been using Titanium, not Alloy.

Re: Nativescript: Build truly native apps with JavaScript

#25
post #3

I like the idea, but I wonder if it will ever take off. So many "build in your preferred language, publish to some other" platforms have been released, it is hard to keep track. I will admit that html+css is a relatively good (set of) language(s) to describe a UI, and JS is the way to tie the dynamism together and provide client-side logic. But is it better than just learning the native version for each platform?

There are remarkably few where preferred_language=JavaScript. This, Titanium and perhaps React.

Re: Nativescript: Build truly native apps with JavaScript

#26

Native apps with JavaScript? Give me a break. The only "Native" apps worth writing in JavaScript are web apps. Thank you coming out Nativescript - pack a lunch.

Cross-platform compatibility is a genuine problem and Nativescript attempts to solve it, just like Titanium, Ionic, and React JS (which is used in production for Facebook Groups).

Write/learn once deploy anywhere is valuable to a lot of people. If you don't like it that's fine because there's no singular best solution and the tradeoffs don't appeal to you. But they at least deserve your respect for trying.

Re: Nativescript: Build truly native apps with JavaScript

#27
post #4
post #3

I like the idea, but I wonder if it will ever take off. So many "build in your preferred language, publish to some other" platforms have been released, it is hard to keep track. I will admit that html+css is a relatively good (set of) language(s) to describe a UI, and JS is the way to tie the dynamism together and provide client-side logic. But is it better than just learning the native version for each platform?

I try to keep track of all those platforms, and you're right, it's hard. My findings are summarized at http://www.mobilechameleon.com/ (hosted for free by Weebly, a YC alum).

What a nice site. A small but useful curation presented in a very simple and clean way.

Btw, you may need an addition for Swift, I believe there is at least one cross platform tool for it now.

Re: Nativescript: Build truly native apps with JavaScript

#28
post #24

Earlier quoted context omitted.

I just took a look at Titanium and holy moley their documentation was overwhelming. I haven't used a "native" hybrid app framework yet (only have experience with ionic), but NativeScript looks a bit more accessible to me than Titanium does.

I say the documentation is pretty ok once you get familiar with how the API is laid out. And for everything else they have the developer QA section, which is like a self-hosted stack-overflow. I've been building a couple of simple apps on it the last few months, and it has been a pleasure. I should be clear here -- I've been using Titanium, not Alloy.

They lost me with the switch to Alloy.

Re: Nativescript: Build truly native apps with JavaScript

#29

Earlier quoted context omitted.

How do "native" hybrid apps such as, react native, titanium, etc. access the native components of the phone? I have been developing a side project using ionic and have had a fairly positive experience so far, but from what I understand ionic/phonegap apps are just wrapped web browsers is that right?

It's pretty much identical at a high level: there is a proxy layer that is much like a message passing system. A component (web view, JS engine, etc.) says, "Take a photo with the camera" and the proxy layer calls the native code needed to take the photo with the camera. The actual camera data is just abstract data, it doesn't care if it was generated from a JS call or from a native call. PhoneGap and Cordova are, at…

That's pretty cool, thanks for the insight!
Post reply on HN