News for hackers. Stuff that matters.
Re:ReactXP – A library for building cross-platform apps by tspike on Thursday September 20, 2018 @03:41PM (#18034950)
Can we please stop trying to Javascriptify everything? The cross-platform thing has been tried again and again and again, and always runs into the same pitfalls: poor mimicry of native standards, inefficiency, debugging difficulty because of abstraction layer built on abstraction layer, enabling developers with poor understanding of the underlying platform to make an absolute mess of an app for others to maintain later on, and so on.
Re:ReactXP – A library for building cross-platform apps by supernovae on Thursday September 20, 2018 @04:59PM (#18035421)
I disagree entirely... I hate how an app for everything means vendor lock-in. Developers should embrace web standards and come together on making apps/tools that don't suck. I think having to write for android, ios, osx, windows, chromeos and linux sucks worse..
Re:ReactXP – A library for building cross-platform apps by sampl on Thursday September 20, 2018 @09:47PM (#18036656)
A million times yes.

Apps do the same things everywhere. Why do we still need completely different languages, codebases, etc (not to mention teams of experienced hires) to deploy any little CRUD app?

Maybe we aren’t interested in fixing this because it means there’s less engineering to be done.

“It is difficult to get a man to understand something, when his salary depends on his not understanding it.”

Re:ReactXP – A library for building cross-platform apps by swsieber on Friday September 21, 2018 @01:12AM (#18037298)
I'd be interested in solving it, but not with Javascript.

I think it's less about engineering costs and more about dislike of javascript. Maybe even specifically javascript tooling and electron.

A big reason people want to standardize on javascript is because it is the runtime of the Web - I can't wait for Web assembly to get even better so we can standardize on something else.

Re:ReactXP – A library for building cross-platform apps by jtreminio on Saturday September 22, 2018 @10:51AM (#18046189)
Technically the source code in OP is Typescript.
Re:ReactXP – A library for building cross-platform apps by swsieber on Sunday September 23, 2018 @01:36AM (#18049559)
But technically all javascript is also valid typescript... OTOH you can set a strict mode (I think)
Re:ReactXP – A library for building cross-platform apps by sdegutis on Friday September 21, 2018 @12:42AM (#18037200)
Unpopular opinion time, but Apple would be wise to make JavaScript a first class language for writing Mac apps. Probably 90% of apps don’t need the raw speed of Objective C or Swift. Obviously they want to encourage people to make Mac-only apps, but even so, web technology is 100x easier to use for making Mac apps than Cocoa and Storyboards is today.
Re:ReactXP – A library for building cross-platform apps by tspike on Friday September 21, 2018 @12:18AM (#18037116)
React native excels for a single use case: rapid greenfield development with limited resources. If I were a startup that simply had to support web, Android and iOS, it would be a no brainer.

Unfortunately, there is an almost religious devotion to it so it ends up used for many things it is actually terrible at (large teams, integration with large existing native apps, performance critical and highly interactive apps, apps that would be better off serving one platform, etc).

Re:ReactXP – A library for building cross-platform apps by anthk on Thursday September 20, 2018 @06:50PM (#18036027)
QT5.
Re:ReactXP – A library for building cross-platform apps by spondyl on Friday September 21, 2018 @12:25AM (#18037146)
I would love to use QT5, specifically the Python bindings but I always struggle to find documentation beyond a handful of out of date tutorials.
Re:ReactXP – A library for building cross-platform apps by pnenp on Friday September 21, 2018 @01:11AM (#18037294)
What in particular are you missing? I happen to be writing a PyQt5 tutorial for my https://build-system.fman.io today.
Re:ReactXP – A library for building cross-platform apps by laurent123456 on Friday September 21, 2018 @06:46AM (#18038688)
Last time I tried, what I found was missing is some guidelines on how to architecture an application. For the web, we have React, Angular and plenty of frameworks to choose from, which help having some base app skeleton to build on top of.

In Qt (QML), I couldn't quite find something like this and I had the feeling I needed to create my own framework from scratch, which is hard when, at the same time, you need to learn a new technology. There were some random ideas in various blogs and articles but nothing major or at least no officially supported one.

Re:ReactXP – A library for building cross-platform apps by Gorbzel on Thursday September 20, 2018 @07:52PM (#18036275)
You are wrong.

...note how I’ve said nothing to refute your comment because what you wrote it in responds to none of the historical empirical problems with this approach and just asserts “let’s make this not suck” glossing over the reasons why it sucks.

Re:ReactXP – A library for building cross-platform apps by supernovae on Friday September 21, 2018 @09:33AM (#18039536)
There are lots of great apps that are built with tools like this.
Re:ReactXP – A library for building cross-platform apps by 51lver on Thursday September 20, 2018 @10:48PM (#18036852)
Every time I am required to update my web browser to support some new snowflake code I am again reminded just how wrong you are.

You are writing code that runs nowhere, unless you can afford to shell out $1000 a year to keep your hardware current and $50 a month for the bandwidth to keep your software current. That's totally unsustainable from a global perspective.

Re:ReactXP – A library for building cross-platform apps by Rapzid on Thursday September 20, 2018 @11:35PM (#18037004)
> Every time I am required to update my web browser to support some new snowflake code I am again reminded just how wrong you are.

That sounds like incredible hyperbole considering all the major browsers are evergreen now.

Re:ReactXP – A library for building cross-platform apps by ChristianBundy on Thursday September 20, 2018 @10:53PM (#18036874)
I wish I could agree with you, but those numbers are beyond silly. You think I pay $50/month for home internet access? You think any device I own is worth $1000 or purchased within the past year?

In my view, the big issue right now is Electron, and developers who are comfortable developing for 1 Google browser per application. There's enough wrong with the current browser ecosystem that we don't need to make up numbers.

Re:ReactXP – A library for building cross-platform apps by 51lver on Thursday September 20, 2018 @11:00PM (#18036902)
I don't think you would have trouble finding $1000 msrp of web connected gizmos in any given household in the US, and less than $50 a month for intertubes is a pretty good price, so right on, good for you. Just saying, we shouldn't be in this rat race.
Re:ReactXP – A library for building cross-platform apps by robbick on Thursday September 20, 2018 @04:51PM (#18035352)
It may come up against the same pitfalls again and again but it has produced some of the most popular desktop + mobile apps out there because it consistently has some of the best benefits (large community, standards driven approach, lots of developers who know the language)
Re:ReactXP – A library for building cross-platform apps by CharlesW on Thursday September 20, 2018 @04:48PM (#18035337)
Apps like VSCode show it can be done well. And using JavaScript for doesn't necessarily preclude a native UX (see: React Native).
Re:ReactXP – A library for building cross-platform apps by tspike on Thursday September 20, 2018 @05:27PM (#18035614)
React Native only minimally uses native views. Rather than standard controls, they paint generic views, which still requires custom implementations and reinventing the wheel.
Re:ReactXP – A library for building cross-platform apps by petekp on Thursday September 20, 2018 @05:52PM (#18035750)
While React Native doesn't fully support native navigation components out of the box, there are third party libraries that interface directly with native navigation modules, e.g. https://wix.github.io/react-native-navigation. Moreover, React Native makes it easy for developers to 'drop down to' native code at any point to fully leverage native SDKs and APIs alongside their Javascript code using the NativeModules API.

Example of native modules with React Native wrappers: https://facebook.github.io/react-native/docs/components-and-...

NativeModules API: https://facebook.github.io/react-native/docs/native-modules-...

Re:ReactXP – A library for building cross-platform apps by tspike on Friday September 21, 2018 @12:24AM (#18037140)
It's easy to get trivial examples of native integration working, but as soon as you try more complex things it starts to break down. Code push? Oops, your native integration in old app versions just broke. Share an existing native UI library? Sorry, Yoga has its own (incompatible) thing going on. Yes, there are workarounds for all these things, but at what point does the overhead defeat the purpose?

Also, the security and performance implications of the Javascript dependency ecosystem should not be ignored.

Small greenfield app on a shoestring budget? It's perfect for that.

Re:ReactXP – A library for building cross-platform apps by int_19h on Thursday September 20, 2018 @06:41PM (#18035990)
It still doesn't give you native look & feel.

Although much as it pains me, I think that is a lost cause. And it was lost through attrition - devs kept throwing non-native (often, JS-based) apps at users, and users got conditioned to each app having its own look, much like websites.

Re:ReactXP – A library for building cross-platform apps by petekp on Thursday September 20, 2018 @11:21PM (#18036965)
I feel you. In most cases, Android and iOS's native components are superior to custom-rolled UI elements. Easier to use, more performant, and they leverage our platform muscle memory.

Fortunately, it does seem like these platforms are beginning to converge on a set of common UI patterns, e.g. Android adopting the tab bar, and iOS apps beginning to adopt Android's horizontal-paging navigation. The colors, iconography, and typography shifting can disorient somewhat, but I'd argue it's the navigation model that's most disruptive when using different apps.

Re:ReactXP – A library for building cross-platform apps by int_19h on Friday September 21, 2018 @01:55AM (#18037453)
It's much worse on the desktop, where we already had very detailed GUI standards, with decades of polish - and it's all getting thrown out because of the latest Electron etc fad. The upside is that Linux sees some great apps (like VS Code), but I'm not sure that's worth the cost.
Re:ReactXP – A library for building cross-platform apps by CharlesW on Thursday September 20, 2018 @10:22PM (#18036779)
> React Native only minimally uses native views.

My comment was that it doesn't preclude it, addressing the parent's conflation of language and view layer.

Yes, you might have to do more work in React Native. But similar frameworks[1] appear to do this out of the box, if that helps.

[1] https://docs.nativescript.org/ui/components

Re:ReactXP – A library for building cross-platform apps by qwerty456127 on Friday September 21, 2018 @12:04AM (#18037086)
> Can we please stop trying to Javascriptify everything?

Good news is they have invented a better programming language called ReasonML for React.

Re:ReactXP – A library for building cross-platform apps by namuol on Friday September 21, 2018 @12:08AM (#18037095)
Can we please stop gatekeeping our industry and embrace tools that lower barriers?

But seriously, if you're concerned about the quality of software, build better tools that guide new developers into best practices. Remove needless abstractions, replace others, and optimize the rest.