Ask HN: Who here is using Dart on the server side?
And what drawbacks have you run into and why? Would you go down that path again in late 2018, or choose a different path? I'm considering Dart for a project, but Google's focus for it is now "client" and comments like this (https://news.ycombinator.com/item?id=17708671) from a core team member four months ago make me think I'll run into some blockers pretty quickly. I appreciate any insight you can share...
6 comments
[ 2.6 ms ] story [ 22.6 ms ] thread* Dev.to - https://dev.to/graphicbeacon * Medium.com - https://medium.com/@graphicbeacon * YouTube channel - http://bit.ly/fullstackdart
There are a number of external users using Dart this way too. I think it's mostly a question of expectation. If you are expecting an ecosystem like npm where there's already five thousand packages for every possible bit of functionality you could hope for, you might find things a little sparse on the ground right now in Dart.
But if you want to write most of the code yourself and just want to know if the base platform is stable and fast, then I think it will be fine.
The pro side:
- DartVM is fast enough. Not JVM-fast, not always Go-fast, but usually faster than Node, Python and Ruby. It varies over time, other VMs also improve, then Dart improves, I haven't checked it recently. Most of the time my database IO is the limiting factor, even with a lot of text-extraction and processing.
- Great, well-thought out API, language, tooling, parallelism and concurrency primitives. I sometimes revisit code that I've written three years ago and I'm productive fast. It is readable, it is easy and safe to refactor if needed.
- No lib/framework fatigue like in Node.js. For many things you can get away with the standard APIs.
Cons:
- Database drivers are limited. Postgres works nicely, others reported MySQL working well. I've created a very limited Elastic client, but I'd also loved to see a (working) Cassandra client too. Started writing one, seems like not much work but at the moment I can't really justify it. Maybe I will port my very old Riak client to Dart2 some day.
- I miss the ability to include Lucene directly (a very specific need - I know). That may change though in the near future, as DartVM is likely to get much better native interfaces, and maybe it won't be too hard to include such things.
- Small server-side Dart community (compared to well-established server-side languages).
My advice: start the project only if you are happy with the current level of libraries. Things are likely to improve, but likely not super-fast.
Would I choose differently today? Not at all.