8 ms·
Nativescript: Build truly native apps with JavaScript
- mike_hearn 12y agoAWT 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.
- wlindner 12y agoHow 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.
- 1971genocide 12y agoNot everyone is a fan of react.js, this is a nice alternative for people who want to use vanilla js.
- Svenstaro 12y agoOr Cordova/Ionic/PhoneGap?
- IanDrake 12y agoThose are rendered with a webview. Nativescript is rendered with native components.
- fokinsean 12y agoHow 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?
- yesimahuman 12y agoIt'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.
- fokinsean 12y agoThat's pretty cool, thanks for the insight!
- jakejake 12y agoI 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.
- albemuth 12y agoTitanium's Hyperloop/Ti.next tackles this problem, too bad the timeframe for release seems to always be 6 months from whenever you happen to check.
- fokinsean 12y agoI 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 12y agoI 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 12y agoThey lost me with the switch to Alloy.
- sheraz 12y agoExactly, 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/
- deitcher 12y agoI 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 12y agoI 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 12y agoHoly shit I never realized how many hybrid app frameworks there are. Nice site by the way.
- pbreit 12y agoWell, 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 12y agoBecause many of us only touch it in the browser?
- 13years 12y agoThere is also Tabris.js
- 12y ago
- thoughtpalette 12y agoReally like to see how this compares to React Native
- attatae 12y agoYes, 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.
- deleted 12y ago[deleted]
- bonn1 12y agoDo they have a showcase where the same app is implemented on both iOS and Android?
- TylerJay 12y agoI 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
- gagege 12y agoI 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.
- joshuahutt 12y agoAgreed. Quite unimpressive. The transition between views was sluggish at best.
- mark_l_watson 12y agoI 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 12y agoI 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.
- andymcsherry 12y agoExtraordinarily slow, it took me about 30 seconds to load the app initially on the newest Moto X.
- Firegarden 12y agoNative 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.
- kin 12y agoCross-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.
- pbreit 12y agoWhoever 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.
- wmf 12y agoBut if your expectations are low enough you can just use an HTML-based framework like Cordova.
- Iftheshoefits 12y agoCompanies 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.
- readymade 12y agoNativeScript: The Framework for developers with low expectations!
- pjmlp 12y agoBig corporations doing off shore development with low expectations are already use the web view based solutions.
- segphault 12y agoI'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.
- sheraz 12y agoIs 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.
- arturadib 12y agoHaha, I wish more people were as honest as you are!
- coldtea 12y agoNative 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 12y agoElse 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.
- cwyers 12y agoI don't think anyone considers .NET apps non-native on Windows.
- jawngee 12y agoI'm pretty sure they're considered `managed`, not native. Otherwise, .NET Native wouldn't exist: https://msdn.microsoft.com/en-us/library/dn584397(v=vs.110).aspx https://msdn.microsoft.com/en-us/library/dn584397(v=vs.110)....
- coldtea 12y ago>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.
- elwell 12y agoThe code examples don't look very pretty. My money's on React Native.
- Lidador 12y agoGreat, I didn't know about React Native and now I know. Great stuff, looks promising.
- whytry 12y agoI'd like to know how this compares to cloud-based web presences.
- revskill 12y agoHow to read from SQL Database ?
- chris-at 12y ago> 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?
- jokoon 12y agoThat'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.
- 360fy 12y agoIn 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.