Live data from Hacker News

Exponent – Build native apps in JS that work across both iOS and Android

getexponent.com

111–119 of 119 posts

Re: Exponent – Build native apps in JS that work across both iOS and Android

#111
post #107

I know lots of platforms-of-the-month come through HN, and it's hard to filter the signal from the noise...just wanted to add another voice that Exponent is indeed awesome. Built by one of the sharpest (and most humble) teams in the valley.

I suggest NativeScript as an alternative that's very similar in scope but far more mature, definitely not a platform-of-the-month. The latest version is built on top of TypeScript and Angular 2 instead of React Native like Exponent. I wonder why we don't hear that much about them in HN. https://www.nativescript.org/

A more apt comparison might be React Native and NativeScript--both are frameworks that bridge native APIs to JavaScript. In contrast, Exponent is a mobile environment of which React Native is one piece.

Before choosing React Native, we deeply investigated bridging native and JavaScript on our own and one of the ways was a NativeScript-like approach. When React Native was announced we looked at the beta and saw that it exhibited many characteristics we believe are important in a next-gen app framework.

We saw that React Native was designed for multicore phones by dividing work across multiple threads, namely application logic (JS), view and text layout (this is significant), and rendering. Other work like image decoding also runs on a separate thread. One reason React Native's multithreading is fantastic is because hardware manufacturers are adding more cores faster than they are improving the performance of those cores, partly because power consumption grows superlinearly with respect to frequency. The React team is also in the early stages of exploring incremental rendering, which may allow us to parallelize React rendering in JS as well as native.

So far we're happy we chose React Native for Exponent. There's a lot of interest and activity around it and it's on the right track in several ways.

Re: Exponent – Build native apps in JS that work across both iOS and Android

#112
post #97

Check out re-natal [0] if you are interested in using react native with clojurescript. Re-frame (cljs's redux?) and reagent (cljs's react wrapper) are a joy to use and clojurescript with REPL is something I'd pick over plain JS almost any day. Give it a try! It's pretty solid. [0]: https://github.com/drapanjanas/re-natal

ClojureScript along with re-frame/reagent/etc. can actually be used with Exponent too! "lein new exponent my-project" creates an exponent project, ready with figwheel for live REPL. The template can be found here if you want to just read it online: https://github.com/tiensonqin/exponent-cljs-template

Interesting. Did you use this in the past? How does it perform vs re-natal without exponent?

Re: Exponent – Build native apps in JS that work across both iOS and Android

#114
post #53

Does XDE run on Raspberry Pi? (Or if not, how difficult would it be to port?) It would be a nice hook to introduce people to programming if they could write mobile apps on the Pi.

XDE does run on a Raspberry Pi, this is a photo of it running on my RPi 3: https://i.imgur.com/ZvLtqjR.jpg. You don't need anything special aside from following the instructions on GitHub to run XDE from source.

The RPi hardware is pretty slow for a development machine. I have mine minimally overclocked but the CPU temperature was coming close to 85 °C and it took minutes for the starter project to initially load (after that, the build is cached). On the other hand if all you have is a Raspberry Pi, then Exponent is one of the few ways you can make iPhone apps.

Re: Exponent – Build native apps in JS that work across both iOS and Android

#115
post #67

Earlier quoted context omitted.

I think it would make sense to provide pre-build packages for few popular distros (Ubuntu, CentOS, Arch). There are some tools that make it much easier, i.e. fpm ( https://github.com/jordansissel/fpm ).

We're planning on doing an AppImage for Linux since we're using Electron Builder ( https://github.com/electron-userland/electron-builder ). Just haven't had time for it yet!

Great, AppImage is even better!

Re: Exponent – Build native apps in JS that work across both iOS and Android

#116

This looks cool. But are the builds happening remotely on the Exponent servers, or have I misunderstood that? Edit - brentvatne just answered this: "we handle builds for you when you want to ship to the app store, before that you can just use the Exponent client".

Hey Joe. I work on Exponent. When you're developing you can use Exponent's apps from the App Store/Play Store, so you can get started immediately and let other people test your app easily. Once you're ready to put your app in the stores you start a build using our CLI and we build it on our servers (see https://docs.getexponent.com/versions/latest/guides/building... ). We want to make it easy for people on Windows an…

It looks really great! Is it possible to take down apps from the Exponent servers once I've published on the App stores or do I have to keep all my code and resources public?

(I saw mentioned on the blog you work on: "making it easier to deploy your app to any server and not depend on ours" as well which will be super cool)

Re: Exponent – Build native apps in JS that work across both iOS and Android

#117
post #112

Earlier quoted context omitted.

ClojureScript along with re-frame/reagent/etc. can actually be used with Exponent too! "lein new exponent my-project" creates an exponent project, ready with figwheel for live REPL. The template can be found here if you want to just read it online: https://github.com/tiensonqin/exponent-cljs-template

Interesting. Did you use this in the past? How does it perform vs re-natal without exponent?

It actually is based on the re-natal code but automatically saves and uses the devserver ip and doesnt need th ios/android native code because it runs in Exponent. Other than that the functionality is the same I think, with the same difference as plain RN vs. Exponent.

Re: Exponent – Build native apps in JS that work across both iOS and Android

#118
post #70

I tested out React Native on Android the other day and it was a real disaster. It doesn't compile for all the CPU ABIs (instruction sets) we have, so if you have native libraries for x86 or arm 64 in your app it immediately breaks it completely. You have to remove all your own libraries for unsupported architectures, then modify your build not to include them, then depend on those platform's compatibility features to…

What made you want to try React-native ?

I honestly struggle to find the problem addressed by RN, at least if you already know java.

Re: Exponent – Build native apps in JS that work across both iOS and Android

#119
post #70

I tested out React Native on Android the other day and it was a real disaster. It doesn't compile for all the CPU ABIs (instruction sets) we have, so if you have native libraries for x86 or arm 64 in your app it immediately breaks it completely. You have to remove all your own libraries for unsupported architectures, then modify your build not to include them, then depend on those platform's compatibility features to…

Why is the top comment on every story a negative one? Is nothing good anymore?

It sounds like a fair critique to me.

As an Android dev, RN is a real head scratcher for me.

I embraced kotlin but I really struggle to find RN's purpose.

Post reply on HN