News for hackers. Stuff that matters.
Re:Matcha – A framework for building iOS and Android apps in Go by yoz-y on Tuesday October 03, 2017 @11:07AM (#15392904)
If this framework focalizes on iOS and Android then it might be more useful than webpages in some cases. Native applications are still the way to go if you need to do computationally intensive tasks, UIs that are responsive (especially on Android), UIs that display real time data (especially on iOS) and anything that uses the cool features the phones have.
Re:Matcha – A framework for building iOS and Android apps in Go by Zoon on Tuesday October 03, 2017 @11:28AM (#15393035)
Can you expand on why non-native iOS apps struggle with displaying real-time data, and why anroid’s struggle with responsiveness?
Re:Matcha – A framework for building iOS and Android apps in Go by yoz-y on Tuesday October 03, 2017 @01:03PM (#15393929)
Sure. The current problem on iOS is that you can not replace the web-rendering engine, thus you have to send messages or call callbacks into the web engine api. You have no guarantees as to when they will be actually executed and you have to serialize your data.

In my application I needed to display data incoming from a sensor. I can only access this data using the native functions and it comes at around 500Hz from 16 sensors.

For comparison, in Electron, when you call a function defined in a module written in C++, you can get the answer in under 1 ms. When using something like Cordova, you have to serialize the data which can take a seriously long time and then you have to wait for the callback to execute. On Android I suppose it is quite possible to write a V8 native plugin and achieve this performance, but not on iOS where you are limited to included webkit.

As for the Android responsiveness, the problem lies with the single threaded nature of JavaScript. CPUs on android phones _suck_ in single core performance. When I was looking for a good solution for multi platform development, I have found of a tech meeting that was supposed to present solutions taken by several different companies. It turned to be a huge complaint-fest about Android javascript performance and the only happy people were those using Xamarin (which is native).

Edit: Note that I think that using web views for applications like banking or chat and so on is perfectly fine. My issue is with apps that eat a lot of incoming data and/or have to change what is displayed very often.

Re:Matcha – A framework for building iOS and Android apps in Go by hellofunk on Tuesday October 03, 2017 @02:50PM (#15394974)
Don't know about Android, but on iOS and macOS, Apple introduced the WKWebView technology that is recommended over using normal web views (the old way for many years), and it interacts seamlessly and instantly with Swift (and probably Objective-C too), the system even bridges the types for you as they go across the boundary. Apple specifically tried to further support the growing desire to use web views and Javascript technology inside a native app. I've used it quite successfully, the experience feels like native.

Perhaps systems that automatically build out to iOS have not been updated to use these features, or there is something else going on in Cordova to introduce latency? Because for at least 2 years now there is no reason to have the problem you describe.

Re:Matcha – A framework for building iOS and Android apps in Go by LeoNatan25 on Wednesday October 04, 2017 @02:17AM (#15398616)
> interacts seamlessly and instantly

You clearly haven’t used WKWebView. It renders off-process, so actually data passi gbetween your native code and the JS contained in it is even slower. This is in addition to the many many many limitations due to the off-process nature of the system.

Re:Matcha – A framework for building iOS and Android apps in Go by hellofunk on Wednesday October 04, 2017 @07:34AM (#15399734)
I have used it extensively, and I've never noticed the latency you described.