CSC510 Software Engineering HW1
- Steps to Run:
- Clone the repository:
git clone https://github.ncsu.edu/ssrivas8/HW1
- Cd to HW1 directory:
cd HW1
- Do
npm install
inside the HW1 folder to install all the dependencies specified in the package.json. - To run the scripts type:
node <scriptname>.js
, wherescriptname
is the name of the script to be run.
- Clone the repository:
**Note: For the scripts, you need to enter your github token, your github username (from public GitHub) and your reponame in the token
, owner
and reponame
variables inside all the scripts. For my testing, I have used the following repo on my public GitHub: se_hw1_sample
-
Code:
-
Concepts:
-
Additional concerns related to REST APIs:
- Ambiguous usage and different interpretations of the Response Codes. For example, on succesfully creating a record, some APIs might return Code
200 OK
while others might return Code201 Created
. - They are difficult to debug: There are a number of things that could go wrong at nultiple places, for example - the end point, the route mapping, the request mapping, etc.
- Difficult to maintain: It is difficult to maintain a large codebase for a REST API as it would involve a lot of refactoring moreover, it could be tricky to remove old endpoints as some users might still be using it.
- They are closely coupled with HTTP (usually)
- Ambiguous usage and different interpretations of the Response Codes. For example, on succesfully creating a record, some APIs might return Code
-
Benefits and disadvantages of using a RESTful architecture vs. a graph query language:
-
Benefits
- REST offers hypermedia controls, GraphQL does not.
- REST provides easy chaching unlike GraphQL
-
Disadvantages
- GraphQL puts client performance first
- It is lightweight
- It reduces network overhead as it doesn't require multiple calls to fetch the data.
-
Link to GitHub Pages webpage: About Me