# Client Server Communication Discussion
## Group 1
### What is the Server in this case?
The Rails backend is the Server in this case.
...
### What is the client?
The react app rendering the returning information from the rails backend
...
### How will we get data from our backend to our frontend?
Fetch calls/GET HTTP requests will be built in our front end to make requests to our rails backend. Both will convert requests and responses to JSON.
...
### Take a look at our routes and controller, what routes and actions are serving up JSON that is relevant to our application?
index, show, and create routes
...
### What hook will we need to invoke the request when our app component mounts?
useEffect
...
## Group 2
### What is the Server in this case?
The rails backend is operating as our server.
...
### What is the client?
The client is our react-app.
...
### How will we get data from our backend to our frontend?
We will get data from our backend to our frontend through a "Fetch" in the front-end react-app.
...
### Take a look at our routes and controller, what routes and actions are serving up JSON that is relevant to our application?
The "/items" route and #index actions are serving up JSON that is relevant to the application (at this point)
...
### What hook will we need to invoke the request when our app component mounts?
...
## Group 3
### What is the Server in this case?
flatiron_store -- Rails backend app
...
### What is the client?
React frontend in a browser
...
### How will we get data from our backend to our frontend?
Make JSON requests to our Rails server
...
### Take a look at our routes and controller, what routes and actions are serving up JSON that is relevant to our application?
Rails can render all the items (#index), specific items (#show), create new items (#create), update items (#update), remove items (#detroy)
...
### What hook will we need to invoke the request when our app component mounts?
useEffect in App.js to fetch
...
## Group 4
### What is the Server in this case?
The server is a Rails backend. (flatiron_store)
...
### What is the client?
The client is the React front-end (front_end_store)
...
### How will we get data from our backend to our frontend?
We route via Rails (our Route.rb file)
...
### Take a look at our routes and controller, what routes and actions are serving up JSON that is relevant to our application?
...
### What hook will we need to invoke the request when our app component mounts?
useEffect
## Group 5
### What is the Server in this case?
Flatiron_Store directory
...
### What is the client?
frontend store
...
### How will we get data from our backend to our frontend?
Making requests to localhost:3001
...
### Take a look at our routes and controller, what routes and actions are serving up JSON that is relevant to our application?
The /items route to send a POST request to the backend (CREATE)
and the default route / to retrieve a list of items (READ)
...
### What hook will we need to invoke the request when our app component mounts?
useEffect
...
# Synthesis