I'll preface this with saying that I'm a crappy programmer, I'm sure that what I want to do could be done in 10 lines of node or Rails or something else, but PHP is what I have available.
So, I'm hoping to find a simple PHP library which wraps the database calls in an API that looks similar to the RESTful model.
I've had little success trying to find such a thing -- searching for PHP CRUD
or PHP REST
turns up several zillion pages, and I've no idea how to filter through them.
I'm really trying to keep things simple here, I don't want a big framework like Zend or something. The models I'm dealing with in Backbone are really simple. I just want to send GET
s to, say, /notes/3
or POST
s to /notes
, etc, and have PHP do the right thing to a database.
Perhaps I'm asking too much, but it seems to me that this is what other frameworks like Rails provide. Any suggestions? TIA...
EDIT Nov 2018: Although I wouldn't knock CodeIgniter, nowadays Laravel (currently 5.5) is the framework I use.
Here is a good article that sums up the reasons I use Laravel.
To get jump started, I recommend Laracasts. It's a subscription video tutorial service that goes in depth on how to use Laravel (and other web dev related things).
ORIGINAL ANSWER:
Codeigniter, to me, is the easiest of the Rails-like frameworks. It's bare bones, and you can build a CRUD app from scratch easily.
The biggest issue with rolling your own app is security. Codeigniter can help you build a less hackable site by shielding you from many of the common security risks, such as using $_POST arrays directly, and not properly filtering your data. Not to mention the many helper classes it offers such as form validation.
You can view the documentation on their website. It's very easy to use as long as you remember the navigation is hidden at the top of each page. :D