Search Results

Search found 4 results on 1 pages for 'greim'.

Page 1/1 | 1 

  • If we don't like it for the presentation layer, then why do we tolerate it for the behavior layer?

    - by greim
    Suppose CSS as we know it had never been invented, and the closest we could get was to do this: <script> // this is the page's stylesheet $(document).ready(function(){ $('.error').css({'color':'red'}); $('a[href]').css({'textDecoration':'none'}); ... }); </script> If this was how we were forced to write code, would we put up with it? Or would every developer on Earth scream at browser vendors until they standardized upon CSS, or at least some kind of declarative style language? Maybe CSS isn't perfect, but hopefully it's obvious how it's better than the find things, do stuff method shown above. So my question is this. We've seen and tasted of the glory of declarative binding with CSS, so why, when it comes to the behavioral/interactive layer, does the entire JavaScript community seem complacent about continuing to use the kludgy procedural method described above? Why for example is this considered by many to be the best possible way to do things: <script> $(document).ready(function(){ $('.widget').append("<a class='button' href='#'>...</div>"); $('a[href]').click(function(){...}); ... }); </script> Why isn't there a massive push to get XBL2.0 or .htc files or some kind of declarative behavior syntax implemented in a standard way across browsers? Is this recognized as a need by other web development professionals? Is there anything on the horizon for HTML5? (Caveats, disclaimers, etc: I realize that it's not a perfect world and that we're playing the hand we've been dealt. My point isn't to criticize the current way of doing things so much as to criticize the complacency that exists about the current way of doing things. Secondly, event delegation, especially at the root level, is a step closer to having a declarative behavior layer. It solves a subset of the problem, but it can't create UI elements, so the overall problem remains.)

    Read the article

  • Can Atom be used for things besides syndication feeds?

    - by greim
    Purely in terms of its conceptual model, is the purpose of Atom (and RSS) only to provide a time-sequential series of frequently-updated items, such as "most recent blog posts" or "last twenty SVN commits," or can Atom be legitimately used to represent static and/or non-time-sequential listings/indices? As an example, "index of files under this directory", "dog breeds" or "music genres". Even if there's a date associated with the items, like a file's last modified date, what if you don't necessarily want time to be the primary consideration when you represent that model to your users? The context for this is passing around (generating and consuming) lists of things in a REST-ful environment, hopefully using a well-understood format, where "date something was created/updated" is a pertinent detail, but not the primary consideration. I realize there's probably no right answer, but wanted to get some perspectives. Thanks.

    Read the article

  • Will IE9 support conditional comments?

    - by greim
    I thought I remembered reading somewhere that IE9 would not be supporting them, but now after searching I can't find any indication that this is true. Is anyone aware of a definitive statement, either way, about whether Microsoft will be supporting conditional comments in IE9?

    Read the article

  • In XHR, is it possible to distinguish network errors from cross-origin errors?

    - by greim
    http://www.w3.org/TR/access-control/ Reading the CORS spec linked above, it seems to be the case that it's impossible to reliably distinguish between a generic "network error" and a cross-origin access denied error. From the spec: If there is a network error Apply the network error steps. Perform a resource sharing check. If it returns fail, apply the network error steps. http://www.w3.org/TR/access-control/#simple-cross-origin-request0 In my testing, I couldn't locate any features of Firefox's implementation that seem to indicate that the resource sharing check definitely failed. It just switches readyState to 4 and sets status to 0. Ultimately I'd like the ability to pass a success callback, a general fail callback, and an optional cross-origin fail callback, to my function. Thanks for any help or insight.

    Read the article

1