5

I've designed my database diagram(11 entites) for my prototype application. I need to have an REST API on top of this that will allow me to build a prototype android tablet application that talks to it.

Considering this is only for prototype purposes. What would be the quickest way to get a API up and running that would allow me to get, put, delete etc..

Security at this point isn't an issue so even if all add edit delete were open that would be fine.

My initial idea is to build this with PHP and MySQL maybe using the Yii framework to help but I feel there might be something that might be faster for my purpose.

Any thoughts or recommendations or advice?

Derek Organ
  • 8,323
  • 17
  • 56
  • 75
  • Did you have a look at the Recess framework yet? http://www.recessframework.org/ – jprofitt Nov 02 '11 at 15:31
  • Possible duplicate of [How to use PATCH for updating a simple database field?](http://stackoverflow.com/questions/41995727/how-to-use-patch-for-updating-a-simple-database-field) – mevdschee Feb 07 '17 at 18:27

3 Answers3

6

It is worth looking into API rapid-prototyping tools like Apify (tutorial) since you're starting from scratch. If you're planning to have both an API and a Web site accessing the same data, consider using one framework for both as it helps prevent duplicating logic. CakePHP and Yii are good examples of multipurpose frameworks that are suited for this type of development.

Justin ᚅᚔᚈᚄᚒᚔ
  • 15,081
  • 7
  • 52
  • 64
2

If Python is an option, it is trivial to use a light-weight http framework to build a REST API that accesses a database.

Here's a snippet for a fully functioning http server using the itty framework: https://github.com/toastdriven/itty/blob/master/examples/web_service.py and https://github.com/toastdriven/itty/blob/master/examples/posting_data.py

Raymond Hettinger
  • 216,523
  • 63
  • 388
  • 485
0

Look at this project which allows you to create an API REST in seconds.

https://github.com/GeekyTheory/Automatic-API-REST

Features

  1. Creation a powerful API REST of your MySQL Data Base in Seconds.
  2. Management of the API in situ, it is not neccesary an extra data base.
  3. Private tables and fields.
  4. Custom queries.

Installation

  1. Clone the repo.

    git clone https://github.com/GeekyTheory/Automatic-API-REST/

  2. Place it in your web folder /var/www/YourWebPage/

  3. Open the file config.php and complete all the fields with the server credencials.
  4. Go to domain.com/AutomaticaApiRest