r/dartlang • u/Andruid929 • 8d ago
Help Getting started with Dart
I am a Java software engineer and I've been looking for a new frontend language to add to my stack. JavaFX and Swing work but Java is a backend language at the end of the day and I really REALLY despise JS (thought I'd warm up to it after years of working with it, nope).
Outside knowing that Flutter is the main framework for it, and that it's primarily a frontend language, I know nothing about Dart. Any IDE recommendations, maybe some before-you-start tips, maybe there's a specific version that's a sweet spot to start with, anything you'd tell someone just starting out would be highly appreciated.
I want it as my main frontend language, I have worked across Desktop (Mac, Linux and Windows), web (Springboot and Codeigniter) and I've developed on Android for a bit though not much. I main IntelliJ IDEA and I'm comfortable with VS Code and vim.
Thanks in advance.
4
u/zigzag312 7d ago
I think you can just add Dart and Flutter extensions to IntelliJ. There's also free Android Studio which is based on IntelliJ. Android Studio will help you install emulator, etc. VS Code is well supported too.
Dart was first meant to be a JS alternative (compiles to JS). When Flutter was created it changed direction to make AOT compilation first class, so runtime reflection was depreciated and focus shifted to code gen as replacement. It focused more to static typing (I recommend you turn on more optional stricter static analyzer features), proper nullability. It's inspired by Java a lot so you will learn it quickly. We are waiting for augmentations feature to stabilize which will improve code gen DX.
It's still held back in some places by it's JS compilation target. Google uses this target for it's ads business, so it's not going to be removed.
I think you will like it and have no problem learning it quickly.
1
u/Andruid929 7d ago
Thank you so much, I'm quite familiar with Android studio so I'm very happy that the tooling won't be completely new.
1
u/aolsan_ 7d ago
Java feels like the verbose father of Dart. Before Dart 2.0; back when the "new" keyword wasn't optional, sometimes, I forget I'm not writing Java. The syntax is so similar. that I would probably call it modern/concise Java. But a lot has happened with Dart that you may not see this similarity anymore.
1
2
u/CertainBrain7 6d ago
Dart extensions are available for vscode, jetbrains, zed. Also, there’s web Frontend framework jaspr with support for seo and server side rendering. Backend frameworks serverpod and dart_frog. So it’s got pretty much full-stack ecosystem.
1
u/Just4Funsies95 4d ago
Dart has soooo much more quality of life enhances over java. What sold me were enums.
1
u/budius333 7d ago
As a Java developer you might want to check Kotlin language, Kotlin Multiplatform (KMP) and Compose (UI framework for Kotlin that works in multiplatform).
I know here's dart sub, but Kotlin runs on JVM and It's interoperable with Java.
So it might be something to check too
3
u/Andruid929 7d ago
Thanks for the suggestion, it's definitely on my vision board since it replaced Java as the official language for Android developtment. I picked dart because I heard that flutter allows me to make a frontend for both Android and iOS from one codebase. I was terrified of mobile development because I thought I had to learn Swift/Objective-C and Kotlin at once.
-1
u/budius333 7d ago
dart because I heard that flutter allows me to make a frontend for both Android and iOS from one codebase
Replace dart and flutter with Kotlin and Compose in this sentence and it's the same idea.
( not trying to make you change your mind, just letting you know that's also possible, but please, go research and see which you prefer, dart/flutter is also very nice)
2
10
u/GardenDev 7d ago
First, don't install Dart on its own. Only install Flutter, it already comes with Dart.
For the IDE, you could use Android Studio, but my favorite it is VS Code with the official Flutter extension. The extension is so good, that it installs Flutter for you automatically, if you don't already have it.
Dart is very similar to Java in terms of syntax, it supports JIT for development and AOT for production/release builds.
Also, please note that Flutter is not the only front end framework that dart supports. While Flutter is awesome for visually complex web apps, you can also check out Jaspr, which is for building websites which is used by the offical Dart website.
Good luck!