thomasp85 / fiery

A flexible and lightweight web server
https://fiery.data-imaginist.com
Other
244 stars 12 forks source link

Example linking fiery and vue.js (or react)? #36

Open vnijs opened 6 years ago

vnijs commented 6 years ago

I was looking at some of the tutorials at https://vuejs.org and was very interested to see that vue.js is reactive. Reactivity is, of course, one of Shiny's killer features. I started looking around to see if anyone had tried to link vue.js and R (or fiery).

@hrbrmstr's fiery example provides a nice illustration of using fiery but it would be great to see how to connect that to a basic user front-end, e.g., using vue.js. @timelyportfolio has some interesting work on embedding vue.js in R (https://github.com/timelyportfolio/vueR) but I haven't seen anything that uses R server-side and vue.js on the client side.

If anyone has an example of using R / fiery with vue.js I'd be very interested to see it.

In general, I think some (simple) examples using fiery to show how to generate plots and tables in a browser would make this very promising tool much more accessible.

dpastoor commented 6 years ago

While explicit R examples are always helpful to minimize context switching, using vue/react/jquery/vanilla JS with fiery will be much the same as interacting with any RESTful API.

Realistically, there will be tons more examples of using with any API.

For example, given this tutorial: https://developer.okta.com/blog/2018/02/15/build-crud-app-vuejs-node

The fiery part would replace the node backend API server https://developer.okta.com/blog/2018/02/15/build-crud-app-vuejs-node#add-a-backend-rest-api-server

The frontend code would literally remain completely unchanged whether using fiery or node or any other backend service.

I know this isn't an answer directly, but at least it should be helpful to know that there are a ton of resources that can still push you along to minimize the "uncharted" territory.

vnijs commented 6 years ago

Thanks @dpastoor.