A common scenario for modern Web applications is to build REST API services that act as data services for front end applications. This maybe a Web based application running entirely on the front end using a client side framework like AngularJs, Aurelia, Ember or other framework. It might also be a device based application running on a mobile device in iOS, Android or Windows, or even a desktop application that simply loads its data over the Web.
There are two ways to create a new REST service:
- Create a new project
- Create a new Process Class and add to an existing project
To expand on the previous examples, we'll choose the latter approach and extend the existing project by creating a new Process class and use the business objects we created in MVC and Business Object Tutorial. But you can also use a new project in the same way as outlined in Getting Started Tutorial. Just use the New Project Wizard instead of the New Process Wizard we use in this tutorial and choose REST API Service Process Class in the last step of the Wizard.
You can find the sample code for the completed projects at the following GIT BitBucket repository:
You can clone the repository, or use Download Button to grab a Zip file of the completed project folder.
- Step 1 - Create a new REST Service
- Step 2 - Check out the REST Service
- Step 3 - Returning a JSON Customer List from the REST Service
- Step 4 - Accepting JSON parameters
- Step 5 - Show and Update a Customer
- Step 6 - Using FoxPro to access the JSON HTTP API
- Step 7 - Adding CORS support
- Step 8 - Accessing the REST API with jQuery
Comment or report problem with topic