Re: URLQuery / FormData

On Tue, Sep 10, 2013 at 5:48 PM, Rick Waldron <waldron.rick@gmail.com> wrote:
> In support of #2, one of the most important aspects of jQuery's success with
> developers was the elimination of "modes" with regard to: 1) a single
> element, 2) a node list. This was my basis for suggesting to Anne that
> "modes" be eliminated from the design. Instead of trying to make an API that
> has a function for returning one value (or the first of a set of values) and
> another function for returning the entire set of values—just have a single
> function that always returns the array value for that key, regardless of the
> number of items stored. This approach also means that the end developer
> doesn't have to remember when to use get() or getAll(), because the
> "no-modes" version of get() always returns the same _type_, which also means
> that further operations on the value are as simple as using the existing
> array methods (vs. needing to know if there will be a single string value
> returned or an array of strings).

To be clear, we never had modes. get() always returned the first value
or null. getAll() always returned all values or the empty list.


-- 
http://annevankesteren.nl/

Received on Tuesday, 10 September 2013 17:02:16 UTC