News for hackers. Stuff that matters.
Re:Flutter: a Portable UI Framework for Mobile, Web, Embedde... by Illniyar on Wednesday May 08, 2019 @02:01AM (#19856240)
This is the example flutter app for the web -https://www.nytimes.com/games/prototype/kenken#/

This is flash. You can't do anything in it that fills like the web - no copy paste, right clicking causes things to happen. I don't expect games like this to have links and proper bookmarkable urls, but I doubt it'll work as expected if it did.

This is the epitome of the problem with flutter - it re-implements the UI, creating an experience that is just close enough but not good enough. And no matter how many smart people and an insane amount of resources they put into it, it'll never be good enough.

There's a reason why flash died out, and it's not only apple. It was dropped for making interactive website long before apple killed it - it doesn't work well with the web.

Re:Flutter: a Portable UI Framework for Mobile, Web, Embedde... by arno_app on Wednesday May 08, 2019 @04:53AM (#19857047)
> This is flash

This was exactly what I thought when reading about this. I'm pretty sure the one codebase for multiple plattforms just won't work. An app has it advantages so has a website. Mixing those up leads to something that just combines the disadvantages of both. And this my main critic on Flutter: It just doesn't feel good. Maybe it does on Android but it surely doesn't on iOS or on the Web. I would rather prefer something where I can share a core codebase between platforms and then implement a user facing layer with all the plattform specific features

Re:Flutter: a Portable UI Framework for Mobile, Web, Embedde... by cptskippy on Wednesday May 08, 2019 @09:06AM (#19858449)
> It just doesn't feel good.

This was my thought exactly. It's not that it feels different, but that it's not an improvement.

Re:Flutter: a Portable UI Framework for Mobile, Web, Embedde... by macspoofing on Wednesday May 08, 2019 @07:07AM (#19857695)
You're bemoaning that the lack of use of DOM to render the UI???? Seriously? That ship has sailed when Canvas was introduced in the mid-2000s and it was introduced for the EXACT reason to provide the same kind of capabilities that people had with Flash.

People wanted and want to build rich web-based APPLICATIONS - not just websites with columns of text. That's why Flash became huge, and that's why HTML now has Canvas, Video, WebGL, WebAssembly, WebRTC (all of which were available in Flash - sometimes years before they were available in HTML).

The specific example you showed, nyTimes puzzle game, you'd never build that on-top of DOM (you could, but why would you?). You'd use JS to draw your UI with the Canvas 2D APIs. So I don't know what you're talking about.

>There's a reason why flash died out, and it's not only apple. It was dropped for making interactive website long before apple killed it - it doesn't work well with the web

NO!!! That's not why Flash died out. Flash died out because you had a standards-based alternative. Steve Jobs probably accelerated the transition a little bit, but it was inevitable.

Re:Flutter: a Portable UI Framework for Mobile, Web, Embedde... by Illniyar on Wednesday May 08, 2019 @07:11AM (#19857713)
Flashed died out way before canvas. No one but design shops made their websites with it. It remained strong in games and ads and disappeared everywhere else. That is why apple could even survive not supporting it.
Re:Flutter: a Portable UI Framework for Mobile, Web, Embedde... by macspoofing on Wednesday May 08, 2019 @07:16AM (#19857740)
>Flashed died out way before canvas.

No. Canvas was introduced in 2004 but not really mainstreamed until a few years later. I would put the golden age of Flash as 2000-2008, with a slow decline after.

>It remained strong in games and ads and disappeared everywhere else.

You're just saying things, but you inadvertently hit on the point that I'm making, that is the decline of Flash coincided with HTML/JS being given capabilities to actually replace Flash. Had that never happened, you'd still have Flash because there would be things that people would want to do over the web, and no other way to do it.

Re:Flutter: a Portable UI Framework for Mobile, Web, Embedde... by coldtea on Wednesday May 08, 2019 @04:05AM (#19856808)
>This is flash. You can't do anything in it that fills like the web - no copy paste

Whereas you would have that in a Canvas or OpenGL equivalent web game?

>right clicking causes things to happen.

That's already the case for tons of websites, there's support for that in web standards.

>There's a reason why flash died out, and it's not only apple.

Yes. It was controlled by a single company, IDEs were paid for, it was more marketed to designer types, and it was frequently slow and used for apps and annoying stuff.

Re:Flutter: a Portable UI Framework for Mobile, Web, Embedde... by TeMPOraL on Wednesday May 08, 2019 @05:15AM (#19857154)
> Whereas you would have that in a Canvas or OpenGL equivalent web game?

Yes, you would, at least for some parts. Web games often combine the canvas showing the "game world" with DOM showing some UI elements - on which all the usual affordances work.

> That's already the case for tons of websites, there's support for that in web standards.

Fortunately most sites don't bother. The defaults matter.

Re:Flutter: a Portable UI Framework for Mobile, Web, Embedde... by coldtea on Wednesday May 08, 2019 @05:51AM (#19857336)
>Yes, you would, at least for some parts. Web games often combine the canvas showing the "game world" with DOM showing some UI elements - on which all the usual affordances work.

Only if they care, most don't. In this case, they also don't. It's still trivial to do it, even in Flutter.

Re:Flutter: a Portable UI Framework for Mobile, Web, Embedde... by Mirioron on Wednesday May 08, 2019 @06:57PM (#19863740)
Last I checked, web games pretty much died with Flash. Sure, it coincided with mobile games soaring, but I doubt web games would've become this scarce without Flash dying as well.
Re:Flutter: a Portable UI Framework for Mobile, Web, Embedde... by pjmlp on Thursday May 09, 2019 @02:41AM (#19865933)
Scarce? There are plenty of them available.
Re:Flutter: a Portable UI Framework for Mobile, Web, Embedde... by coldtea on Friday May 10, 2019 @05:35AM (#19876328)
Web games died? They are stronger than ever, and a huge multi-billion market...
Re:Flutter: a Portable UI Framework for Mobile, Web, Embedde... by stonogo on Wednesday May 08, 2019 @05:08AM (#19857107)
> It was controlled by a single company, IDEs were paid for, it was more marketed to designer types, and it was frequently slow and used for apps and annoying stuff.

So aside from the IDE cost and marketing, there's no difference.

Re:Flutter: a Portable UI Framework for Mobile, Web, Embedde... by coldtea on Wednesday May 08, 2019 @12:25PM (#19860392)
Perhaps you've missed the "controlled by a single company", made for designer types (by marketing to I don't just mean how it was promoted), slow, and used for ads and annoying stuff like flash screens and such.
Re:Flutter: a Portable UI Framework for Mobile, Web, Embedde... by stonogo on Friday May 10, 2019 @09:27PM (#19883884)
Are you saying that web standards are not controlled by a single company? That is not how I interpret the behavior of the relevant standards bodies of the past decade.
Re:Flutter: a Portable UI Framework for Mobile, Web, Embedde... by lone_haxx0r on Wednesday May 08, 2019 @01:48PM (#19861254)
More importantly: Flash was closed source.
Re:Flutter: a Portable UI Framework for Mobile, Web, Embedde... by ppseafield on Wednesday May 08, 2019 @11:16AM (#19859590)
It was also a massive vector for security vulnerabilities.
Re:Flutter: a Portable UI Framework for Mobile, Web, Embedde... by camgunz on Wednesday May 08, 2019 @11:31AM (#19859771)
There's almost certainly no middle ground between "use the DOM for everything" and "deploy any possible app on the web". As soon as we decided the web was more than just documents, this was inevitable. Smearing tech that's advancing this pretty obvious idea as "Flash" isn't super useful, and rings hollow when applied to Google tech but not Emscripten, WebAssembly, Canvas/WebGL, or other tech that is just transpiled to JavaScript and can only possibly use web APIs.

If this bothers you, your argument is with Web 2.0, not Google.

Re:Flutter: a Portable UI Framework for Mobile, Web, Embedde... by Apocryphon on Wednesday May 08, 2019 @03:27AM (#19856627)
I’m not convinced that Flutter needs to beat native to survive- it just needs to be better than React Native, Xamarin, and PWAs.
Re:Flutter: a Portable UI Framework for Mobile, Web, Embedde... by ricardobeat on Wednesday May 08, 2019 @04:57AM (#19857065)
Beating RNW and PWAs will be hard.

It’s a bit worrying to have Google pushing both PWAs and Flutter, there is always the chance of collateral damage from infighting.

Re:Flutter: a Portable UI Framework for Mobile, Web, Embedde... by fauigerzigerk on Wednesday May 08, 2019 @05:19AM (#19857170)
It seems like hedging your bets by supporting a large number of competing SDKs is the new normal. Microsoft does exactly the same thing. Apple appears to be alone in committing to something specific.

The problem with this sort of hedging is that it only works for platform providers but not for developers.

Re:Flutter: a Portable UI Framework for Mobile, Web, Embedde... by 076ae80a-3c97-4 on Wednesday May 08, 2019 @03:31AM (#19856646)
Which is going to be hard. Xamarin these days is really nice to work with.
Re:Flutter: a Portable UI Framework for Mobile, Web, Embedde... by Apocryphon on Wednesday May 08, 2019 @03:49AM (#19856736)
Perhaps, but for whatever reason React Native seems to still dwarf it. Maybe the companies that tend to churn out popular mobile apps just don’t invest in .NET?
Re:Flutter: a Portable UI Framework for Mobile, Web, Embedde... by k__ on Wednesday May 08, 2019 @06:39AM (#19857564)
React-Native has two significant pros that Flutter doesn't have.

Native UI. I heard multiple times now that Flutter drains the battery rather quickly because it doesn't use the highly optimized native UI elements.

JavaScript. There are more JavaScript developers out there than .NET ones. Also, the JS devs are much cheaper.

Another interesting pro is, you can use RN to develop basically everywhere. Expo (a RN framework) announced Web support, so you get Android, iOS, and Web out of the box. Microsoft announced UWP support and rewrote react-native-windows.

Re:Flutter: a Portable UI Framework for Mobile, Web, Embedde... by MrGilbert on Wednesday May 08, 2019 @09:35AM (#19858647)
Well, it might be burned soil. Even in tech companies it's hard to convince the "decision-makers" to have another look at a technology that failed some years ago.

Also, you need some experienced people to look at new technology.

Re:Flutter: a Portable UI Framework for Mobile, Web, Embedde... by ajconway on Wednesday May 08, 2019 @06:36AM (#19857551)
The biggest advantage of React Native is that it makes use of native UI. You won’t be able to embed a browser, or a performant video player into a Flutter app (on iOS, at least).
Re:Flutter: a Portable UI Framework for Mobile, Web, Embedde... by the_duke on Wednesday May 08, 2019 @07:32AM (#19857831)
Re:Flutter: a Portable UI Framework for Mobile, Web, Embedde... by ajconway on Wednesday May 08, 2019 @08:14AM (#19858073)
Great news!

But, looking at the iOS implementation, it seems that it severely affects performance. Might work for simple apps (but then again, so does React Native).

Re:Flutter: a Portable UI Framework for Mobile, Web, Embedde... by rounce on Thursday May 09, 2019 @03:22AM (#19866089)
> But, looking at the iOS implementation, it seems that it severely affects performance.

How did you come to that conclusion? They use the same Webview classes that RN wraps.

Re:Flutter: a Portable UI Framework for Mobile, Web, Embedde... by Eric_WVGG on Wednesday May 08, 2019 @10:28AM (#19859090)
Wow. I figured you were exaggerating, but this is dead on. Safari has a native two-fingered-swipe for going back a page, even that's broken here.

I can't believe we gotta do this Flash and Silverlight fight all over again. Google should know better.

Re:Flutter: a Portable UI Framework for Mobile, Web, Embedde... by Jare on Wednesday May 08, 2019 @03:34AM (#19856655)
> You can't do anything in it that fills like the web

Why "can't"? In this example they were making a game not a web, and they wanted it to feel like a game. The texts you see there are ultimately a plain old HTML p tag with selection and mouse interaction overridden, but I'd be surprised if you can't change those behaviours.

Re:Flutter: a Portable UI Framework for Mobile, Web, Embedde... by munificent on Wednesday May 08, 2019 @05:00PM (#19862890)
> There's a reason why flash died out

A never-ending parade of actively-exploited security bugs?

Re:Flutter: a Portable UI Framework for Mobile, Web, Embedde... by neop1x on Thursday May 09, 2019 @10:16AM (#19868471)
yes. And additionally it uses a new Dart language, requiring re-training JS programmers, unusual and less readable noodle-like code, slow single-core compilation and not as much 3rd-party libs and plugins as they are for JS and Cordova, React Native and NativeScript. I liked it at first, but I have doubts it will ever be wide-spread and highly-adopted. At first I hoped it could make Android app development better, getting rid of Java tooling nightmares but it is also bad in its own ways. So many years passed and Android dev experience haven't improved much. And Flutter is considered main Fuchsia UI language. :( I miss xcode and Cocoa...
Re:Flutter: a Portable UI Framework for Mobile, Web, Embedde... by _bxg1 on Thursday May 09, 2019 @11:33AM (#19869170)
One of the major factors that finally killed flash was the security liability. Presumably Flutter won't have that problem.

I'm actually scared of this fact. Flutter could very well be how Google finally kills the open web, if it succeeds.

Re:Flutter: a Portable UI Framework for Mobile, Web, Embedde... by andrewdubinsky on Wednesday May 08, 2019 @09:15AM (#19858510)
This is plain javascript.

  <link rel="preload" href="/games/prototype/kenken/main.dart.js" as="script">
Re:Flutter: a Portable UI Framework for Mobile, Web, Embedde... by zemo on Wednesday May 08, 2019 @10:17AM (#19858987)
dart transpiles to js. that's how it's delivered on the web. Nothing surprising there.
Re:Flutter: a Portable UI Framework for Mobile, Web, Embedde... by romanovcode on Wednesday May 08, 2019 @04:04AM (#19856802)
Also slow.
Re:Flutter: a Portable UI Framework for Mobile, Web, Embedde... by macspoofing on Wednesday May 08, 2019 @07:21AM (#19857773)
Flash was fast. Much faster than JavaScript+DOM at the time. In fact, it was only within the last few years that browser JavaScript and rendering engines became more performant.
Re:Flutter: a Portable UI Framework for Mobile, Web, Embedde... by the_duke on Wednesday May 08, 2019 @07:36AM (#19857848)
Not sure why you are downvoted, you are right.

The initial loading time was there, but then execution was pretty fast.

With the amazingly optimized JS engines we have now, it's easy to forget how slow things were just 10-15 years ago. (I think Chrome really kicked of the competition there)

Re:Flutter: a Portable UI Framework for Mobile, Web, Embedde... by Wintamute on Wednesday May 08, 2019 @07:40AM (#19857868)
Saying anything remotely positive about Flash is an auto-downvote on HN, even if factually accurate.
Re:Flutter: a Portable UI Framework for Mobile, Web, Embedde... by willtim on Wednesday May 08, 2019 @08:07AM (#19858037)
Which bit was fast? My wife's MacBook sounded like a jet engine whenever she would play the Facebook flash-based Scrabble. Eventually the machine died of fan failure and I had to spend an entire afternoon doing brain surgery on it. I wasn't surprised when Jobs subsequently banned it from the iPhone!
Re:Flutter: a Portable UI Framework for Mobile, Web, Embedde... by Crinus on Wednesday May 08, 2019 @08:34AM (#19858196)
> Which bit was fast?

The performance. The comparison macspoofing made was with JavaScript+DOM, not with native applications. I wrote games in Flash and played around with JavaScript+Canvas back when HTML5 was still fresh and Flash was still king.

The difference in performance was huge and Flash was faster for years. You'd hear people saying that JavaScript+Canvas was a valid replacement, sure, but those people had absolutely zero idea what they were talking about (especially when they said such stuff when there wasn't even a cross platform working sound API).

Things changed over the last years, sure. But do not rewrite history, JavaScript+Canvas sucked for a long time compared to Flash (and in some areas, like distribution, still sucks - a single compressed SWF file with all your resources is still nicer for distributing games than a bunch of HTML and whatever else files).

FWIW i always maintained that Java was miles ahead any of the above when it came to games (especially about performance), but Sun killed applets brutally with its awful startup times and bloated VMs. Then Oracle came along and just abandoned the whole thing.

Re:Flutter: a Portable UI Framework for Mobile, Web, Embedde... by willtim on Wednesday May 08, 2019 @09:11AM (#19858482)
All good points. But I'm still struggling with the idea of using the word "fast" to describe a technology that brought a 2GHz GPU-accelerated machine to its knees with Scrabble. Perhaps "sucked less than JavaScript"?
Re:Flutter: a Portable UI Framework for Mobile, Web, Embedde... by sah2ed on Wednesday May 08, 2019 @10:24AM (#19859044)
Both you and the person you responded to (Crinus) are right. I’ll share some context.

On Windows, Flash was fast but on OS X (as it was called then), Flash performance was atrocious. In fact, this was one of the major reasons why Steve Jobs felt compelled to pen his famous “Flash” article [0], because after getting Apple’s engineers to work directly with Adobe’s engineers, they couldn’t quite get Flash to be performant on the Apple desktop. Jobs added that the single biggest culprit of stability issues reported by customers on Macs was: Flash [0]. I remember this part vividly because my MacBook had never crashed on me until I had Flash in use during a browsing session. The other time this happened was from another Adobe product: Adobe AIR, which I believe uses the Flash engine internally.

Apple worked directly with Adobe because investing the engineering resources needed to make Flash performant and stable didn’t make economic sense for them, but even after this, they couldn’t get it to be stable as desired. Job’s thinking was if you cannot do this on desktops, how on earth will you manage on a resource-constrained device like the iPhone?

[0] https://www.apple.com/hotnews/thoughts-on-flash/

Re:Flutter: a Portable UI Framework for Mobile, Web, Embedde... by Crinus on Thursday May 09, 2019 @05:04AM (#19866549)
FWIW i did almost all of my Flash development on OS X. It is kind of amusing to read that it was even faster on Windows (although TBH i do not remember any significant performance difference in the games i did between Windows, Linux and OS X - then again all i did was blit bitmaps and largely avoided the vector stuff).
Re:Flutter: a Portable UI Framework for Mobile, Web, Embedde... by macspoofing on Wednesday May 08, 2019 @12:09PM (#19860215)
>Which bit was fast?

Code execution and 2D rendering. What else could I mean?

But there's more. You know how people are excited to see native applications running in the browser? Flash did it in 2008[1].

You think you could run Quake2 with 2008-era JS engines?

You think you could run all those 2D games in 2002-era JS engines (even if had access to a Canvas element - which you didn't)?

>My wife's MacBook sounded like a jet engine whenever she would play the Facebook flash-based Scrabble.

Care to guess why it was a flash-based game and not an HTML5 based game?

[1] https://www.youtube.com/watch?v=vH4p8wzqtuA

Re:Flutter: a Portable UI Framework for Mobile, Web, Embedde... by willtim on Wednesday May 08, 2019 @12:39PM (#19860549)
I was not comparing Flash to the JavaScript of the era, just pointing out that, as an end user, Flash didn't seem "fast" to me (on Linux, Android and OSX). Performance on a desktop-class CPU is also only one metric. Flash was clearly inefficient, it didn't use multicore, GPUs or hardware decoders. Was your Quake2 demo above using even OpenGL? Java applets could do that since well before 2008. The original Quake2 could do that in 1997.

> Care to guess why it was a flash-based game and not an HTML5 based game?

Anything would have been better, even bare HTML tables with no animations. The user experience of Facebook Flash Scrabble was awful (at least on OSX).

Re:Flutter: a Portable UI Framework for Mobile, Web, Embedde... by macspoofing on Wednesday May 08, 2019 @02:56PM (#19861802)
>I was not comparing Flash to the JavaScript of the era

But that's the entire point!!! People didn't use Flash because they felt like it. People used Flash because there were things you could do with Flash that you could not do with HTML/JS. Remember there was a time that Flash was the best way to do video.

>Flash didn't seem "fast" to me (on Linux, Android and OSX).

Let's leave subjectivity out of it. If you ran a standard benchmarks and compare to JavaScript of the day, Flash would beat it. That's what I meant by fast.

Here's some metrics for a FlasCC compiled AS3 compared to C++: https://docs.google.com/spreadsheets/d/1PjMDwh4ZbJMMoo-G8vdK...

>Flash was clearly inefficient, it didn't use multicore

Neither does JavaScript (without WebWorkers). Neither does Node.js. Then again, Flash did get Worker support around 2012. And though your code was executed in a single thread, the actual rendering was delegated to the runtime, which was multi-threaded or backed by GPU.

>GPUs or hardware decoders

It sure did. Stage3D (think WebGL equivalent) was introduced in 2011. Video decoding delegated to hardware decoders since forever. Alchemy/FlaCC (WebAssembly equivalent) was released around 2009/2010. In many ways Flash was the vanguard of where HTML5 ended up going.

>The user experience of Facebook Flash Scrabble was awful (at least on OSX).

To be fair, Flash never ran well on OSX. It wasn't bad, but it wasn't as good as on Windows.

>Java applets could do that since well before 2008.

Java applets were an alternative to Flash, but Flash was lighter and had much broader support. It was better for video, better for vector graphics and 2D animations. But yes, Java applets were used to gain functionality that wasn't available in the web just like Flash.

Re:Flutter: a Portable UI Framework for Mobile, Web, Embedde... by andrekandre on Wednesday May 08, 2019 @10:46AM (#19859285)
and unusable on firefox (on my up-to-date pixel c) with it being a bit better on chrome... ipad pro though, actually not too bad in safari (though it makes me wonder about how much of a hit in battery it would cause)