Create CRUD Web Application on Following REST API - Lab Task 4


Background

Modern web applications are written using Service Oriented Architecture (SOA). In SOA, the application backend is exposed as a set of services or APIs that can be called from all types of clients e.g. web, mobile, desktop i.e. independent of any programming language and platform the app is built in. These services/APIs send and receive data in standard formats e.g. JSON and XML. 

There are following reasons and benefits of using standard format and SOA:
  1. All modern programming languages have parsers and generators for JSON and XML, that means, no matter what programming language you are writing your software in, you can generate and consume XML and JSON data using it. So, when you expose data in standard format, you make it easy for others to process it.
  2. It decouples the client and server side completely, which help to better develop and maintain both ends. 
  3. The JSON/XML data is independed of the presentation logic. That means, a web application can fetch and display data using its own components e.g. using div, table, h1, img tages etc. An Android application can fetch and display data on screen using its SDK components e.g. DataTable, Grid or other components.
  4. Use of standard format makes the integration among hetrogenous systems, easy. Assume you need to import your customers and products data in ERP into your ecommerce store i.e. a web application. It can be done very easily if both systems expose/take data in standard format. In same way, you can integrate your online Shopify store with your Point of Sale (POS) system to keep the stock information updated and in-sync, if the POS and Shopify expose its data in standard format.
One of the course objective is to help to learn how to make and consume REST API. You have already seen an example of consuming REST API in theory lecture and what REST API is, this lab tasks objective is you do it yourself.

Lab Task Detail

You are not supposed to create the API but consume an existing API. Please visit https://jsonplaceholder.typicode.com/ and their guide page for information about different entities, their attributes and URLs to use for calls. 

Make a web app using HTML, CSS, Bootstrap, and JQuery with CRUD operations on 'posts' and limited operations on 'comments' endpoint. For example, you applications shall have following features:
  1. List posts
  2. View post detail
  3. Add new post
  4. Update post
  5. Delete post
  6. Show comments on post when the post detail page
  7. Let user post new comment on post detail page
  8. (This point is optional) Make CRUD for users as its a composite entity i.e. user object has address object that has its own attributes. User also has albums and each album has photos.... there is great learning stuff. If you are really keen learner. Make a complete application that consume all endpoints exposed publically.

Comments