This tutorial explores how to create a small application to perform these four basic operations for customers.The prerequisites are:
- PrestaShop 1.6 installed on a server with
mod_rewriteenabled (Apache only).
- A local xAMP server with PHP5 enabled.
About CRUD & REST
The PrestaShop web service uses the REST architecture in order to be available on as many platforms as possible, since the HTTP protocol and XML files are understood by most platforms, if not all.
CRUD is an acronym that stands for "Create, Read, Update, and Delete". These are the four basic operations for managing data in an application.
REST defines roughly a style of software architecture, which promotes the use of HTTP methods when building web application, instead of custom methods or protocols such as SOAP or WSDL. It defines several rules, including one that is similar to CRUD, which is described below.
HTTP has several methods that can perform processing on data as defined in the REST architecture, among which are 4 main methods. See this page: http://en.wikipedia.org/wiki/HTTP#Request_methods
The table below offers a comparison with CRUD and SQL:
HTTP / REST
Chapters in this tutorial
Chapters 1, 2 and 3 are mandatory, as they contain the fundamental knowledge for using the web service.
The next chapters, explores ways to interact with the web service using each of the REST operations, in order to give you the tools to make a full CRUD application.
If you only want to retrieve data, for example when developing a web application to notify you of orders, you might only be interested in Chapter 4.
If you prefer to develop a more complete application, chapters 4 to 7 will interest you.
Chapters 9 and 10 give you more detail on specific content management.
Finally, a cheat-sheet will give you quick hints and reminders.
Here are the chapters to in this tutorial: