On Saturday 20 January 2007 15:22, Kjell Bublitz wrote:
> Secondly, there is no point for X-JSON to be a status message carrier
> or "just for simple stuff". Drop it entirely. It's is unnecessary.
>
> Most people will have an own error format / object notation which they
> transport in the responseText as a replacement for the expected
> content and act on it. (eg include a "status" key)
>
My reading of the X-JSON header was that it's useful in cases where you want 
to pass some secondary data back with a response. The practice of 
'piggy-backing' data in this way isn't to everybody's taste, but it can be a 
useful way of avoiding extra traffic.

Rails & Prototype both have a strong bent towards delivering fragments of HTML 
rather than data in the response. In this case, If you're sending back 
content, I don't see how to easily embed secondary data inside the main 
response body, other than stuffing it into a hidden DIV, which loses several 
hundred points for elegance. Sure, if you're delivering data anyway, X-JSON 
isn't particularly useful.

On Monday 22 January 2007 12:42, Mislav wrote:
> Will be done:
> http://dev.rubyonrails.org/ticket/7295
Just saw this come in on the list - sounds like a good suggestion to me.



Just my $0.02

Dave
-- 
----------------------
Author
Ajax in Action http://manning.com/crane
Ajax in Practice http://manning.com/crane2
Prototype & Scriptaculous Quickly http://manning.com/crane3

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to