Hacker News new | past | comments | ask | show | jobs | submit login

Two things:

One: If this is the best Flutter has to offer, it needs to go back to the drawing board. It's too verbose. 20 lines for a custom app bar. 7 lines for a contact list title. An entire page? Good lord, 24 lines.

The only part it got right was the data-driven-esque portion at lines 66-76. Most UI development should look like this.

But if you're telling me I need to write imperative code to set padding, much like the article complains about, you're wasting my time. In fact, most of the code shown here is imperative. It's not declarative in any sense. The entirety of the ViewController definition is imperative.

I've written UIs my entire career. Entire career. This isn't progress. It's why teenagers are having so much fun with web technologies, and in my adult years I've been dying to see something come out and replace them.

Two: You need an answer to the visual formatting model [1]. Yeah, you know, the W3C recommendation from 2011, which practically speaking has existed since '09, and frankly before that, CSS1 was great for a majority of work. Facebook's answer was Yoga. Great, but that's only the beginning.

Most UI examples seem innocent enough when you're providing samples only a few hundreds of lines of code long. But codebases are filled with these things into the 10s and 100s of thousands of lines of code, and all too often that's literally only for positioning elements around.

Separate from this, you need event logic in entirely separate files. Yeah, I know it's not really how people do things in React these days, but it's a hard step backwards. I firmly believe this. It's another reason why people are holding on to Vue, which, granted you can put an entire component's code in one file, but eventually you will really, really, not want this.

You'll eventually want to think of things in classical styling separate from logic, and logic from layout, which all coincidentally have been in place with HTML, CSS, and JavaScript for decades.

Apple isn't the target. They're a non-player. WHATWG and W3C are.

Anything else is acting like an athlete trying to compete with an old man.

[1]: https://www.w3.org/TR/CSS2/visuren.html




Interesting thing is Flutter was started as an experiment by guys on the chrome team, Ian Hickson, co-editor of the CSS 2.1 spec, works on Flutter as a TL. An aim of the Flutter team is to improve the developer experience.

Google uses a design pattern to helps to separate presentation from business logic, this allows them to share code across flutter and the web. https://pub.dartlang.org/packages/bloc

Here is the design bit from Flutter 1.0 live stream. https://youtu.be/NQ5HVyqg1Qc?t=5940




Applications are open for YC Summer 2019

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: