News for hackers. Stuff that matters.
Re:You probably don't need a single-page app by tyingq on Sunday February 17, 2019 @09:47AM (#19184681)
I'm more interested in the future of "you probably don't need a native app".

It feels like browsers are closing the gap pretty well with things like IndexedDB, offline features, WASM, etc. Still a ways off, but seems like it's getting there.

I do worry, though, that it's not really in Apple's or Google's best interest to move that along.

Re:You probably don't need a single-page app by tonyedgecombe on Sunday February 17, 2019 @10:07AM (#19184781)
It's in Googles interest as everything they deliver is through the browser. Not so much for Apple or Microsoft though. Personally I will be quite sad if I end up loosing so much control over my computing environment.
Re:You probably don't need a single-page app by simple_phrases on Sunday February 17, 2019 @10:14AM (#19184817)
Native apps allow Google to collect much more information than they can via the browser. They also allow for a wider range of advertising opportunities.
Re:You probably don't need a single-page app by phkahler on Sunday February 17, 2019 @10:48AM (#19184975)
Except for people who won't put up with advertising in native apps.
Re:You probably don't need a single-page app by simple_phrases on Sunday February 17, 2019 @03:03PM (#19186501)
Adblocking on phones requires infinitely more hoops to jump through than using a browser adblocker does.
Re:You probably don't need a single-page app by movedx on Sunday February 17, 2019 @07:42PM (#19187878)
Google's services are incredibly convenient and well made, and you may be assuming people will give up those conveniences. That's a big assumption and I think it wont pan out that way.
Re:You probably don't need a single-page app by mnm1 on Sunday February 17, 2019 @04:27PM (#19187023)
Based on the number of Windows 10 users, that's a very small percentage of users indeed.
Re:You probably don't need a single-page app by joshfraser on Sunday February 17, 2019 @11:11AM (#19185111)
They don't need to show you ads in their apps. They just use them to collect your data, like where you are every moment of every day and use that data to better target ads.
Re:You probably don't need a single-page app by BartBoch on Sunday February 17, 2019 @12:31PM (#19185603)
Android and Google Search are completely different Google departments. They will fight for the audience as long as they won't directly compete with each other. Board can see this as a widening audience, cementing presence and reaching new markets. It's in the best interest of Google Search and Chrome to push browser apps ahead.
Re:You probably don't need a single-page app by throwaway12iii on Sunday February 17, 2019 @11:25AM (#19185188)
Apple makes more than $10 billion per year on advertising just from one deal with Google alone. Microsoft has $7 billion advertising revenue.
Re:You probably don't need a single-page app by tyingq on Sunday February 17, 2019 @10:09AM (#19184790)
Well it would cut into revenue from the PlayStore. I suppose it's plausible that keeping people in the browser is a good enough trade-off for Google.
Re:You probably don't need a single-page app by jtdev on Sunday February 17, 2019 @10:15AM (#19184821)
I can’t imagine that the Google Play Store is a huge revenue generator, relatively speaking of course.
Re:You probably don't need a single-page app by tyingq on Sunday February 17, 2019 @10:20AM (#19184852)
Re:You probably don't need a single-page app by jon-wood on Sunday February 17, 2019 @02:52PM (#19186437)
That’s much higher than I’d have expected. I wonder how much of it comes from games and their in app purchases, a segment that is unlikely to take much of a hit from moving other apps to the web.
Re:You probably don't need a single-page app by superkuh on Sunday February 17, 2019 @03:03PM (#19186503)
As browsers close the gap they simply become the OS but slower, more abstracted, and with less security. And they stop being good browsers. It's the old emacs situation come round again.

The only positives are to corporations and institutions with profit motives to decrease dev time and increase ability to spy on users and extract rent from them.

Re:You probably don't need a single-page app by jomohke on Sunday February 17, 2019 @06:30PM (#19187585)
> they simply become the OS but slower, more abstracted, and with less security.

I agree with slower, at least for computational tasks, but not security. Do you feel safer installing an organisation's native app than using their web app?

> The only positives are to corporations and institutions with profit motives...

What advantage does the web give to corporations that native apps don't? You mention spying, but the native mobile app ecosystem is filled with tracking and analytics code (and it's easier to hide it). The only corporation-level difference I can see is that native apps are heavily tied to a specific company's platform, while web apps aren't. This is a huge positive to the web - I've felt free to change platforms many times.

A second huge and underestimated positive of the web is backwards compatibility (ie. lower maintenance headaches). A complicated internal web app I wrote eight years ago is still running despite not being modified. The websites and lousy javascript I wrote as a kid in 1999 still run exactly the same as in 1999. Spacejam.com is unmodified from 1996. Yet I have many native apps from two years ago that no longer run correctly due to OS updates (especially on mobile).

Re:You probably don't need a single-page app by expertentipp on Sunday February 17, 2019 @05:47PM (#19187387)
> As browsers close the gap they simply become the OS but slower, more abstracted, and with less security

Browsers are forced to implement standards like CORS, single-origin policy, and multiple levels of SSL certificate validation and thus are more secure than most of native apps. How do you know whether that mobile app is not signing in over HTTP? In a web browser it's obvious instantly.

> motives to decrease dev time and increase ability to spy on users and extract rent from them.

Literally the worse what can happen over web browser is tracking based on various forms of fingerprinting. Native apps? MAC addresses, SSIDs, serial numbers - EVERYTHING is available for the native app to send ANYWEHERE, even over HTTP.

Re:You probably don't need a single-page app by qudat on Monday February 18, 2019 @12:57AM (#19188893)
> and with less security.

v8 is probably one of the most strenuously vetted pieces of software on the planet.

Re:You probably don't need a single-page app by syntheticcdo on Sunday February 17, 2019 @10:22AM (#19184865)
This is the only reason we have an SPA to begin with-- small team writes a single frontend and deploy to web, iOS and Android via Cordova, Windows via Electron, and (previous) Chrome OS via the now deprecated Chrome App APIs. If we didn't need to support the full experience on all these devices, SPA would be way overkill.
Re:You probably don't need a single-page app by IloveHN84 on Sunday February 17, 2019 @09:55AM (#19184723)
Native will always be the best solution... Because it's native.
Re:You probably don't need a single-page app by tyingq on Sunday February 17, 2019 @09:56AM (#19184729)
Technically best doesn't always win the market. I'd love not writing 3 versions of every piece of functionality.
Re:You probably don't need a single-page app by AnIdiotOnTheNet on Sunday February 17, 2019 @10:09AM (#19184791)
How's that working out when there's more than one browser you have to account for? What's the difference between polyfill or some framework, and something like Qt or SDL?

Or I suppose we could just all use chromium, but we could also just all use Windows.

Re:You probably don't need a single-page app by ken on Sunday February 17, 2019 @10:45AM (#19184957)
> What's the difference between polyfill or some framework, and something like Qt or SDL?

As a user, I usually can't even tell when they're using a polyfill on the web (except when they stop, like GitHub did with type=date). (As a developer, I often can't tell the difference, either. Some of them are that good!) So long as you generate HTML/CSS/JS, it doesn't matter to me how you do it. That's as 'native' to the web as you can get.

I can spot Qt a mile away. A lot of the visuals look wrong and a lot of the controls don't behave right. It's frustrating to use, and I always slow way down and double-check my work because, e.g., popup menus show the 'accept' animation even when you cancel them.

Re:You probably don't need a single-page app by AnIdiotOnTheNet on Sunday February 17, 2019 @10:51AM (#19184994)
> I can spot Qt a mile away. A lot of the visuals look wrong and a lot of the controls don't behave right.

You mean it has no respect for your native toolkit... just like the web?

Re:You probably don't need a single-page app by tyingq on Sunday February 17, 2019 @11:47AM (#19185326)
"just like the web"

How true is that? I was under the impression that for Android and iOS, Chrome used the native widgets for most things.

Re:You probably don't need a single-page app by tedunangst on Sunday February 17, 2019 @01:49PM (#19186064)
How many SPAs use native controls with minimal styling?
Re:You probably don't need a single-page app by tyingq on Sunday February 17, 2019 @10:11AM (#19184806)
I have to write it for the web already. Writing a native Android and a native iOS app is additive if the web version is "good enough".

There's no scenario where I only have to write two native apps. Perhaps there is for other people.

Re:You probably don't need a single-page app by AnIdiotOnTheNet on Sunday February 17, 2019 @10:19AM (#19184843)
Consider that maybe there are uses for software where the web isn't necessary and isn't even the first choice.

You're a hammer, so everything is a nail. The reality is that the web is a horrible choice for a whole lot of things. It's a document platform with parts of an application platform shoe-horned in and bolted on, and the result looks like a garbage fire to people who come from the land of native software.

Re:You probably don't need a single-page app by tyingq on Sunday February 17, 2019 @10:30AM (#19184903)
I'm not sure I understand why browsers getting closer to native apps ruins anything for anyone else. You're still able to hammer your nails however you want.
Re:You probably don't need a single-page app by criddell on Sunday February 17, 2019 @12:13PM (#19185476)
I'm sure it's nice for you, but users like me aren't happy that every mouse move and page load is cataloged and studied and shared with partners. At least with a native app I can add a firewall rule to restrict it's ability to use the internet.
Re:You probably don't need a single-page app by jhall1468 on Sunday February 17, 2019 @12:23PM (#19185547)
Users like you represent a tiny, tiny minority. The majority of people couldn't care less about google tracking their mouse movements.
Re:You probably don't need a single-page app by noisem4ker on Sunday February 17, 2019 @12:51PM (#19185731)
The majority of people are not aware that someone is tracking their mouse movements.
Re:You probably don't need a single-page app by criddell on Sunday February 17, 2019 @12:49PM (#19185716)
I'm guessing you don't live in the EU.
Re:You probably don't need a single-page app by leadingthenet on Sunday February 17, 2019 @10:47AM (#19184972)
You're just externalising the time you save as a cost to your users.
Re:You probably don't need a single-page app by tyingq on Sunday February 17, 2019 @11:08AM (#19185098)
It's equally possible you're doing the same thing by forcing users to download a native app. It's kind of hard to talk about in the abstract. Some things work better in an app, for other things it adds nothing notable.
Re:You probably don't need a single-page app by WrtCdEvrydy on Sunday February 17, 2019 @11:34AM (#19185245)
> not writing 3 versions of every piece of functionality.

React Native and ReactJS are a move in the right direction.

I wonder if we'll get React NativeJS

Re:You probably don't need a single-page app by tomduncalf on Sunday February 17, 2019 @12:51PM (#19185737)
Not sure exactly what you mean by React NativeJS but perhaps React Native for Web (https://github.com/necolas/react-native-web) is along the lines of what you are thinking?

Works remarkably well. It’s already used for Twitter’s mobile site

Re:You probably don't need a single-page app by mycall on Sunday February 17, 2019 @11:30AM (#19185223)
Have you tried Angular+NativeScript? one piece for all (minus UWP).
Re:You probably don't need a single-page app by Midnightas on Sunday February 17, 2019 @11:36AM (#19185253)
wxWidgets would help with that.
Re:You probably don't need a single-page app by pmlnr on Sunday February 17, 2019 @09:58AM (#19184744)
Except when all your content comes through the pipe, in which case native is just a glorified iframe.
Re:You probably don't need a single-page app by hombre_fatal on Sunday February 17, 2019 @11:19AM (#19185153)
Native has downsides too, like having almost zero control over the client and being unable to link other people like you can on the web. Just a bunch of silos by design.

Native is only a trade-off that has great performance at other expenses.

Re:You probably don't need a single-page app by saagarjha on Sunday February 17, 2019 @03:08PM (#19186529)
Not always. There are times when you don’t want to download an app for every little thing, though the opportunity to be able to do so is nice. There’s a reason we have browsers and not just everything coming through in its own individual app.
Re:You probably don't need a single-page app by collyw on Monday February 18, 2019 @10:44AM (#19191445)
Web is best because it is platform independent.
Re:You probably don't need a single-page app by the8472 on Sunday February 17, 2019 @09:57AM (#19184739)
Resource consumption will be worse, doubly so when they make an app out of the SPA via electron&co.
Re:You probably don't need a single-page app by skybrian on Sunday February 17, 2019 @11:21AM (#19185171)
I look forward to a similar article saying "You probably don't need WebAssembly."

I mean, it's neat and all, but most websites aren't CPU-bound.

Re:You probably don't need a single-page app by tyingq on Sunday February 17, 2019 @11:29AM (#19185217)
I didn't view WASM on its own as the big differentiator. But, it is one of many things that's closing the gap between native apps and web apps. As you mention, it's useful in some situations.