3

Newbie question. My company has a webapp using Linux apache mysql php. Let's say the first step I'll start writing dart script, convert it to javascript. My question is: is it possible to replace the PHP SERVER SIDE code with dart (convert to js) while still using LAMP ? (some programs using php, some using js from dart)

2 Answers 2

1

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".

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks MarioP. My company's web app is very big; It is impossible to replace the whole thing at once. So are you saying that Dart Server and apache+php can co exist ?
@SuheimiAntonius They can coexist, but they are different servers and need to listen to different IPs or different ports, like every other machine where multiple servers are running.
1

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.