-1

What about server-side-functions (e.g. form validation) in this context? Do I have to implement all the work that I have programmed with Dart also on the server side? I definitely need a "dart-compatible" connection point on the server side.

Seth Ladd
  • 112,095
  • 66
  • 196
  • 279
  • Why do I have asked this question? I would like to suggest dart for an eGovernment-Project at the frond-end. All the given functionality must work also with an deactivated javascript (browser). Therefore there is to much work to do. Maybe Google has already thought about that and there is an complemental solution also for the server side? I think, we need something like dart-front-side and dart-server-side (like node.js) in case of deactivated javascript with a good working interoperability between them? –  Mar 30 '13 at 12:51

3 Answers3

0

At the moment Dart compiles to JavaScript so if it's disabled in the browser the client-side scripts won't work. It won't have any effect on server-side scripts.

JJJ
  • 32,902
  • 20
  • 89
  • 102
  • thank you, what kind of server side technology would your prefer in case of dart on the front size. Is there a recommended library? –  Mar 30 '13 at 12:27
  • I believe you can use Dart on the server too if you want. – JJJ Mar 30 '13 at 13:10
  • It would be great, if it is possible. Can someone else confirm this information? –  Mar 30 '13 at 13:15
  • Well, it says so on the Dart home page ("Dart apps can also run on the server, in a stand-alone Dart VM."). – JJJ Mar 30 '13 at 13:15
  • OK, I now that, you mean dart.io? But this library does not work in browser based applications. (http://api.dartlang.org/docs/releases/latest/dart_io.html) –  Mar 30 '13 at 13:24
  • That just means that you can't use that library in a browser. There's nothing stopping you to have it serve responses to the browser. (In fact that's what it's meant for.) – JJJ Mar 30 '13 at 13:27
0

Whatever client-side language you're using, you will always find some user without it (i.e. disabled javascript).

Therefore server-side validation is a must, also in tiny applications, especially for security reasons.

alexcasalboni
  • 1,726
  • 1
  • 16
  • 26
0

Dart can run on the client and the server.

When running on the client (in a web browser), you can either run Dart code in a Dart VM or by compiling the Dart app into JavaScript.

When running Dart on the server, you can run Dart code in the Dart VM. The Dart VM runs on the command-line, and can access files, directories, sockets, HTTP servers, and even web sockets.

Therefore, Dart is useful even if you need to support web browsers that have turned off JavaScript.

Seth Ladd
  • 112,095
  • 66
  • 196
  • 279