web services

I could use a REST from ModRewrite

I won't enthuse about the virtues of web-services and especially REST - many people have written great articles and presentations before me :-)

One problem irked me: delivering different content on the same URL using a framework.

I'm building a system which stores data about a company.
You visit company/20 and you get a page with data about company 20.
You POST to company/20 and the system saves the new data.

This can make your controller a little fugly:

<?php
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
  $this->_saveCompany();
}
else {
  $this->_viewCompany();
}
Subscribe to RSS - web services