SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Guru
    Join Date
    Sep 2008
    Location
    Dubai
    Posts
    971
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    differences betwen unobstrusive and standard javascript

    hi,

    I have a confusion regarding the topic. I read a article on wiki and find briefly that unobtrusive js is better than standard js.

    Today i am looking on adobe website, I find their two ways of creating spry collapsible panel, one is called standard, the other one is called unobtrusive

    unobstrusive

    standard

    Both function the same and look the same.

    So the main question is if it is better and it is js why don't people just call it js2 or new js ore standard, etc.. Instead of unobtrusive. And write every js code in unobtrusive js?

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,729
    Mentioned
    104 Post(s)
    Tagged
    4 Thread(s)
    Because javascript already has different versions, for example, IE has been stuck with version 1.3 for a long time, while other browsers have progressed to version 1.6, 1.7 and 1.8.

    Using javascript version numbers is like using html spec versions, such as html 4.01 - you can use it to write code that is poor, or that is full of great techniques that enable managing it in easier ways.

    We also do not want to get in to the same trouble and confusion that the term Web 2.0 brought us.
    Last edited by paul_wilkins; Oct 23, 2008 at 15:40.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  3. #3
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,862
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    JavaScript 2.0 is a particular version of JavaScript and the version numbering of JavaScript has no impact on how you code your script.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  4. #4
    SitePoint Evangelist
    Join Date
    Apr 2008
    Location
    Dublin, Ireland
    Posts
    461
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not to mention that unobtrusive scripting is a method or usage of javascript as it is so it's not a new version.

  5. #5
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,729
    Mentioned
    104 Post(s)
    Tagged
    4 Thread(s)
    I hear too that CSS is due for a shake up too, in that table structures will be used for page layout. This is not using html table elements for layout, instead it's applying table properties to div elements so that they behave the same as table elements, which should prove to be much more effective and stable in cross-browser situations.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  6. #6
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,862
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by pmw57 View Post
    I hear too that CSS is due for a shake up too, in that table structures will be used for page layout. This is not using html table elements for layout, instead it's applying table properties to div elements so that they behave the same as table elements, which should prove to be much more effective and stable in cross-browser situations.
    Yes, it was introduced 10 years ago in the CSS2 standard and all browsers except one introduced support for it soon afterwards. The soon to be released version of that one exception also supports it and so, once the older versions of that browser cease to be used, those 10 year old CSS properties will then finally work across all browsers. The one exception could have been ignored except that up to a couple of years ago they had about 98% of the market.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •