I
I
Ivan Ivanoff2021-04-04 03:18:53
Vue.js
Ivan Ivanoff, 2021-04-04 03:18:53

SPA on VUE.js + API + third-party scripts + a few more questions how to start, so as not to redo it later?

Hello dear VUE.js experts!

I am a programmer, but a backender, and these fronts are a dark forest for me, in which I want to somehow understand and not mess up.

The essence of the task: It is
required to write a single-page progressive web application on Vue.
Vue is chosen as the easiest framework to learn.

The application will communicate with the server by sending requests to the API and receiving responses. Some of the received data must be stored in the application while it is running. Plus, I want the application to perform certain actions depending on the server's response. Would it be appropriate to create a separate JS script containing methods for working with the API, processing responses and passing data to the calling script?That is, instead of calling through axios in each specific template, I want to make calls to a separate script that would centrally send data to the right place, receive a response, do something, and give the data to the vue template. Does this approach contradict the Vue concept?

Also, I need to store some user data on the client side. Some of this data should also be available offline. Where is the best place to store them?

Thanks in advance for your replies!

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question