News for hackers. Stuff that matters.
Re:LightSpeed: Rewriting Messenger’s codebase for a faster, ... by tomduncalf on Monday March 02, 2020 @03:43PM (#22468724)
React Native isn't necessarily a great fit for something that is intended to be "a simple, lightweight utility" - there is a reasonable start up overhead, for example, with RN, and it also involves bundling quite a few libraries and dependencies.

That doesn't mean React Native is not a good fit for any kind of application - for many kinds of apps, start up time and app size are a much smaller issue - but seems Facebook made the right decision for an app like Messenger which primarily needs to start fast and drain as few resources as possible.

Re:LightSpeed: Rewriting Messenger’s codebase for a faster, ... by danabramov on Tuesday March 03, 2020 @05:12AM (#22473222)
To be clear, Messenger wasn’t being rewritten from React Native. It was a fully native app before, too.
Re:LightSpeed: Rewriting Messenger’s codebase for a faster, ... by tomduncalf on Tuesday March 03, 2020 @05:28AM (#22473293)
Yeah, not sure where this idea has come from. Seems like RN haters just jumping on any opportunity to slate it. Reality is, just like most technologies, RN is a good fit for some scenarios (small team needing to support both mobile platforms? no native devs on the team? performance not critical? etc.) and not a good fit for others.

I guess many native developers feel negatively towards it because a lot of companies will be asking "why aren't we using React Native instead of building two separate apps?" which I can imagine feeling somewhat threatening towards your area of specialisation

Re:LightSpeed: Rewriting Messenger’s codebase for a faster, ... by JimDabell on Tuesday March 03, 2020 @01:15PM (#22477159)
> Yeah, not sure where this idea has come from. Seems like RN haters just jumping on any opportunity to slate it.

There seems to be a much more obvious explanation as to why people are assuming it used to be React Native. The article says:

> > Compared with the previous iOS version, this new Messenger is [mentions improvements].

> > We accomplished this by using the native OS wherever possible […]

That seems to imply that it wasn't native before and they got the gains by switching to native. And since Facebook are well-known as the creators and biggest users of React Native, it's not a big leap to make the assumption that that's where they were coming from.

[Also, in case there's any confusion please note the distinction between "native", meaning it is compiled to native code; and "React Native", which is a cross-platform framework that is not compiled to native code. "React Native" is a horrible name for something that is not native.]

Re:LightSpeed: Rewriting Messenger’s codebase for a faster, ... by tomduncalf on Tuesday March 03, 2020 @05:34PM (#22479374)
My bad, I didn’t pick up on that wording potentially suggesting that. RN gets quite a lot of flak from native devs it would seem, hence my assumption!
Re:LightSpeed: Rewriting Messenger’s codebase for a faster, ... by pjmlp on Tuesday March 03, 2020 @07:47AM (#22473976)
Thing is, all these frameworks are leaky, to debug anything on them, or to add missing functionally, that small team needs to be an expert across two native frameworks, and the hybrid/abstraction framework that they are betting on.
Re:LightSpeed: Rewriting Messenger’s codebase for a faster, ... by tomduncalf on Tuesday March 03, 2020 @10:19AM (#22475080)
Yes and no, I think that depends how deep you want to go. For your standard "show and update some content and make it look pretty" type app, I can tell you from both my own and others experience you don't really need much familiarity with the native platforms, other than how to use build tools etc. which are well detailed online.

If you want to go deeper or have more specialised requirements, then you might need a deeper understanding of the native platforms though.

Re:LightSpeed: Rewriting Messenger’s codebase for a faster, ... by pjmlp on Tuesday March 03, 2020 @11:09AM (#22475696)
I can speak for Qt, Ionic and Cordova.

Beyond "Hello World" all of them required me to get my hands dirty, at which point I was better off just doing C++ with native views, standard out of the box tooling available across all SDKs.

Nowadays I rather go for PWAs, or plain mobile Web, unless it is something very special that requires OS APIs or hardware access.

Re:LightSpeed: Rewriting Messenger’s codebase for a faster, ... by jstimpfle on Tuesday March 03, 2020 @03:42PM (#22478529)
I've worked power-user type applications that are mainly keyboard driven, and those are pretty easy to make cross platform with a single custom codebase that has a platform-specific graphics backend (OpenGL covers many platforms) and minimal platform code. Let's say < 300 lines of boilerplate per platform + 600 lines for OpenGL + 2-5K lines for (shared) UI controls.
Re:LightSpeed: Rewriting Messenger’s codebase for a faster, ... by pjmlp on Wednesday March 04, 2020 @01:57AM (#22481738)
Yeah, but that kind of fits what I was describing, you are using standard SDK tooling, and it looks to me it being game engine like.
Re:LightSpeed: Rewriting Messenger’s codebase for a faster, ... by jstimpfle on Wednesday March 04, 2020 @02:06AM (#22481773)
I wasn't disagreeing.
Re:LightSpeed: Rewriting Messenger’s codebase for a faster, ... by pjmlp on Wednesday March 04, 2020 @02:49AM (#22481912)
Neither was I. :)
Re:LightSpeed: Rewriting Messenger’s codebase for a faster, ... by freepor on Monday March 02, 2020 @03:51PM (#22468822)
React Native (or any framework) isn’t good when you can literally afford billions of dollars of R&D given the financial value of the app. Just like the Mars rovers don’t run Python but it is a great language for a experimental SaaS app testing a new market, RN is great for a team of 3 engineers to get a multi platform app shipped, but not a great choice for an app worth ~$100 billion to its parent company.
Re:LightSpeed: Rewriting Messenger’s codebase for a faster, ... by kreetx on Monday March 02, 2020 @03:57PM (#22468892)
Interestingly, there was news on some satellite running javascript. But I wonder if the core was running something else, and peripherals were run with js -- and simply restarted when they died, Erlang style.
Re:LightSpeed: Rewriting Messenger’s codebase for a faster, ... by adev_ on Tuesday March 03, 2020 @04:26AM (#22473052)
> Interestingly, there was news on some satellite running javascript.

It does not mean it runs JS for anything critical, and very likely it does not.

My car entertainment system (GUI) run JS, and I'm fine with it. I would not if it would run on the emergency breaking system...

Re:LightSpeed: Rewriting Messenger’s codebase for a faster, ... by ComputerGuru on Monday March 02, 2020 @07:38PM (#22470688)
JS requires a runtime, so by definition there would have to be something (even if it’s just a bastardized gc-free version of JS itself).
Re:LightSpeed: Rewriting Messenger’s codebase for a faster, ... by saagarjha on Tuesday March 03, 2020 @02:56AM (#22472679)
Technically so do the native platform frameworks: they just come with the system.
Re:LightSpeed: Rewriting Messenger’s codebase for a faster, ... by pier25 on Monday March 02, 2020 @04:33PM (#22469276)
Exactly. The point of using a cross platform solution is because you can't afford to make an app for each platform.