title: CodeIgniter RESTful and controller
body: <p>Hi i am new to CI and MVC in general and i am trying to make a REStful application.</p>
  
  <p>I have read a lot (really) and i have the following specification</p>
  
  <p><strong>RESTful</strong></p>
  
  <p>Read (GET)</p>
  
  <pre><code>/object
  /object.xml 
  /object.json 
  </code></pre>
  
  <p>Read id (GET)</p>
  
  <pre><code>/object/id
  /object/id.xml 
  /object/id.json 
  </code></pre>
  
  <p>Create (POST)</p>
  
  <pre><code>/object
  /object.xml 
  /object.json 
  </code></pre>
  
  <p>Update (PUT)</p>
  
  <pre><code>/object/id
  /object/id.xml 
  /object/id.json 
  </code></pre>
  
  <p>Delete (DELETE)</p>
  
  <pre><code>/object/id
  /object/id.xml 
  /object/id.json 
  </code></pre>
  
  <p>Based on the above when extension is .xml return xml, when .json returns json and on extension returns html</p>
  
  <p>When comes to CI CRUD i have the followig urls</p>
  
  <pre><code> /object
   /object/edit/id
   /odject/delete/id
  </code></pre>
  
  <p>My question is </p>
  
  <p>Do i need 2 controllers 1 for RESTful and 1 for CI CRUD or i can have only 1,
  and how can i have the multiple respesentation (html,xml,json).</p>
  
  <p>Any help appricated (link for reading too)</p>
  
  <p>Thanks</p>