Jump to content

Which Additional Languages to Learn

I want to create a web based "calculator" that is able to take in multiple lines of user input (either manual entry or uploaded from Excel), write to files on a server, perform the calculations, produce a report, and create a file with the data in it for later use or editing. I have already created the first proof of concept using HTML, CSS, and JavaScript. The next step is to create a file that the calculator can read. I am fairly certain that I will need to learn a server based language in order to accomplish this, my question is which one? Do I use SQL, PHP, both, something else? What do you all recommend?

 

Additional information

 

I have used and updated an Excel based calculator for many years to calculate the necessary costs and savings information. My company recently began looking into databases for information management (as the old way is obsolete) and I thought that it would be easier for the user if the calculator that they used also added to the database with a click of a button. Not to mention that the Excel calculator is slightly under 8MB in size before data is entered into it. Nobody has asked me to do this, but I decided to take the initiative.

Legends never die.

Link to comment
Share on other sites

Link to post
Share on other sites

19 minutes ago, AndromedusVega said:

Do I use SQL, PHP, both, something else? What do you all recommend?

Pick one, play with it, git guud, do stuff, pick another one, play with it, git guud, do stuff, pick another one...

 
Link to comment
Share on other sites

Link to post
Share on other sites

2 hours ago, Erik Sieghart said:

SQL is good, but some people like Mongo instead.

Either is a fine option.

Mongo? I never even heard of that one. Thanks

Legends never die.

Link to comment
Share on other sites

Link to post
Share on other sites

Btw JavaScript runs client side not server side, I would suggest php.

 

Maybe use java script to turn the input into json then process that with php.

 

seeing as you have it working in JS why do feel the need to move the processing server side?

 

you can keep it client side then just feed it data from the database in the form of json, this will keep processing client side and lower overhead of the server.

                     ¸„»°'´¸„»°'´ Vorticalbox `'°«„¸`'°«„¸
`'°«„¸¸„»°'´¸„»°'´`'°«„¸Scientia Potentia est  ¸„»°'´`'°«„¸`'°«„¸¸„»°'´

Link to comment
Share on other sites

Link to post
Share on other sites

19 hours ago, AndromedusVega said:

I want to create a web based "calculator" that is able to take in multiple lines of user input (either manual entry or uploaded from Excel), write to files on a server, perform the calculations, produce a report, and create a file with the data in it for later use or editing. I have already created the first proof of concept using HTML, CSS, and JavaScript. The next step is to create a file that the calculator can read. I am fairly certain that I will need to learn a server based language in order to accomplish this, my question is which one? Do I use SQL, PHP, both, something else? What do you all recommend?

Why do you want to do the math server-side? Let's just put ourselves in a theoretical scenario, here are some givens, for our scenario:

  • Your website becomes very popular as an online calculator
  • Your website will contain things like differentiation, factoring (obviously because of the differentiation), combinations/permutations... Higher math functions
  • Your website will contain graphing abilities
  • Your website will contain unit conversions
  • This website is marketed as being great for college students and as such, will see extremely high loads

The above givens are ignoring the fact that you must do things like:

  • Validate user input
  • Check user credentials
  • Log user interactions (The United States government is becoming a pain lately)
  • Parse whatever input the user enters as calculations
  • All of the other basic stuff required to serve a webpage to many people at once.

These things all combine to actually make a pretty computationally intensive (relatively speaking) task. If you were to do it all server side and have the clients do nothing but display the webpage then you would end up needing far more compute power than if you were to have the clients side do all of the parsing and some of the more basic calculations. It will also appear faster to the end user (during heavy loads anyway). 

I would recommend that these things be done client side:

  • Some input validation
  • All of the math functions
  • Parsing user input

Since you won't be saving user interactions for use later (like the ability to save a half solved equation or whatever), then it's not necessary to be sending that stuff to the server. Do it all client side. You can think about it like a distributed computing problem and then the end result will be much better than if you thought of it as a static webpage.

ENCRYPTION IS NOT A CRIME

Link to comment
Share on other sites

Link to post
Share on other sites

12 hours ago, vorticalbox said:

Btw JavaScript runs client side not server side, I would suggest php.

 

Maybe use java script to turn the input into json then process that with php.

 

seeing as you have it working in JS why do feel the need to move the processing server side?

 

you can keep it client side then just feed it data from the database in the form of json, this will keep processing client side and lower overhead of the server.

 

The processing was never intended to go server side, I am using JavaScript to run the computations. The calculator will only need to access the server for saving the data, loading the data, and accessing files that will contain information used in some of the calculations. I prefer not to hard code in certain items because I will need for the calculator to be flexible. It will take existing conditions and calculate the current costs then take the recommended conditions and calculate the costs and savings. In order to do that, it will need to be able to keep up with the ever-changing market (different products replacing other products with different efficiencies, wattages, outputs, etc...). It will be easier for me to update a file than to update codes and arrays. Does that make sense?

 

2 hours ago, straight_stewie said:

Why do you want to do the math server-side? Let's just put ourselves in a theoretical scenario, here are some givens, for our scenario:

  • Your website becomes very popular as an online calculator
  • Your website will contain things like differentiation, factoring (obviously because of the differentiation), combinations/permutations... Higher math functions
  • Your website will contain graphing abilities
  • Your website will contain unit conversions
  • This website is marketed as being great for college students and as such, will see extremely high loads

The above givens are ignoring the fact that you must do things like:

  • Validate user input
  • Check user credentials
  • Log user interactions (The United States government is becoming a pain lately)
  • Parse whatever input the user enters as calculations
  • All of the other basic stuff required to serve a webpage to many people at once.

These things all combine to actually make a pretty computationally intensive (relatively speaking) task. If you were to do it all server side and have the clients do nothing but display the webpage then you would end up needing far more compute power than if you were to have the clients side do all of the parsing and some of the more basic calculations. It will also appear faster to the end user (during heavy loads anyway). 

I would recommend that these things be done client side:

  • Some input validation
  • All of the math functions
  • Parsing user input

Since you won't be saving user interactions for use later (like the ability to save a half solved equation or whatever), then it's not necessary to be sending that stuff to the server. Do it all client side. You can think about it like a distributed computing problem and then the end result will be much better than if you thought of it as a static webpage.

As noted in my response above, I never intended for the calculations to take place on the server (I think that I need to work on my phrasing). However, there will be a lot of talking between the server and the calculator. Your scenario did bring up some good points, as my company continues to grow, the calculator will be used more and more. I need to plan accordingly. Unfortunately, I cannot ignore the server. In order to interact with other projects that my company is working on, the calculator will have to save data to, load data from, and read data from the server/database... that will slow things down. You have given me a lot of food for thought.

Legends never die.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×