
Nativescript: Build truly native apps with JavaScript - steffenmllr
https://www.nativescript.org/
======
sheraz
Is it actually "native" if it is a JS interpreter passing calls into the
runtime? Yes, it is native widgets and UI, but the "brains" of the operation
are seemingly outside.

PS - I have no idea what I'm talking about.

~~~
coldtea
Native is mostly about widgets and UI -- which is what matters to the user.

Else even Objective-C apps, with the Obj-C messaging system are not native,
e.g. they delegate a lot to C-based APIs...

~~~
jawngee

        Else even Objective-C apps, with the Obj-C messaging 
        system are not native, e.g. they delegate a lot to 
        C-based APIs...
    

For starters, that doesn't make any sense. Note the `C` part of Objective-C.

Secondly, native infers compiled to executable native code, not interpreted or
JIT'd via an intermediary.

~~~
coldtea
> _Secondly, native infers compiled to executable native code, not interpreted
> or JIT 'd via an intermediary_

And the GUI/Widgets part you get to use through JS here is just that (the
native implementation from the OS GUI libs), which, as I said, is what users
really care about when they ask for native apps.

See also the sibling comment about .NET apps and Windows.

~~~
doktrin
> which, as I said, is what users really care about when they ask for native
> apps

That's true, but that's not what developers understand "native" to mean. Since
most readers here are technical in some fashion, it makes more sense to use
the more specific definition of the term (e.g. compiled, not jit'd,
interpreted or otherwise managed)

------
wlindner
How does Nativescript compare to Appcelerator Titanium or React Native? I know
React Native hasn't been released, but they described their approach at the
recent React Conf and was curious if it's similar.

~~~
jakejake
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 promotes their abstracted cross-
platform API as a kinda optional add-on to the platform.

That's just my thoughts after looking at it for 5 minutes.

~~~
fokinsean
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.

~~~
sheraz
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.

~~~
pbreit
They lost me with the switch to Alloy.

~~~
sheraz
Exactly, I started on Alloy and quickly found that there was too much magic in
going from templates to js code.

Once I took a step back to Titanium it all felt a lot more sane. Yes it is a
little more verbose, but at least I can follow the data flow in code.

Appcelerator is going through some changes as of this week[1] which I hope
will improve the documentation and ecosystem around the product.

[1] - [http://techcrunch.com/2015/03/04/appcelerator-slashes-
staff/](http://techcrunch.com/2015/03/04/appcelerator-slashes-staff/)

~~~
pbreit
Also, their by far best evangelist, Kevin Whinnery, left for Twilio a year or
two ago.

------
gagege
I tried out their little Tasks app on Android that is supposedly build with
this. It's very unfinished. Slow too. I was kind of getting excited about
this, but so far I'm not impressed.

~~~
mark_l_watson
I haven't tried NativeScript, but I am curious why it would be slow. Slow
JavaScript engine on mobile platforms? Emulation library perhaps is not
efficient?

I would appreciate some feedback. I just wrote a Firefox addon to work with a
rich web app I am working on, and it would be nice to also provide "native"
apps. BTW, most of my client code is Clojurescript; has anyone tried
NativeScript with Clojurescript?

~~~
bmj
I have fairly extensive experience with Titanium, and my impression is that
the UI can get very laggy if you are not very careful with the way you
generate and manipulate the elements on the screen. Going "over the bridge"
(parlance for communicating between the JS and native layers via the proxy) is
quite expensive.

------
deitcher
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?

~~~
troymc
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/](http://www.mobilechameleon.com/) (hosted for
free by Weebly, a YC alum).

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

~~~
pbreit
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.

~~~
pjmlp
Because many of us only touch it in the browser?

------
mike_hearn
AWT sallies forth once again! :)

No surprise that their screenshot shows a calendar widget. Such things are
very easy to abstract. We know from bitter experience in the desktop world
that the pain starts in more complex scenarios than a few buttons and complex
widgets that have thin interfaces.

------
360fy
In my opinion, with current architecture NativeScript won't be that
performant.

They have very thin layer of native runtime, but majority of the UI core
modules are kept in JavaScript/TypeScript. UI rendering will require too much
of to-and-fro between V8 engine (or JavascriptCore) and NativeScript runtime.

Ideally they should have pushed much of the UI core modules in the runtime
itself, along with JavaScript modules that have fewer calls to layout a view.
Their current methodology would require too many proxy calls just to set
layout properties.

------
segphault
I'm really happy to see NativeScript launch. I spent some time experimenting
with it while it was still in beta. It's a rather young project, but I think
it has a lot potential. Telerik got a whole lot of things right when they
worked out the architecture.

------
bonn1
Do they have a showcase where the same app is implemented on both iOS and
Android?

~~~
TylerJay
I don't think so, but I'll second a request for that! I think it would be good
to have on the Showcases page.

Here are some examples that have _some_ UI widgets in common, like list
elements/navigation, but they are clearly different apps so it's not blatantly
obvious which differences are based only on the platform:

[https://www.nativescript.org/showcases](https://www.nativescript.org/showcases)

------
jokoon
That's how every windowing system should work.

Instead of deploying binaries, just fetch some script and execute it.

I dream of the day an OS will allow a scripting language to do the "easy"
stuff, like buttons, interfaces, etc.

Of course you might still need to allow the installation of signed binaries
for certain programs that need to make some low level stuff, like databases,
3D games.

I wonder if an OS which is very flexible and easy on the developer can win
though.

------
elwell
The code examples don't look very pretty. My money's on React Native.

------
chris-at
> NativeScript is licensed under the Apache 2.0 license.

but then it says (see Roadmap):

> Go-Live license. Developers will be able to use NativeScript framework in
> production applications.

What does that mean?

------
thoughtpalette
Really like to see how this compares to React Native

~~~
attatae
Yes, Facebook Groups for iOS is built in React Native. Unfortunately, it is
quite slow.

For my startup, I think we'll use React/RN just to get something "native" on
mobile, until we can do it proper with Swift/Java when we have time/devs.

Comparison, FB Groups app and the regular FB app. Latter way better.

------
Lidador
Great, I didn't know about React Native and now I know. Great stuff, looks
promising.

------
revskill
How to read from SQL Database ?

------
Firegarden
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.

~~~
pbreit
Whoever eventually delivers a viable offering will clean up in the corporate
apps market. Companies have lower expectations for internal apps and don't
want to hire Java and Swift developers to create each.

~~~
Iftheshoefits
Companies who have such low expectations already have alternatives in the form
of a WebView with extra bells and whistles, like cordova or any of the
numerous JS-based native-but-not-really frameworks and libraries. This is just
one more among many, many similar alternatives.

