By Ameur Baccoucha
Oracle Cloud Digital Consultant
The REST CRUD array is a repetitive need in application development.
In this Blog we will show how to easily develop a REST CRUD application in few minutes using VBCS. Let’s get started !
Creating the CRUD sample
1- Connect to your VBCS instance and Click New to create a new project.
2- In the Pop-up window enter the Application Name (the Application ID is generated automatically but it can be changed), a Description, let the Application Template as Empty Application and then Click Finish.
3- In the welcome page click Service Connections.
4- Click +Service Connection then Define by Endpoint.
5- In the Pop-up enter your endpoint ( for our sample it is customers collection).
6- Click Test, Send, Copy to Response Body and the Create button.
7- Click Endpoints and the +Endpoint to add the GET, POST, PUT and DELETE methods.
8- Click Web Application icon from the menu. Then click +Web Application.
9- Give it and Id.
10- From the Components search for Table, drag and drop it in the application page.
11- Now click Add Data in the right of the screen.
12- Click on the endpoint from which the data will be displayed in the table and the click Next.
13- From the list in the left select the row to display and then choose the Primary Key. Click Next.
14- Click Finish.
15- The table contains the data now. Click Add Create Page at the left of the screen.
16- Select the Endpoint and click Next.
17- Select the fields you want to add in the form page and select Finish.
18- A Create button appears above the table. (if you want to see the form page click flows+ at the left of the screen then main+ then main-create-post-…)
19- Now click the main-start tab to return to the table page.
20- Click in the table and at the left of the screen click Add Edit Page.
21- Select the Endpoint and click Next.
22- Select the fields you want to add in the form page and select Finish.
23- An Edit button appears above the table. (if you want to see the form page click flows+ at the left of the screen then main+ then main-edit-put-…). The form will contain all the information to edit.
24- Go to the main-start tab again, click the table and Add Delete Action.
25- Select the Endpoint and click Finish.
26- A Delete button appears above the table.
27- Here is the final display.
28- Click the run icon at the top to test your application.
N.B: The Edit and Delete button are disabled just click a row and they will be enabled for that row.