-
10 Dec 2007 11:30 PM #1
[FIXED] Ext JS should become more RESTful: support PUT and DELETE
[FIXED] Ext JS should become more RESTful: support PUT and DELETE
It is a pity that only on POST Ext JS passes form parameters on submit. I propose that the code be changed that this happens when the method is not GET instead of method == POST as is currently the case.
The code is in Ext.form.Action.Submit and is really easy to change. I know that not all browsers function identically with PUT and DELETE, but if we wait for that to happen, no progress will ever made. For people who support only one browser, it is not really relevant if PUT and DELETE do not behave identically on another browser.
So please Ext JS team, consider transparent support for PUT and DELETE. You can even put in a disclaimer, but don't write code that make it impossible to use these methods.
-
10 Dec 2007 11:36 PM #2
I have been doing web programming since the internet started in 1994. I have never needed to use 'PUT' and 'DELETE'.
Why do you want it? I am very curious.Make everything as simple as possible, but not simpler.
- Albert Einstein
-
10 Dec 2007 11:39 PM #3
Hi santosh.rajan,
The answer is complex, but read a bit on REST. <a href="http://en.wikipedia.org/wiki/Representational_State_Transfer">the Wikipedia entry on this topic</a> is actually correct.
You use DELETE to delete a resource, and PUT to replace a resource. POST is an entirely different beast and can do anything.
For example if you have customers, you could give them a url like /customers/1, /customers/2, etc.
Deleting one would be done with sending a DELETE request to the url /customers/1.
-
11 Dec 2007 12:09 AM #4
Interesting. But looks like it hasnt made much headway out of Academia. Since POST can take care of both PUT and DELETE, it would require a major benefit over the existing for the users of Ext to push for this I think.
Make everything as simple as possible, but not simpler.
- Albert Einstein
-
11 Dec 2007 1:57 AM #5
Hi!
I can recommend the book "RESTful Web Services" by Leonard Richardson and Sam Ruby. I found it very helpful and interesting to read. I am currently implementing an application with Ext JS on the client and a restful web-service on the server. So far I think it is definitely a step in the right direction. For me it's very important for Ext Js to support all HTTP methods.
As far as I understand the Ext.Ajax object does that. I am not sure if Ext.form.Action.Submit does. The documentation suggests that only GET and POST are allowed, but I can't see it in the code. Has anyone tried?
-
11 Dec 2007 4:44 AM #6
You can implement your own Form Action classes to do anything you want, so an Ext.form.Action.Delete action should be quite easy to write.
Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
11 Dec 2007 4:47 AM #7
Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
11 Dec 2007 5:45 AM #8
I only find GET and POST mentioned in Ext.form.BasicForm. And that should be ok as long as (X)HTML itself doesn't support other HTTP-methods for form-elements

-
11 Dec 2007 7:35 AM #9
XHTML? Ext.form.Action uses Ext.data.Connection, "Ajax". That should be able to use any method.
Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
11 Dec 2007 7:39 AM #10



Reply With Quote