back to article Facebook's React Native web tech not loved by native mobile devs

Facebook's cross-platform open-source mobile framework React Native lived up to its marketing hype for Walmart Labs as the US shopping giant deployed the software last year. However, the retail goliath hit a wall when it came to people. "The marketing spiels of React Native turned out to be true," said Alexander Grigoryan, …

Anonymous Coward

Facebook?

Why would anyone seriously consider using a Facebook toolkit for anything that didn't need to access Facebook? Could you ever trust it not to steal your customers' data, if not today then in some future update?

25
13
Reply
JLV
Silver badge
Coat

Re: Facebook?

Assuming that you want to code in JS, and that you want to use a GUI framework to do so, React is one of the more mature ones and has a a sizeable developer following. FB is the originator, and that's about as far as that goes.

React's open source, anyone can scan the libs for mothership calls - it's not hosted. FB (which I don't use), for all its sins, has issued some interesting stuff like this, GraphQL and the Open Compute Project.

Personally, I don't care much for React because it's based on mashing HTML into JS using something called JSX, which makes my eyes bleed. Talk about ignoring what decades of software experience has taught us about separation of concerns ;-) I wonder if that's not what turned off those native devs.

This is JS/JSX file, with HTML lovingly embedded into JS:

return React.createElement('div', {className: 'shopping-list'},

React.createElement('h1', /* ... h1 children ... */),

React.createElement('ul', /* ... ul children ... */)

);

Other choices include:

- Angular, from Google, another noted privacy activist. But Angular 2 pretty much threw away all compatibility from A1, making it a bit hard to trust. And it's also quite complex.

- Vue.js, which I prefer myself. Originated by one main dev and without a major corporate sponsor (heavily used by Alibaba however). It's a pretty clever library, simple and a lot less enterprise-y than Angular or React. At feature parity, or near-parity at least for some use cases, simplicity has a quality all its own, IMHO. Vue's native support is a bit weak, from what I understand.

- and a bunch of other contenders like Ember, Backbone, Stimulus, etc... (I agree with @Simon's framework a week quip).

And, yes, in advance, I deeply apologize to all those that feel that coding in JS, even for web pages, is the work of Satan, the root of all evil, kills puppies and is directly causing global warming.

My coat.

8
0
Reply
Silver badge

Re: Facebook?

@JLV

What about this framework?

let shoppingList = document.createElement('div');

shoppingList.className = 'shopping-list';

Which is to say, just plain old built-in DOM.

And if you need to do that twice, put it in a function, like mother told you to.

1
0
Reply
JLV
Silver badge

Re: Facebook?

I don’t pretend to be all that good at JS. I did persevere quite a while doing some semicomplex UI code with plain JS + jquery + Bootstrap. An app, basically, with dropdown menus, pick lists etc that then forwards requests to a Django server that is the real brain. Most actions mean page refreshes, not in-page AJAX. Not an SPA. No module loading, except via require.js.

It’s bloody painful, hard to test, extremely unproductive and buggy. Switching to Vue + Webpack/JS6 (but could have been something else) was a massive improvement. Cypress.io on the testing side: much better than Selenium.

Yes, JS frameworks and tooling are a frustratingly fragmented and moving target. And, JS, IMHO, has too many flaws to be a great choice of backend language any time soon. But, if on the web UI side and past a minimal level of complexity, let's not fall into the trap of romanticizing plain JS without build tools (to handle JS6/modules).

It's not like old-schooling C or assembler, much more like hanging on to VB6. YMMV.

1
0
Reply
Silver badge

Re: Facebook?

Which is to say, just plain old built-in DOM.

And if you need to do that twice, put it in a function, like mother told you to.

That's what I've done for personal and academic work.

However, for non-trivial web-based applications ("RIAs"), you soon find that "put it in a function" becomes "create a fairly extensive Javascript library or framework". That might still be the route you want to take, but framework design and implementation is a rather different skill set than UI development.

Of course there will be people who are good at both, but they're rare. And that's fine - there's no particular reason why someone should be capable in both of those areas. There are plenty of things for people to be good at.

So you're either allocating a rare resource, making the team larger (so you can have both library/framework developers and UI developers), or turning to an outside source for one of the pieces. And since UIs tend to be application-specific, it will usually be the Javascript framework.

I'm not particularly fond of any of the Javascript libraries or frameworks I've seen, aside from some very obscure, limited ones developed by comp.lang.javascript language lawyers years ago. But I understand the economic forces driving the use of the open-source and commercial ones.

2
0
Reply
Silver badge

Re: Facebook?

My thinking about (JS) frameworks is basically as stated here (I am NOT the author):

https://bitworking.org/news/2014/05/zero_framework_manifesto

Tldr: reusable libraries good, frameworks bad.

0
0
Reply

Don't worry - this is Javascript we're talking about; no doubt there'll be a shiny-happy new framework to replace React once the hipsters decide it isn't cool any more. Probably by next week.

38
1
Reply
Silver badge
Joke

I hope not, I've only just jumped on the JQuery 2.x bandwagon.

5
0
Reply
Silver badge
Happy

jQuery 2.x? I'm only just moving to jQuery 1.10

3
0
Reply
Silver badge

Vue2

Me, I prefer vue2, but I am stuck with react now.

3
0
Reply

Frameworks

There are so many frameworks out there these days, following the flavour of the month may not be the right business choice.

10
1
Reply

Re: Frameworks

"following the flavour of the month may not be the right business choice."

Try telling that to the drooling idiots in the C-suite.

10
0
Reply
Silver badge

Shock horror: You announce that you are changing to something an employee doesn't know and he doesn't like it. This comes down to people being scared for their jobs. It's a universal reaction to a change which could make them (or at least some of them) redundant. Especially, in this case, because there are more JS devs willing to work for less money than native mobile devs (with no comment made about their abilities).

10
4
Reply
Silver badge

I read this story entirely differently.

Bosses spot that divergence in platforms costs extra money. Decide to introduce mediocre middleware to minimise cost. Developers are upset that they'll have to work in a poorer environment, working on a worse product. Money is saved, so bosses use their platform to write the first draft of history: that everything they wanted is definitely a success, and everybody else was wrong.

8
1
Reply
Silver badge

Lives up to the hype ... but it doesn't really scale

That's some pretty low-quality hype if if didn't even mention the prospect of being deployable - or high-quality gullibility.

11
0
Reply
Silver badge
Holmes

People

technology depends on people

Really? I thought with all the AI/Machine Learning going on in IT now, people were there just to amuse our overlords.

</sarcasm>

6
0
Reply
Silver badge

React Native lives up to the hype

Except he admits himself it doesn't scale, they had to write their own framework to interact with non-React bits of the codebase, React components created warnings and errors and they didn't want to convert to React 100%. Sounds more like it doesn't live up to the hype but the CIO forced the change through despite the dev's protestations anyway.

13
0
Reply
Gold badge

Hmmm. I'm not worried..

It's designed to provide benefits like the ability to reuse React Native code alongside native platform code, over-the-air updates (rather than through the App Store or Google Play) and shorter development and compile times.

OK. Maybe I am worried. Firstly does this not break the terms of service of the mobile app stores? And if not, why not? Surely the point about having a curated app store is to protect the user from dodgy software (as well as to protect Apple and Google from competition they don't like...). But if you can launch a legit app that gets approved, and then update it without approval - then what's the point?

Oh and Facebook wrote it. So it will be both designed to hoover up all the data it can get, and then spaff as much of it round the internet as possible.

What could possibly go wrong?

16
1
Reply
Silver badge

Two kinds of development innovations

I think there may be two kinds of development innovations, whether these are new languages, new frameworks or even resource kits.

One kind, which might be described as traditional, is what you get when someone realises that something new is needed, or has become achievable and will be useful, so they invent a new language or whatever. If they are right about the opportunity, and the new thingy performs well enough, it gets adopted and sees some success.

The other kind, which appears to be a new phenomenon, is when a corporation decides that it wants to entrap yet more wallets in its ecosystem, and builds a new shiny thing, with an attractive interface and a shyteload of marketing crud, to allow folks to do whatever they were already doing but without any fundamentally important improvement.

Possibly I am being a little cynical. But these days every time one of the net giants emits a New Thing, the first thing you look for is: where are the sticky patches, the snares and the traps, the clever little dependencies designed to draw you inexorably in, get you hooked so that privacy and wallet can be sucked dry?

I'm getting old ....

11
0
Reply
Silver badge

60% - that tells us a lot

"60 per cent of orders through Walmart's grocery app come through mobile devices." - the only thing I use my phone for in a store is the "Keep" list, my shopping list. I've tried searching for/looking up stuff on my phone but it's generally a disaster ... the native store apps in every store continually try to direct me to something I don't want or need, and rarely actually know where anything is located in the store.

When 60% of orders come via mobile devices then you know that shopper grooming works - I'd expect that with Walmart customers.

6
1
Reply
Anonymous Coward

Re: 60% - that tells us a lot

Link is hijacked by spam sites, don't click it.

4
0
Reply
Silver badge

Re: 60% - that tells us a lot

Some weeks back my wife ordered something online from Walmart with in-store pickup (as they're the only store in the area that carries that sort of thing - when we're at our other house, with other choices for department store, we avoid Walmart).

The order came in, we went to the store - and then she had to download and install the Walmart app because it was the only way to release the order to us. They had a couple of in-store kiosks but, mirabile dictu, neither was working.

After we picked the order up she deleted the app. Strangely, this experience did not endear us to Walmart.

1
0
Reply

Over the air updates

"It's designed to provide benefits like... ...over-the-air updates (rather than through the App Store or Google Play)". So you won't be able to put your app in either store if you want to offer direct OTA updates, since both forbid that.

It's probably quite easy to automatically spot apps compiled from react native too...

4
0
Reply
Silver badge

Re: Over the air updates

Apparently Apple allows CodePush (which is what Walmart is using).

https://github.com/Microsoft/react-native-code-push/issues/748

"Apple’s guidelines explicitly permit you to push executable code directly to your app, bypassing the App Store, under these two conditions:

* The code is run by Apple’s built-in WebKit framework or JavascriptCore

* The code does not provide, unlock or enable additional features or functionality"

5
0
Reply
JLV
Silver badge

Re: Over the air updates

Here's a little write up about that.

https://codeburst.io/react-native-vs-real-native-apps-ad890986f1f?gi=1a0b1f869757

1
0
Reply

In other news

Grumpy old devs unable to learn new technologies are left behind and getting jobs at Walmart

1
1
Reply
Devil

facepalm

"the lure of a cross-platform option" - cross platform for Apple & Google serfs perhaps, but not for the rest of us. The web was conceived to be a true cross platform solution - usable even by the blind if coded correctly. "Native apps" is just a way to trick people into leaking more personal data than the given use-case calls for.

Meanwhile, facebook's shares have plummeted 20%, shrinking their cap by a headache inducing $120bn - the largest such drop in corporate world history. Perhaps worth a mention, el Reg?

And with poetic timing this coincides with the release of the false and misleading "Vote Leave" ads run on the shite by AIQ, including some rather sneaky phising methods. Perhaps worth a mention, el Reg?

Or are you just bored talking about them?

4
1
Reply

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Biting the hand that feeds IT © 1998–2018