Why doesn't the Dart-Team switch over to Gradle (or Gradle Kotlin DSL)?For Android Gradle is widely adopted, this is also Flutters market. So it would absolutely make sense to accept this industry standard for DartAnd - let's be honest - Bazel is c... nobody is using it - except Google.

8 plus ones

8

15 comments

15

no shares

Mike Mitterer: I know "build" but it's to low level. Don't get me wrong. I think build is cool if it comes to code generation and such. But it's not a build system.

Recently I had to download some files during my CI build processes. Gradle has a plug-in for this. Took me 5 mins and it worked. I couldn't accomplish this with "build". Or try to make a web-jar with "build" - to complicated.

With Flutter you try to hide Gradle... That's wierd. You think it's to complicated for your users? IntelliJ, Dart's main IDE has great Gradle support... Avoiding Gradle can't be a technical decision - must be somehow politicaly???

You say everyone can use the build system he prefers - sure, that's true but it makes no sense if one project uses Make, the second Gradle and the third ????, The JS community suffers from this problem.

Matan Lurey: I feel like this post (and most of the comments) misunderstand what the Dart project and does not do or offer. I'll try to help explain best I can:

*INTERNALLY* (inside of Google), we use a single build system, called Bazel (Blaze internally). There isn't any other option, this is a requirement working here. So we have to have a Bazel/Blaze based option - at least internally - regardless of the PROs or CONs.

Externally, we clearly have more options but rankly you can use any build system you'd like! It's certainly possible to use Bazel, or Gradle, Maven, or anything else you like.

Mike Mitterer: +Shawn Drape If Bazel is out of Beta do you really think people will ditch their Maven or Gradle configs? A build config is a very sensitive thing - never change a running system. Gradle (its the same with Maven) has a great plugin infrastructure it will be hard for Bazel to compete with these players. However - we need Dart adoption now! not in x years. Just look at JetBrains and what they do with Kotlin. They give us a great new language that integrates perfectly into an existing environment.

Dart / Kotlin / JavaI thought I share what I just do... ;-) The project I'm working on has the server logic in Java, the front-end is in Dart (mdl) front-end and back-end share some classes (I use them for network-communication (via JSON)) One of these classes is "TimeFrame" TimeFrame uses one or more "FromToDate"s

Kotlin is new and has great potential. I'm just learning it. So - every time I have to touch a Java class I convert it to Kotlin.

In my opinion, for this example, Dart and Kotlin are almost on the same level. Maybe Kotlin a bit in front (data-class, companion object...), far behind: Java!

3 plus ones

3

3 comments

3

one share

1

A.E. Veltstra (André): What makes you conclude that the Dart and Kotlin are on par, and Java is far behind? What attributes did you look at, to warrant that conclusion?

Mike Mitterer: :-) I forgot something: Dart's way of code documentation with /// instead of Kotlins/Javas way with /** is much more compact and nicer to read.

Mike Mitterer: I mean they are on par (for this small sample) if I just compare the syntax. Both languages have a nice modern syntax. Declaration is easy to read and is much shorter than Java syntax. The advantage of Kotlin over Dart is e.g. null safety and that vars are final by default. data-class in Kotlin is also very cool. I prefer the Dart way of defining named CTORs or factory CTORs over Kotlins way with companion-object.

In general: Dart, in my opinion, has it's strength on the Web-Side (+infrastructure) The dart2js compiler is more mature than the Kotlin2JS compiler. With "pub" Dart has better infrastructure for dependencies and dependency-management. Dart has the slogan "batteries included" and thats true. Dart has a niche where it can shine.

But no doubt - over all Kotlin with it's various techniques like LLVM (Kotlin native), it's Java(VM) integration, Android support, tools support and so forth has a bright future. I guess that in 5 years it's one of the top languages on TIOBE

Dart / Kotlin / JavaI thought I share what I just do... ;-) The project I'm working on has the server logic in Java, the front-end is in Dart (mdl) front-end and back-end share some classes (I use them for network-communication (via JSON)) One of these classes is "TimeFrame" TimeFrame uses one or more "FromToDate"s

Kotlin is new and has great potential. I'm just learning it. So - every time I have to touch a Java class I convert it to Kotlin.

In my opinion, for this example, Dart and Kotlin are almost on the same level. Maybe Kotlin a bit in front (data-class, companion object...), far behind: Java!

25 plus ones

25

10 comments

10

3 shares

3

Richard Vowles: I don't see any advantages in Kotlin over Groovy (which has both static and non-static modes), so for me it is still Java + Groovy on the backend. Dart with Flutter IMHO is killer for frontend mobile.

Mike Mitterer: +Istvan Soos I think thats a matter of taste. I like such things like final by default, null-safty and so forth because its kind of code documentation and it makes code more robust.

However thats kind of a philosophical discussion - very strict against not strict at all

Dart, in my opinion, has it's strength on the Web-Side. The dart2js compiler is more mature than the Kotlin2JS compiler. With "pub" Dart has better infrastructure for dependencies and dependency-management. Dart's (old???) slogan "batteries included" is in many cases true. Dart has a niche where it can shine and I'm looking forward to Dart 2.0 (and above)

Richard Vowles: If you are sharing models and apis you should use OpenAPI. Use a website like stoplight.io - Home to create your API and then just generate the glue code. This is far more reliable, means you are always in sync, can split work between front and back, have a testing fake API to use and gives you great clarity on your API. Grpc does something similar, but that's a bigger discussion.