Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Will Dart support server side development?

Tags:

html

dart

Are we going to be able to use dart not only on the client/browser, but also on our server?

Write some code for a server e.g. Apache, accept browser requests, query a database and return a response to browser? Maybe create web services?


Edit: here is the link to a video where server side Dart is confirmed:

http://news.dartlang.org/2012/03/video-josh-bloch-talks-about-dart.html [min 36:00]

like image 622
Gero Avatar asked Mar 01 '12 11:03

Gero


People also ask

Can Dart be used for server side programming?

You can use the dart:io library in command-line scripts, servers, and non-web Flutter apps.

Is Dart client side or server side?

Dart is a Google-produced programming language that has slowly been gaining traction, particularly since its 1.0 release last year. While Dart has thus far been seen as a promising alternative to JavaScript in the browser, I'd like to argue that like Node. js, the true promise of Dart is actually on the server side.

Does Dart support backend?

Dart is currently actively used with Flutter for developing the frontend of cross-platform mobile apps. Dart can be also used for web development, but there is no mention of Dart being used for backend development.

Is Dart a client side language?

Dart is a client-optimized language for developing fast apps on any platform. Its goal is to offer the most productive programming language for multi-platform development, paired with a flexible execution runtime platform for app frameworks.


1 Answers

Short answer yes.

Longer answer. The Dart VM already contains a HTTP chat server example that shows how to use the dart:io HTTP API to implement a web service. In general the dart:io library contains functionality that is meant to be used in server side programming such as sockets and file/directory handling.

Its still very early stage but already now you can play around with some early attempts of implementing connect/node style applications using the Dart SDK.

As for communicating between the client and the server you will have to use classic REST/HTTP mechanisms, but in the future (when reflection is implemented in Dart) you will be able to serialize actual Dart objects and thus share them between the client and server.

like image 101
Lars Tackmann Avatar answered Nov 09 '22 19:11

Lars Tackmann