This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 123097

Summary: |Improve URI syntax to support edit/create using forms|TBD| Ayub Khan| |
Product: webservices Reporter: Peter Liu <petertliu>
Component: RESTAssignee: Ayub Khan <ayubskhan>
Status: NEW ---    
Severity: blocker    
Priority: P2    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on:    
Bug Blocks: 123409    

Description Peter Liu 2007-11-30 00:27:42 UTC
This is an idea from Nam:

I wanted to propose 2 more improvements that would make us competitive RoR REST-style:

#1. URL for retrieve form for edit and and create new:

Currently for each database entity we would have the following 5 combinations of HTTP method and URI:
  GET             /customers/
  POST          /customers/
  GET             /customers/1
  PUT             /customers/1
  DELETE      /customers/1

It would be easier for application developer if we generate 2 more combinations:
  GET             /customers/1/edit
  GET             /customers/new
which would return form representation, mime type "application/x-www-form-urlencoded".  (See jersey SimpleServlet sample).

These are what RoR does.  Alternatively maybe we could avoid introducing 'new' or 'edit' to the url.
 GET             /customers/1.form  or /customers/1  with MIME type "application/x-www-form-urlencoded"
 GET             /customers.form or /customers with MIME type "application/x-www-form-urlencoded"
Comment 1 Lukas Jungmann 2008-04-14 17:13:29 UTC
moving opened issues where TM != dev to TM=TBD