summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke "Jared" Bennett <lbennett@gitlab.com>2017-05-09 15:20:39 +0000
committerLuke "Jared" Bennett <lbennett@gitlab.com>2017-05-09 15:20:39 +0000
commit7b4c8a4425250f5d91cde1d39a93cce25bc448fc (patch)
treeed408e5fc5888af370e1cc87ebc779810b364000
parenta3607aa43971d03b718e070db271104553eca549 (diff)
downloadgitlab-ce-make-the-vue-services-docs-more-generic.tar.gz
Made the Vue services docs more generic to not restrict them to ajax servicesmake-the-vue-services-docs-more-generic
-rw-r--r--doc/development/fe_guide/vue.md14
1 files changed, 7 insertions, 7 deletions
diff --git a/doc/development/fe_guide/vue.md b/doc/development/fe_guide/vue.md
index a984bb6c94c..8723c3f2da5 100644
--- a/doc/development/fe_guide/vue.md
+++ b/doc/development/fe_guide/vue.md
@@ -28,13 +28,13 @@ As always, the Frontend Architectural Experts are available to help with any Vue
All new features built with Vue.js must follow a [Flux architecture][flux].
The main goal we are trying to achieve is to have only one data flow and only one data entry.
-In order to achieve this goal, each Vue bundle needs a Store - where we keep all the data -,
-a Service - that we use to communicate with the server - and a main Vue component.
+In order to achieve this goal, each Vue bundle needs a store object to store all the data,
+a main Vue component and any number of services for the functionality required.
Think of the Main Vue Component as the entry point of your application. This is the only smart
component that should exist in each Vue feature.
This component is responsible for:
-1. Calling the Service to get data from the server
+1. Calling the Service to get and manipulate data from the server or any other source
1. Calling the Store to store the data received
1. Mounting all the other components
@@ -99,11 +99,11 @@ itself, please read this guide: [State Management][state-management]
### A folder for the Service
-The Service is a class used only to communicate with the server.
-It does not store or manipulate any data. It is not aware of the store or the components.
-We use [vue-resource][vue-resource-repo] to communicate with the server.
+Often, the Service is a class used to communicate with the server.
+It does not store any data. It is not aware of the store or the components.
+In this case, we use [vue-resource][vue-resource-repo] to communicate with the server.
-Vue Resource should only be imported in the service file.
+Vue Resource should only be imported in a service file, not the store or component.
```javascript
import Vue from 'vue';