On Wed, Jan 14, 2009 at 11:39 PM, Matt <m...@thekrusefamily.com> wrote:
>
> On Jan 14, 3:11 pm, "David Zhou" <da...@nodnod.net> wrote:
>> A new browser to be support would be enough to warrant a new version
>> of jQuery, I think.
>
> Which would be entirely unnecessary if feature detection is done
> correctly and the new browser doesn't have any bugs to account for.

Um, of course?  If the new browser supports standards, then obviously
a new version of jQuery wouldn't be needed.  The existing feature
detection would detect that it works with the standard method and
everything is peachy.

And that's true with jQuery's feature detection as of now.

>> In terms of logic, I think it definitely makes sense to test for
>> standards support *first* and then fall back.  This (rightly, I think)
>> assumes that over time browsers will get *more* compliant.
>
> Perhaps, but jQuery has the potential to support browsers like those
> in phones and other obscure agents that may not be common. It doesn't
> _need_ to limit its browser support to such a small subset if it would
> just handle things correctly. As people move towards more mobile apps,
> wouldn't it be great if jQuery continued to work in that environment?
> Or when Chrome is released, it could be assumed that it worked
> correctly until/unless there are specific quirks to fix?

What do you think the supports_standards test does?

I think you're misunderstanding John's logic in his previous email.
It tests standards *first*.  If the browser supports it, why even
bother testing for other methods?

In your logic from above, jQuery must test every other method *first*
before deciding to use the standard method.  That doesn't sound
backwards to you?

>> If there's ever a case where a third condition arises, it'd be
>> relatively trivial to do:
>> if supports_ standard
>>      standard
>> else if supports_other_method
>>      other_method
>> else
>>      other_method2
>
> Why would you want to make the assumption that if a browser doesn't
> support the standards way or the other_method, that it must support
> other_method2?

That was just an example.  The logic can be extended to support as
many alternate methods as you like.

> Without ever checking if it really does support
> other_method2? That is logically error-prone. If a browser update is
> released with a bug that breaks the standards approach, you wouldn't
> want to then apply a fix that is meant for an entirely different
> browser, would you? If FF 3.2 breaks "opacity" (for some strange
> reason, in theory), why would you then want to apply the IE fix of
> using alpha? It makes no sense. It's the wrong logic!

It'll be the wrong logic either way. If no alternate method will work
*and* the standards method doesn't work, then things will break.
There's not really any way around that.  I'm not sure how jQuery
current handles exceptions, but I imagine something will raise an
issue.

> These concepts have been around for a number of years and are used
> often in robust, reliable, browser-agnostic applications. jQuery needs
> to catch up with the times if it is to be taken more seriously as a
> solid js framework.

Can you elaborate on these concepts? Thus far, the only concept I can
tell is that you want jQuery to check if any alternate method will
work *first* and then, if all else fails, use the standard method.

Why is that better than just testing to see if the standards method works frist?

And if you're big issue is that there's a catchall "else" to the
logic, then it's trivial to just replace that with an else if.  It'll
then be functionally equivalent to the logic you posted in your email
above.

-- 
---
David Zhou
da...@nodnod.net

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-dev@googlegroups.com
To unsubscribe from this group, send email to 
jquery-dev+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to