{"id":15591643,"url":"https://github.com/starptech/dart-nodejs","last_synced_at":"2026-04-10T21:05:34.240Z","repository":{"id":151890572,"uuid":"130569070","full_name":"StarpTech/dart-nodejs","owner":"StarpTech","description":"Compare https://www.dartlang.org/ and Node.js for server-side development","archived":false,"fork":false,"pushed_at":"2018-04-30T12:35:51.000Z","size":39,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-06T02:41:50.654Z","etag":null,"topics":["compare","dartlang","nodejs"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/StarpTech.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-04-22T13:18:52.000Z","updated_at":"2023-08-11T07:13:26.000Z","dependencies_parsed_at":"2023-05-14T09:15:45.847Z","dependency_job_id":null,"html_url":"https://github.com/StarpTech/dart-nodejs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StarpTech%2Fdart-nodejs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StarpTech%2Fdart-nodejs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StarpTech%2Fdart-nodejs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StarpTech%2Fdart-nodejs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StarpTech","download_url":"https://codeload.github.com/StarpTech/dart-nodejs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246552893,"owners_count":20795836,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["compare","dartlang","nodejs"],"created_at":"2024-10-02T23:42:14.377Z","updated_at":"2026-04-10T21:05:34.209Z","avatar_url":"https://github.com/StarpTech.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dart-nodejs\nEvaluate Dart as an alternative to Node.js for server-side development. This repository should serve as rough outline about the differences and similarities to Node.js.\n\n# Dart\n\n## Development\n\n- Built in [linter](https://www.dartlang.org/guides/language/analysis-options).\n- Standard lib is shipped as SDK and written in Dart itself. We can debug the whole stack by pressing \"F12\". In Node.js the standard lib is embedded with the binary.\n- Provide [`pub`](https://github.com/dart-lang/pub) a package manager like `NPM`.\n- Full vscode [support](https://dartcode.org/).\n- Opinionated formatting like gofmt or prettier called [\"dartfmt\"](https://github.com/dart-lang/dart_style).\n- [Dartdocs](http://www.dartdocs.org/) Automated documentation generation for Pub packages.\n- Code completion, GoTo, Find References, Renaming ...\n- Great tools for [testing](https://www.dartlang.org/guides/testing), [benchmarking](https://www.dartlang.org/articles/dart-vm/benchmarking) and [mocking](https://github.com/dart-lang/mockito).\n- Built in profiling tool shipped with the SDK [observatory](https://dart-lang.github.io/observatory/).\n\n## Unique features\n\n- Multithreading support by [isolates](http://jpryan.me/dartbyexample/examples/isolates/):\n  \u003e Isolates communicate by passing messages over channels, which is similar to actors in Erlang or web workers in JavaScript.\n- Smother async error handling and debugging by the concept of zones.\n- Simple and robust [streaming api](https://www.dartlang.org/tutorials/language/streams) \n- [Async](https://www.dartlang.org/guides/language/language-tour#lazily-loading-a-library) module loading\n- Reduce startup times by using [snapshots](https://github.com/dart-lang/sdk/wiki/Snapshots)\n  \u003e Known as `app-jit` snapshots\n- Dart transpiles to JavaScript.\n- Build native Android and IO's apps in record time with [flutter](https://flutter.io/)\n\n## Language\n\n### Modern language features like:\n* Async-iterators\n* On-catch\n* Sync-iterators\n* Null-Aware Operators\n* Ranges\n* typedefs\n* cascade operator (..)\n* ...\n\n### Language characteristics:\n* Strongly typed\n* Type inference\n* Generics\n* __OOP language with classes and mixin-based inheritance__\n* Dart use AOT (Ahead Of Time) as well as JIT (Just In Time) compiling techniques. Read the great article [Why Flutter Uses Dart](https://hackernoon.com/why-flutter-uses-dart-dd635a054ebf)\n* It's an [ECMA-408](https://www.ecma-international.org/publications/standards/Ecma-408.htm) standard\n* ...\n\n## Common gotchas\n\n- Language syntax and concepts are very similiar (Single-threaded, Event-loop, async/await, error-handling try/catch...)\n- Use [Futures](https://api.dartlang.org/dev/dart-async/dart-async-library.html) as companion compared to Promises\n- Has it's own registry like NPM called https://pub.dartlang.org/\n- Dart compiles to ARM and x86 code\n\n## Interop\n\n- Dart can be compiled to Javascript with [dart2js](https://webdev.dartlang.org/tools/dart2js)\n\n## Miscellaneous\n- Backed by Google like V8.\n- Battled tested by Google and [many](https://www.dartlang.org/community/who-uses-dart) other companies\n- Faster as V8\n- Travis support\n- Google provides docker images [here](https://github.com/dart-lang/dart_docker)\n\n# My first conclusion\n\n\u003e If you don't use Node.Js for isomorphic applications and if you don't rely heavily on other javascript libraries use Dart it will boost your productivity to [Over 5000](https://www.youtube.com/watch?v=j_gpe2-oaB0). You can still apply many concepts from Node.Js like Classes (ES6), Mixed Inheritance, Event Loop characteristics, Promises (Futures), Async/Await, try/catch, Streams, lexical scoping, closures... without to negotiate about performance and compatibility.\n\n# Demo\n\n## Installation\n\n1. [Install](https://www.dartlang.org/install) DartVM\n2. Run `pub get`\n\n## Commands\n\n```bash\n# Run tests\npub run test ./test/test.dart\n# Run benchmarks\ndart ./benchmark/benchmark.dart\n# Install a package\npub get $name\n# Install a package as executable\npub global activate stagehand\n# Run profiler\ndart --observe .\\main.dart\n# Compile to JS\ndart2js .\\main.dart\n# Create app snapshot\ndart --snapshot=main.dart.snapshot main.dart\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstarptech%2Fdart-nodejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstarptech%2Fdart-nodejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstarptech%2Fdart-nodejs/lists"}