13 ms·
Google’s Flutter = React and Java Swing
- jaequery 9y agoDart? Sorry I'll have to pass. On top of Elixir, Go, and JS fatigue, I don't think I have any more room left for another language to "try". But if it was Polymer with native iOS/Android support, now then this would've been a different story! When I compare all the recent front-end frameworks, Polymer still is the most appealing to me, I wish it had a bit more steam behind it.
- pjmlp 9y agoGoogle IO sessions sometimes feel a bit schizophrenic, if you watch all tracks, you will see Android, Web and Flutter teams kind of taking jabs at each other about the right way of doing apps.
- tkubacki 9y agoDart is Java/C# like - you will be fluent in one day
- deleted 9y ago[deleted]
- floatboth 9y agoPolymer with native iOS/Android support would be… Not Polymer. Polymer is a thin layer of sugar on top of the web platform, it's 100% web, it doesn't make sense outside of the browser because it doesn't have its own special component model, it literally just directly subclasses HTMLElement to provide sugar, that's it.
- yrio 9y agoDart is quite similar to Java. If you are already familiar with Java I believe it will take you very little time to get started with Dart. FWIW, I was able to write two small but useful program in Dart in one day, without any experience with the language at all: - A script to convert CSV file to SELECT ... UNION ALL SELECT ... statements - A script to parse my timesheet (in Emacs' org-mode) & insert it into my client's timesheet database I just used these 3 resources: [1] Dart language tour https://www.dartlang.org/guides/language https://www.dartlang.org/guides/language [2] Standard library introduction https://www.dartlang.org/guides/libraries https://www.dartlang.org/guides/libraries [3] Standard library reference (like JavaDocs) https://api.dartlang.org/stable/1.24.2/index.html https://api.dartlang.org/stable/1.24.2/index.html [4] And the pub package manager https://www.dartlang.org/tools/pub https://www.dartlang.org/tools/pub
- copperx 9y agoIt's really easy to get started with almost any language, the problem is becoming an expert in it. How can somebody become an expert on the nuances of JS, Typescript, Dart, etc not to mention libraries and APIs of each? And that's just for the frontend.
- untog 9y agoI think learning a new language is more acceptable when you're also using it on a new platform. I was sceptical about picking up Swift, but I was up and running within a few hours.
- tomatsu 9y ago> Dart? [...] JS fatigue I think you might like working with Dart. The entire ecosystem is standardized. And if you do Flutter stuff, Flutter is the only framework. Learning the language isn't a big deal. You already know most of the syntax and its semantics are straightforward. You can try doing some Hello World stuff over at DartPad: https://dartpad.dartlang.org/ https://dartpad.dartlang.org/
- wmleler 9y agoI love Polymer too, but if you are like me the parts you like most about Polymer are the beautiful widgets and the ability to create new widgets. Flutter provides that for mobile apps. As someone else said, Polymer itself is just a web implementation of user-defined HTML elements and makes no sense for mobile apps. As for not wanting to learn Dart, if you are currently developing mobile apps for one platform (say Android) and you want to port your apps to the other platform (say iOS) then unless you already know the languages and libraries used by that other platform (say Swift or Objective-C) then you already have to learn a new language. Wouldn't it be better to learn something like Dart that compiles natively on both platforms? Then you can just write one program. In particular, maintenance is much easier. (disclaimer, I like Flutter so much I just joined the Flutter team)
- skalkin 9y agoI understand where you are coming from - however, Dart is super easy to start using, you will feel at home in no time. Solid, though-out standard library, everything just works out of the box. Honestly, it's a very refreshing experience compared to JS / TypeScript. I bet you'll love it after a day or two.
- copperx 9y ago> On top of Elixir, Go, and JS fatigue, I don't think I have any more room left for another language to "try". Not to mention Elm.
- zelos 9y ago> So they can look like iOS native widgets or Android native widgets. This is basically the exact same approach as JavaSwing. Hang on, he's saying it's like Java Swing as if that's a good thing?
- bitL 9y agoYeah, funny, isn't it? I wish we had a variation of Deplhi's VCL for web/java/etc. instead of all these monstrosities that make life miserable instead of taking 5 minutes to make a solid UI.
- preordained 9y agoFor real. Cakewalk to do these sort of "responsive" applications in Swing, and Swing is hardly the most elegant native GUI framework (though well known).
- Hixie 9y agoCan you elaborate on which part of Delphi's VCL you are looking for?
- kuschku 9y agoCompared to the entire JS world of UI frameworks that come bundled with a 200M "runtime" for desktop applications? Yes, yes it definitely is a good thing.
- Kiro 9y ago> React Native uses native widgets. This means you have to create separate apps for Android and iOS. I've never used any native widgets in React Native. Didn't even know they existed. I create and style all widgets I want from scratch so they obviously look the same on both Android and iOS. I thought that was how everyone did it. What am I missing?
- smdz 9y agoThere are "few" components that needs platform specific implementations in React Native. But I've never had to create separate projects entirely - just add some build tweaks. > I create and style all widgets I want from scratch This is what I hate about React Native. I don't like the custom boilerplate that goes into every new project. But NativeBase kind of solves this problems - to some extent. Using standard React Native components is like using raw HTML without a CSS framework
- CognitiveLens 9y agoAll of the built-in React Native components are wrappers around the corresponding native widgets: https://facebook.github.io/react-native/docs/components-and-apis.html https://facebook.github.io/react-native/docs/components-and-... You can also integrate other native widgets not designed first and foremost for React Native https://facebook.github.io/react-native/docs/native-components-ios.html https://facebook.github.io/react-native/docs/native-componen...
- 9y ago
- smdz 9y agoLink: https://flutter.io/ https://flutter.io/
- Keats 9y agoAny idea when this will be in beta? That looks way more interesting than React Native to me.
- amelius 9y agoUnless you want to run your code on the web as well, I guess ...
- TulliusCicero 9y agoWhile it's labeled alpha, AFAIK it's fully available for public use and it's fairly functional.
- IshKebab 9y agoFunctional but fairly buggy still. For example it misses a lot of button taps because there is a universal move threshold of about 2mm. And if you want to do anything other than display widgets in the app (e.g. display notifications), you're going to have to write a plugin for it.
- on_and_off 9y agoPerformances are really far off still. 120 fps ? it can't do 30 at the moment. (and fps is a pretty awful metric on mobile, what matters is the number of frame dropped)
- hardwaresofton 9y agoDoes anyone feel a tinge of guilt using the amazing technology that Google provides? I think Google is overall a pretty "evil" (I use quotes because the term is loaded, and the reasoning is too long to easily state) company. IMO Google is, at best, hard-to-trust, and at worst adversarial in many of the decisions they make. But I sure am excited when it produces technology like Android, Golang, Flutter etc and makes it free to use. Personal opinions aside, what they've done here is managed to create a full-measure cross platform mobile application, and they have the resources that warrant taking them seriously. All the other options are either half measures or require such a drastic shift/ongoing support that I hesitate to use them, to list a few: - Cordova/Phonegap (half-measure) - React Native (Facebook is your benevolent dictator) - Lambda Native (convince the team to go full lisp, and hope/build support as the platforms change under you) - Native (learn all the ins and out of 2+ different platforms, and hope to be prolific, because you'll likely not be expert in either one) I just wanna know if anyone else has this dilemma/thinks about this. IANAL, but the license (https://github.com/flutter/flutter/blob/master/LICENSE https://github.com/flutter/flutter/blob/master/LICENSE) is basically MIT + don't put google's name in your product... Maybe I'm thinking about this too much
- pjmlp 9y agoNo dilemmas on my side. My approaches are C++ using a MVVM architecture with native views, Xamarin, or just focus on a single platform. Depending on what I want to implement.
- amelius 9y ago> Does anyone feel a tinge of guilt using the amazing technology that Google provides? I certainly do. I asked this question before, but I get the feeling that most people here just want to take what's good from Google, and still question all their evil doings. I think that's hypocritical.
- TulliusCicero 9y agoDisclaimer: I work at Google. I don't see that as hypocritical. I just want the 'good parts' of my relationship with my wife while still being able to criticize her sometimes. I want the useful parts of government while still being allowed to criticize them frequently. It's not that unusual a state, really. Personally I think it's great that people who use Google's products are still willing to take us to task. User/civic feedback is an important mechanism to keep big companies like Google in line.
- tallowen 9y agoIt is very exciting to see more people write frameworks using "React" ideas. This will make React and similar frameworks better! It seems like one of the biggest ideas that flutter brings to the table is a different approach to component libraries. It makes sense that there is a need for this given that larger companies that invest in React tend to have their own tailored component library that people outside of those companies generally don't get to take advantage of. The startup costs to developing your own library of React components and their CSS/Native wrappers are high. That being said, when I think of prebuilt component libraries (eg, bootstrap, swing) I generally think of components that are too familiar for users and a crutch for developers to allow them to quickly develop interface code where they may not be an expert. In a high quality app, I would expect widgets to follow the patterns that other apps on the platform follow. Won't this be difficult for a framework like Flutter which will have to re-create each of these native widgets (as apposed to React native where they are just wrapped in a JS layer)? Regardless of these qualms, I'm excited to see more well funded frameworks enter this space because I'm sure that all users of frameworks in this space will benefit. I will be on the look out for more complex uses of this framework to see how people overcome these types of issues!
- tobiaswk 9y agoFlutter is an amazing project. It feels like an futuristic version of the Android SDK. Everything is a widget and it has a catalog of amazing widgets. These conform to the Material Design guidelines. It makes it very hassle-free to make a functionally great and beautiful app. You write your Flutter app using Dart. The Dart code is compiled to native code. The more I work with Dart the more I like it. The IntelliJ Flutter plugin makes for a tight and great integration. Right now the weak point of Flutter is that there aren't many plugins for utilizing platform specific features. This always the fault line with these cross-platform frameworks. These will come I'm sure of. It's relatively easy to write a plugin which is a great plus. I've done native development on both Android and iOS. Tried Cordova-based development. Lastly React Native. Out of all these I like Flutter the most. You will make a beautiful app with much less work compared to native development and other alternatives. The performance is also fantastic. Flutter uses its own high-performance rendering engine to draw widgets. Almost the entirety of Flutter is written in Dart; also the lower parts. This is important for development because nothing is closed off. With everything being written in Dart it gives you a high degree of control. My early work so far using Flutter; https://play.google.com/store/apps/details?id=org.me.tvligenu https://play.google.com/store/apps/details?id=org.me.tvligen... (Danish television listings) https://play.google.com/store/apps/details?id=dk.kjeldsen.etherexplorer https://play.google.com/store/apps/details?id=dk.kjeldsen.et... (Ethereum blockchain explorer)
- pjmlp 9y ago> Flutter is an amazing project. It feels like an futuristic version of the Android SDK. This is how I would like to have seen ChromeOS being implemented, a fresh revisit of the Smalltalk experience but using Dart instead. Instead they created a browser window manager.
- gman83 9y agoFuchsia is using Flutter for applications.
- pjmlp 9y agoYes, but we still don't know what will actually happen to Fuchsia. Hopefully it will be something like that, a nice micro-kernel OS, using a mix of C++/Rust and Dart. But given how Google projects go, it might just be canceled or pivot into something else, e.g. Brillo vs Android Things.
- edtechdev 9y agoI wonder about accessibility of flutter widgets though, since they aren't just wrappers for native widgets. Looks like it's still not accessible https://github.com/flutter/flutter/issues/10562 https://github.com/flutter/flutter/issues/10562 The issue was brought up a year ago too https://groups.google.com/forum/m/#!topic/flutter-dev/xwUJ7DzIFlk https://groups.google.com/forum/m/#!topic/flutter-dev/xwUJ7D...
- gman83 9y agoAdam Barth from the flutter team responded last time this came up: https://news.ycombinator.com/item?id=14433320 https://news.ycombinator.com/item?id=14433320
- Hixie 9y ago(I'm on the Flutter team) We're actively working on accessibility right now. It's one of our top priorities for the next few months.
- mbid 9y agoIs Flutter tied to Dart, or are there good C bindings so I can use whatever language I want? I've never understood the obsession with creating a whole language around a library (R, Matlab, Magma, Javascript, Wolfram...) so that I'm essentially forced to use that.
- pjmlp 9y agoBravo, you just discovered how language adoption works. Also as an addendum, C is a language designed around an operating system. If it wasn't for UNIX's adoption, C would have been a footnote in the history of systems programming languages.
- mbid 9y agoWell, yeah, but wouldn't you agree this is a sad state? Also, C as a "portable assembler" kind of make sense as a lingua franka, because every language has to go through assembler before being executed at some point.
- pjmlp 9y agoNo, because adoption needs to be driven by an actual need of some sort. A programming language doesn't get adopted just for its grammar and semantics alone. Regarding the benefits of C as portable Assembly, I advise you read about the programming languages and operating systems designed in the 60's, 10 years before UNIX was created.
- brad0 9y agoFinally a cross platform framework that makes sense! Writing your own UI elements using the platforms graphics primitives makes a lot of sense. It will be interesting to see how it works in practice.
- alkonaut 9y agoLooks very nice. Any indications that is or will be possible to make non mobile apps? Or that it will have bindings to other languages? Dart is a huge step up from JS, but I can see how other languages would be a nice fit too.
- xg15 9y agoI'm looking forward to the first library/tool/support project called Shy
- gagege 9y agoOr port it to a different language and go with the deep cut, Zephyr. Makes a lot of sense because reactive programming is inherently lazy. :)
- steedsofwar 9y agoMy years of toil with Java Swing makes me shudder every time i hear its wretched name.
- cypher303 9y agoThe floating 'open in app' on this page is really bad. Please stop doing that. For fucking crying loud, don't mix text with bullshit.
- rockmeamedee 9y agoAt this point we should probably make a framework for implementing the native features in these systems, so the next Cordova/Ionic/Xamarin/React Native/Flutter doesn't have to start from scratch every time and take 2 years to re-build nearly the exact same ecosystem for native features. As a plus we could consolidate all that brainpower spread across different cross platform native feature libraries to make these native features less buggy, more featureful and more maintained.
- devdoomari 9y agohow's flutter's interop with java/kotlin/swift/etc? Would I be able to use existing libraries from those lang.s?
- afsina 9y agohttps://flutter.io/faq/#can-i-interop-with-my-mobile-platforms-default-programming-language https://flutter.io/faq/#can-i-interop-with-my-mobile-platfor...
- devdoomari 9y agohm... is it something like IPC? By 'message passing', would it be ok to use a java image-processing/video-processing library?
- Hixie 9y ago(I'm on the Flutter team.) IPC is "inter-process communication". This message passing is same-process. We haven't yet proved that it's sufficiently performant for extremely latency-sensitive work, and we currently copy the bytes for the messages when switching so it's not very suitable for high-bandwidth work like video where you're sharing the bytes between Dart and Java.
- on_and_off 9y agoAFAIK : not at all :( On Android, Flutter uses its own C++ runtime totally separate from the Android framework.
- criddell 9y agoIt looks fantastic, but with Google I always wonder about their long term commitment to stuff like this.
- anthonybullard 9y agoWell, they state that they are using it in their own production apps. They did the same with Angular from basically day 1. And it started as a 20% project for Igor(sorry if I'm remembering that wrong). Nearly seven years later and here we are at Angular 3, I'm sorry 4. It all depends on adoption.
- criddell 9y ago> It all depends on adoption. That sounds about right. I guess the conservative approach would be to wait and see if it gains any traction.
- WaltPurvis 9y ago>Well, they state that they are using it in their own production apps. They did the same with Angular from basically day 1. This reminds me of a question I've had before: exactly what production apps does Google use Angular for? Have they rewritten Gmail to use Angular? Or Calendar? Or Docs? I'm too lazy to dig into the obfuscated source of any of these to figure it out for myself. Does anyone know what apps Google actually uses Angular for?
- wener 9y agod
- taeric 9y ago> There are no external UI DSLs (i.e. html or xml files). > The entire UI is written in Dart. This, for me, is a > big win. This view amuses me. It is obviously held as an opinion, and isn't one I disagree with; but goes heavily against what everyone was aiming for with the likes of HTML. To the point that it is kind of hard to believe I'm seeing it. I give it about 4 months before there is a UI language that is not "code" that is usable here. Pushed by the other side.
- untog 9y agoHTML was designed to create documents, though - not UIs. That also happens to be the core of a lot of problems with it (that, IMO, are overblown). A lot of the struggle/difference between JS frameworks is this disagreement about where things fit on the document vs app scale, IMO.
- taeric 9y agoAnd to an extent, I fully get what you are saying. However, the entire push of HTML/CSS is not much different than the push of LaTeX over TeX. Or any number of other examples. (You can almost draw the line at people wanting a fully declarative language for content being the problem. I'm sympathetic to that view. I haven't explored it enough, yet.) People want to find a very hard separation of presentation from content. And to an extent, this makes sense. However, ditching HTML and similar tech seems excessive to me. The largest problem with HTML is so many people try to appease the flow and native layout of the elements. This leads to a massive bloat of markup to create what is actually easy to describe using minimal markup and liberal usage of absolute/relative positioning.
- sandGorgon 9y agoThe biggest problem with Flutter is that of developer reluctance - primarily because of Dart. And ever more so now because Android adopted a small, scrappy company's homegrown language (Kotlin) instead of Google's own. I'm kind of wondering what are the political fault lines inside Google around the Dart, Flutter and Android ecosystem. If Kotlin gets adopted server side at Google as well (which is fairly likely considering Google is already using the JVM), then why would people bet on Dart ? Is Dart 10x better than Kotlin ?
- cheapsteak 9y agoSearch trend comparison of Dart vs Kotlin vs React Native: https://trends.google.com/trends/explore?q=%2Fm%2F0h52xr1,%2Fm%2F0_lcrx4,React%20Native https://trends.google.com/trends/explore?q=%2Fm%2F0h52xr1,%2... Interesting that there's heavy kotlin searching mainly in Russia
- lilactown 9y agoKotlin is the name of an island in Russia.
- evilduck 9y agoNot really that surprising to me, Kotlin is named after a Russian island, so naturally their non-developer populace will use the term more than the rest of the world and the programming language was created by JetBrains, a Russian company, so I'd also assume there's probably some elevated interest for Russians in something successful that's also "home grown".
- sfRattan 9y agoTechnically, JetBrains is a Czech company with offices in Russia, among a half dozen or so counties.
- isoos 9y ago> Is Dart 10x better than Kotlin For many, it is. The consistency and the well-thought out API and syntax is a huge boost, and while they have similar roots, Dart is much better in these regards. Disclaimer: developed in Kotlin only for a few months, did a lot more in Dart. I encourage you to try it and evaluate it for yourself. Your speculation about the politics in- or outside Google are just that: speculations, while a fair evaluation shows way more nuanced view of what is better and what has better chances in the long term.
- tannhaeuser 9y agoThe title led me to believe this is about a java.awt.geom and Swing port to Android.
- Tloewald 9y agoMy first problem with Flutter is that it doesn't unify web and native development, so it fails to solve the big problem immediately. If you can deliver web and mobile from the same codebase, you can deal with the "long tail" of users (and web users too). React Native (not that I have any great love of React) and its clones are working towards supporting all platforms. My second problem with Flutter is the writer's apparent biggest positive feature — Dart. (I love how he naively states that Dart was conceived as a language to transpile to Javascript; it was conceived as a replacement for Javascript with transpilation as a stopgap.) I think Javascript is a fine ("good enough") language that (a) works almost everywhere and (b) is evolving at a more-than-sufficient rate. I have no desire to drink Google's Kool-aid. (Go, OTOH, I am fine with.) But then I get to "Building Layouts with Flutter": https://flutter.io/tutorials/layout/#step-1 https://flutter.io/tutorials/layout/#step-1 This makes the articles I've read on "thinking the React way" seem mild in comparison. In exchange for having to restrict your layout ideas to the stuff that will work in Flutter (which first entails somehow grokking what works in Flutter), you have to go from visual concept to hierarchical breakdown and then translate that into code in less than intuitive ways, and then when your graphic designer decides that such-and-such needs to be 2 pixels lower or the stars should get bigger in the middle, you're still going to be hosed or inserting fixed height shims all over the place (and how will that look on a tablet?) This API seems too high level to produce polished products. Of course it's alpha so blah blah blah but being able to quickly produce generic stuff is not a proof of concept, especially if you can't then refine the generic stuff to the nth degree.
- Hixie 9y ago(I work on the Flutter team.) > This API seems too high level to produce polished products. You can target whichever level of Flutter's APIs that you want. Almost the entire stack is in Dart, from the compositor, to the layout engine, to the animation logic, to the composition (widgets) layer, to the material widgets. If one layer is too high level, you can go down one level and work directly there instead. The lowest level (the C++ layer) is literally just the Skia API, the Dart core APIs, a text rendering API, and a message-passing API for talking to your Java/Kotlin or ObjectiveC/Swift code. Everything else is layers you can directly poke at from Dart, written in Dart.
- bsaul 9y agoSomething i don't get : does this mean the flutter team will have to redevelop all the gui features and new components of every single new version of cocoa touch, every year, within the timeframe of the beta and the actual release of the new sdk ? And do the same with android sdk ? Or, will you end up with old looking interfaces and wait anxiously for someone to update the gui component library ? Because except for creating its own ui paradigm, that will look different from both ios and android, i don't see another option.
- yellowapple 9y agoA lot of the praises of Flutter in the article can be said about Tk. I guess I ought to have a look.