I'm in the planning phase of making a website for calculating various mathematical problems, as a school/sparetime project with a couple of friends. We're gonna start off with implementing a "right angled triangle calculator", and then gradually implement more mathematical stuff.

So, basically, we want some boxes that you can fill with the variables you know, and as you type in your numbers, a program will decide which equations it can use for the specified variables of the triangle, then it will calculate the answers for all the unknown variables and fill out the empty boxes with the calculated answers.

All this, we wanna do in real time.

We know, that we are gonna want to use AJAX and jQuery, but we can't decide wether to use PHP or ROR..?

We want basically everything to be executed in real time, so that we only have to reload the webpage when the user navigates to another "part" of the site.

So my question to you guys is, What would be the smartest to use? PHP or ROR?

I have read a lot about the matter, and alot of comparisons of the two, when it comes to responsive design, but there's alot of mixed feelings, as far as i can tell.

I would love your guys' opinion.

Pros and cons of the two?

  • Have you considered Python? I'm mentioning that cause I believe it has a lot of mathematics oriented modules. (Plus, I really really despise PHP). I have no idea how well Python supports AJAX, having only used it for basic REST web backends. – user949300 Dec 2 '14 at 22:50
  • 1
    You can do all of this in pure JavaScript, and it'll be much easier that way. You really don't need to run any code on a server for this, and can instead just serve static pages that are populated by JS (see also the concept of Single Page Apps). Tip: If you publish your code on GitHub, you can use GitHub Pages to serve static files, for free :) – amon Dec 2 '14 at 22:50
  • recommended reading: Gorilla vs Shark -- "if you... don’t want your question to get instantly closed... — try to keep Gorilla vs. Shark in mind." – gnat Dec 3 '14 at 6:39
  • see also: What is the problem with “Pros and Cons”? – gnat Dec 3 '14 at 6:40

Generally, you use Web frameworks (or languages, in PHP's case) to serve and store persistent data.

What do I mean by that?

Well, Twitter is the go-to example. When you make a Tweet, that gets stored in a database somewhere. Then, when you look at the tweet again, it's loaded from the Database and sent to you.

In your case, there is no need for persistent data. Your users are going to perform mathematics and leave the website. They will not look at the calculations other users performed.

As such, your best bet is a static application made in pure JavaScript.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.