PHP, .NET, and the REST
2014-10-14 03:46:00 +0000 - Written by Carl Burks
Recently I began to develop a project at home using PHP. In my work life I typically code in the .NET world. With .NET you can have an integrated stack. Windows, IIS, ASP.Net, WebAPI, TypeScript, Visual Studio IDE, MSSql, and TFS.
Here is what I went with:
Arch Linux (for development in the wild probably pick something a little different)
Apache (using mod_rewrite to achieve the nice URL effect for a web api /api/version/controller)
PHP (Sometimes you like a challenge)
RequireJS* (is planned not implemented yet)
One of the challenges to implementing REST on PHP I encountered was the lack of PUT and DELETE variable support. For GET and POST the global variables $_GET and $_POST are available, but accessing for PUT and DELETE you need to hand roll the support:
$_delete = ;
$_put = ;
I’ve been using the Atom editor from GitHub to do most of the coding.
All in all it has been an enjoyable experience.
I will post more info and a link to the source once I get a little further into the project.