We have a hard to maintains PHP application with a database structur in mySQL less than perfect and with a slow performance in some parts of the application.
We consider to build REST Web Services on an application server for all database calls (SELECT, INSERT, UPDATE) at the first step. Than we will optimize the table structures and the database calls without negative effect for the application.
And in a last step we will refactoring the PHP application itself.
The php application is a information system for approximate 5 to 10 simultaneously users with round 15 tables.
Is this a good approach? Where are the pitfalls by a REST solution?
Thanks in advance!
Pongo
You should take care when mapping relational databases and RESTful resources directly. There is a mismatch between them. For example, there is no direct mapping between the HTTP methods and CRUD operations, although is possible to channel CRUD operations through them.
This is the only gotcha I could think of. Refactoring from the interface (in this case, a service) is a good practice.