Answer the question
In order to leave comments, you need to log in
How to make friends vue.js and websockets?
What are ready-made solutions for implementing vue and node interaction via websockets? Whether it is necessary to limit interaction only to websockets at all? As I understand it, this significantly reduces the cost of constant reconnections. Doesn't this get in the way of the REST concept?
Answer the question
In order to leave comments, you need to log in
Already resolved the issue?
1) The first question has already been answered
2) It's up to you to decide if you should limit yourself to them or use AJAX + WS. One-time rare requests are best done through AJAX. If the client opens one page, and constantly does some manipulations with sending to the server, then you can give preference to web sockets.
4) REST, as far as I know, is built on HTTP, if we talk about the RESTful ideology, then read about the basic principles, there seem to be six of them, if you can follow all of them, then it won’t really matter which protocol is based on.
3) Yes, this will reduce the cost of reconnecting. The main feature is that the server itself can initiate events, without a request from the client, this is the main advantage. It is also worth considering that the language constructs and libraries for working with AJAX and WS differ both in terms of convenience and quantity, so you should also look at the convenience of development.
https://www.google.com.ua/search?q=vuejs+websockets
0. https://github.com/icebob/vue-websocket
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question