简体   繁体   English

编程语言作为 web 页面的后端 [暂停]

[英]Programming language as back end for web page [on hold]

I have a Life Science background without any computer science background but since I am very passionate about the latter I decided to combine both.我有生命科学背景,没有任何计算机科学背景,但由于我对后者充满热情,我决定将两者结合起来。 Nevertheless, sometimes its not easy to find an answer for something.然而,有时要为某事找到答案并不容易。 Therefore my question is:因此我的问题是:

I want to write a program, that needs both strong data visualization and also computing speed.我想写一个程序,既需要强大的数据可视化,也需要计算速度。 I have been working in the code, in R, for some time and its basically done.我已经在代码中工作了一段时间,在 R 中,它基本上完成了。 So, for the visualization is amazing but for performance, not so much, since I use some ML (not deep learning, for now) and some calculations take several minutes.所以,对于可视化来说是惊人的,但对于性能来说,不是那么多,因为我使用了一些 ML(目前不是深度学习)并且一些计算需要几分钟。 For my next project I want to create a web page in which I can enter the input values and get a specific output in form of several graphs + the result of ML.对于我的下一个项目,我想创建一个 web 页面,我可以在其中输入输入值并以多个图表的形式获取特定的 output + ML 的结果。 For that reason I am thinking whether to continue using R for back end and improve computing speed with Rcpp and openMP (besides the inherent R tricks for computing speed improvements) or should I switch to another language like python / Java? For that reason I am thinking whether to continue using R for back end and improve computing speed with Rcpp and openMP (besides the inherent R tricks for computing speed improvements) or should I switch to another language like python / Java? If there is a better way to deal with my project I would gladly hear the advice.如果有更好的方法来处理我的项目,我很乐意听取建议。

I know that I may be missing something of what is the best way to do web design, sorry about that.我知道我可能遗漏了做 web 设计的最佳方法,对此我深表歉意。

Kind regards亲切的问候

As for computing speed I don't have any advice.至于计算速度,我没有任何建议。 I would need more insight into what exactly you're doing (the model you're using, and the size of the training data).我需要更深入地了解您到底在做什么(您正在使用的 model 以及训练数据的大小)。

Regarding your next project, if you have no or limited previous background in web apps and have solely lived in R, I would recommend RShiny.关于您的下一个项目,如果您之前没有 web 应用程序的背景或仅在 R 生活过,我会推荐 RShiny。 It's an easy to use tool which allows you to build interactive web apps using R.这是一个易于使用的工具,允许您使用 R 构建交互式 web 应用程序。 This seems like a good use case for input values which result in several graphs and model output.这似乎是一个很好的输入值用例,它会产生几个图表和 model output。

Here's the link.这是链接。 https://shiny.rstudio.com/ https://shiny.rstudio.com/

You want to use a combination of several things.你想使用几个东西的组合。 Here's how I would do it...这就是我将如何做到的......

  • Make your graphs in R.在 R 中制作图表。
  • Make a HTML/JS front-end.制作 HTML/JS 前端。 If you only need this to work in a local browser you can simply use JS and HTML with ActiveX.如果您只需要它在本地浏览器中工作,您可以简单地将 JS 和 HTML 与 ActiveX 一起使用。
  • If you need it to work from remote computers you want to install Apache and PHP as well (to setup a server environment).如果您需要它在远程计算机上工作,您还想安装 Apache 和 PHP (以设置服务器环境)。 This will also enable you to use If you use something like AdminLTE.如果您使用像 AdminLTE 这样的东西,这也将使您能够使用。 You may even find it's graphing capabilities useful.您甚至可能会发现它的绘图功能很有用。
  • Make some scripts that call your R programs and export them to image files.制作一些脚本来调用您的 R 程序并将它们导出为图像文件。 Call these scripts from your webpage.从您的网页调用这些脚本。
  • Use AJAX to update the DOM and render the images that were generated by the step above.使用 AJAX 更新 DOM 并渲染上述步骤生成的图像。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM