Architecture - SCCapstone/Seating-App GitHub Wiki
Question Navigation
1
Is it a SPA or traditional? or mix? Explain
2
List of URLs you will implement
3
Rest API
4
The Views of your app
5
The Database Schema
6
Common Queries
Question 1
Is it a SPA or traditional? or mix? Explain.
Our web application will be a SPA (single page application) because we are using Angular. Angular loads a single index.html
file that is then changed using an app-routing
module. The app-routing
module uses type script to change the 'appearance' or view that the user sees.
The app-routing
module is also able to add directed routes. So while we are serving a SPA (single page application), you can still enter a different URL to 'navigate' around the application.
For instance, seating-app.com/
would be our landing page that displays three components. These three components would be our About Component, Login Component, and Registration Component. When a user logs in clicking the Login
button from the Login Component, the route will be changed to seating-app.com/dashboard=id
which will completely change the view through type script. The same index.html
document is still the only thing being served, thus being an SPA, but the routing module is able to create URL paths by adjusting components or views displayed.
Question 2
List of URLs you will implement. Explain any search arguments in English. Link (actual hyperlink) each URL to the page it shows in your Detailed Design milestone.
Landing Page URL:
seating-app.com/
Live View URL:
seating-app.com/dashboard=id/liveview
Reservations URL:
seating-app.com/dashboard=id/reservations
Store Manager URL:
seating-app.com/dashboard=id/manager
Floor Plan Editor URL:
seating-app.com/dashboard=id/manager/floorplan
Account Setting Page URL:
seating-app.com/dashboard=id/settings
Question 3
If implementing a REST API, document it. List all methods, parameters, and give English description of what they do.
Angular uses a built in dependency called HttpClient
which offers a simplified client HTTP API for Angular applications that rests on the XMLHttpRequest interface exposed by browsers. Additional benefits of HttpClient include testability features, typed request and response objects, request and response interception, Observable apis, and streamlined error handling.
User Methods:
addUser(id: int, firstName: string, lastName: string, email: string, password: string)
Creates a new user with the following information
deleteUser(email: string, password: string)
Deletes a user with the following information
updateUser(id: int, *additional information*)
Will allow users to add additional information to their user profile that could help us with some functional utilities, or change basic information
getUser(id: int)
Will fetch user information based on the user's id
Store Methods:
addStore(storeID: int, storeName: string, storeOwner: int)
Creates a new store with the following information
deleteStore(storeID: int, storeOwner:int)
Deletes a store, only if the store owner is trying to delete it
updateStore(storeID: int, *additional information*)
Will allow the owner to add additional information about a store, or change existing information about a store
getStore(storeID: int)
Gets a store by ID and returns its information
Reservation Methods
addReservation(resID: int, storeID: int, resID: string, resTime: string, resSize: int, resPhoneNum: string)
Creates a new reservation with the following information
deleteReservation(resID: int)
Deletes a reservation using the reservation number.
updateReservation(resID: int, *additional information*)
Will allow users to update reservation information, such as time or size.
getReservation(resID: int)
gets a reservation by ID and return its information
Host Methods:
addHost(hostID: int, storeID: int, hostFirstName: string, hostLastName: string, hostEmail: string, hostPassword: string)
Creates a new host with the above information
deleteHost(hostID: int)
Deletes a host using the host number
updateHost(hostID: int, *additional information*)
Will allow users to update host information, such as name or email
getHost(hostID: int)
Gets and returns host information using the hostID
Server Methods:
addServer(serverID: int, storeID: int, serverFirstName: string, serverLastName: string, serverEmail: string, serverPassword: string)
Creates a new server with all the attributes listed above
deleteServer(serverID: int)
Removes a previously created server based on their ID number
updateServer(serverID: int, *additional information)
Will allow users to update server information, such as name or email
getServer(serverID: int)
Gets and returns server information using the serverID
Table Methods:
addTable(tableID: int, storeID: int, tableSize: int)
Creates a new table with all of the above attributes
deleteTable(tableID: int)
Removes a table based on its ID number
updateTable(tableID: int, *additional information*)
Allows the user to add or update information to the table
getTable(tableID: int)
Gets and returns information using the tableID
Question 4
The Views of your app. Typically a webpage includes multitple views. For example, this webpage has a Header, Menu, and Content views (at least).
Landing Page URL: seating-app.com/
Components:
- About Component
- Login Component
- Registration Component
Live View URL: seating-app.com/dashboard=id/liveview
Components:
- Sidenav Component
- Main View Component (Live View of Floor Plan)
- Guest Component
- Server Component (Not in design*)
Reservations URL: seating-app.com/dashboard=id/reservations
Components:
- Sidenav Component
- Reservation Header Component
- Reservation Main Component
Store Manager URL: seating-app.com/dashboard=id/manager
Components:
- Sidenav Component
- Manager Main Component
- Add Store Component
- Restaurant Tracker Component
- Add Host Component
- Add Server Component
Floor Plan Editor URL: seating-app.com/dashboard=id/manager/floorplan
Components:
- Sidenav Component
- Floor Plan Header Component
- Floor Plan Main Component
Account Setting Page URL: seating-app.com/dashboard=id/settings
Components:
- Sidenav Component
- Profile Settings Component
- General Settings Component
Question 5
The Database schema: set of tables/documents with list of attributes and their types. Describe each table and attribute in English.
Question 6
List of common queries you expect will be needed. Do any of then need to join tables?
- Show store information from user id. This will require joining the store and user relations.
- List all reservations at a certain restaurant within a certain date or time.
- Show all servers at a restaurant.
- Sort restaurants by number of reservations over time. This will require joining the store and reservation relations.
- View tables at a restaurant that are not currently occupied.
- view all tables at a restaurant that can seat over x number of guests.