I have been given the task to create an online (client-side) implementation of a statistical method. The method is relatively easily programmed in R/SPLUS for example, but I understand to do this within a webpage and client side I will end up having to program some statistical concepts myself which is fine. However I am looking for advice on what the most practical language is for dealing with the following task within a webpage:
-
Accepting input from a user
-
Taking this input, and performing various reasonably high level mathematical calculations (such as matrix algebra)
-
Returning the output to the user
With my very limited knowledge, a Java applet seems the most obvious option. However, my question is, are there any other ways of achieving this goal without an applet (i.e. would javascript suffice) and what would be your advice on the most robust/user-friendly/appropriate language to do this? The main aim is accessibility to the widest possible audience.
I would recommend first looking into JavaScript as it is supported on all major browsers and doesn’t require additional plugins to be installed, so it seems to be the ideal candidate for your “widest possible audience” requirement.
As for supporting high level mathematical calculations, you will likely want to find a good library to use. I do not know all your needs, but a simple search for JavaScript “Matrix Algebra” Library came up with this as the first result, which looks promising.
If you do not find a library that meets all your needs, you could build the mathematical functions you’ll need yourself. That may sound foreboding, but keep in mind that all high-level functions are built off of lower-level functions, and since JavaScript is a functional language, it is well-suited for building that type of functionality. However, I don’t know your programming knowledge, your commitment-level to the project, or the complexity of the functions you will need. Thus, if that proves too cumbersome a task and Java handles everything you need well, then an applet is a good second option.