can dart replace php serverside script ? can dart replace php serverside script ? dart dart

can dart replace php serverside script ?


Probably not.

First of all, dart:html can't be used on the server side. This may or may not be a problem in your case.

More importantly, LAMPP doesn't parse JavaScript - it's treated as a pure client language.You'd need an alternative that is able to parse JavaScript on the server side, for example node.js, but I don't think node.js will be able to parse your PHP scripts.

Another alternative: Run the Dart server in Dart's VM. You'd still need another port for it, but at least there is no need for the "JS server".


Dart can run on the server side and is considered an alternative to PHP. Although this isn't considered LAMP as LAMP stands for Linux Apache MySQL PHP (most cases).

Check out Aqueduct Dart REST Framework for a REST implementation.

Depending on the application you'll need to find a way for the apps to coexist. If the app is stateless it may be easier to shift users from PHP to Dart and back.