Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
Like Tree1Likes
  • 1 Post By fci

Thread: JavaScript Documentation & References

  1. #1
    Master Coder
    Join Date
    Feb 2003
    Location
    UmeŚ, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts

    Lightbulb JavaScript Documentation & References

    Hello there, folks - I'm compiling a little list of where to find references and documentation for the ECMAScript language, implentations (such as JavaScript, JScript, ActionScript, InScript etc.), browser host objects and other useful JavaScript resources.

    If you have any feedback, suggestions of improvements for this thread, please post them in the community feedback thread.



    (If you are a mere mortal and no JavaScript god, you might be more interested in looking at the bottom part of this post and at the MSDN or DevEdge documentation.)

    JavaScriptKit.com JavaScript Reference: Comprehensive listing of JavaScript objects, properties, and methods. Also includes explanations and examples.

    The ECMAScript Standard:
    ECMAScript:
    (Authored for implementors, not users. Very hard to read unless you know and understand the technical language it uses.)

    Implementations:
    JavaScript:
    (Netscape implemetation, see DevEdge JavaScript Central)

    JScript: (Only use MSDN for IE proprietary stuff.)
    (Microsoft implementation, see MSDN/Scripting/JScript)

    JavaScript:
    (Opera implementation)

    kjs:
    (Safari & Konqueror implementation)

    Host objects:
    Standard host objects, DOM0 & Netscape 4 proprietary host objects:

    Mozilla Gecko host objects:

    JScript host objects:

    Opera host objects:

    kjs & khtml host objects:

    Implementations and host objects:
    ActionScript:
    (MacroMedia flash implementation and host objects)

    InScript:
    (iCab implementation and host objects)

    I couldn't find any OmniWeb JavaScript Documentation and References anywhere - PPK's page will have to suffice when it comes to that browser.
    Last edited by liorean; 10-31-2004 at 11:17 PM.

  • #2
    Master Coder
    Join Date
    Feb 2003
    Location
    UmeŚ, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    The Document Object Model - DOM:
    I'm working on collecting DOM links now. PM me with suggestions if you have any.

    Other resources:
    Event Handling:


    JavaScript general references:



    Documentation on Specific Features:


    Document Bindings/Behavior (Two separate Mozilla and Microsoft technologies that might be united in some form in CSS Level 3)


    Object Oriented and Higher Order Programming in JavaScript


    Various, often specific task related:


    Other technologies related to JavaScript and web design:
    W3C Specifications:


    W3C Technologies Resources:
    • ZVON.org A site with lots of XML and Mozilla related tutorials and references


    JavaScript Graphics Libraries:


    Now, tell me: Did I miss anything?



    Also, not that good for JavaScript, but having a few gems on other languages and maybe a resource to keep an eye on, is The Quick Reference Site.



    (PM me with suggested additions, if you have any)
    Last edited by liorean; 06-05-2004 at 11:36 PM.

  • #3
    Master Coder
    Join Date
    Feb 2003
    Location
    UmeŚ, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    [cut off part from another thread]


    Global variables eat memory - local variables exist only as long as the function survives, unless they are in some way referenced from somewhere else. (Mostly the objects that has been created using the function, gŪven the function is a constructor.)

    If-else consume memory. Use conditional operation (sometimes called ternary operation because it is the only operation that takes three operands in JavaScript) (condition?expression:expression) or short circuit validation when you have only expressions to handle. If you have to handle statements, a switch...case...default is usally faster - even for a simple if(){}else if(){}, though it takes more space to write.

    Every extra action you have to take - including climbing the scope chain and calling a function - consume processing power. You gain load speed and readability from splitting up in smaller functions, especially if they are called from many places.

    Do..while is faster than while is faster than for is faster than for..in. Sometimes a function calling itself is faster than an iterator, sometimes not. Seems to depend on function complexity - the more complex the more gain. If you can keep a loop shorter than a function, use that instead.

    setInterval is better than setTimeout. Neither is good.

    Don't ever use eval, Function constructor or RegExp constructor if you can avoid them. They are big hogs all of them.


    Use break and continue in loops if they perform an action you might be interested in. It's often better to loop through everything and jump what you don't want to handle than to set a more complex expression in the condition of the loop.

    Use labled blocks and breaks for complex execution handling. It may be spaghetti, but it's fast.


    Minimise actions inside loops. For instance, never use collection.length inside the condition if it's static during the loop - store it in a variable instead.
    Last edited by liorean; 11-20-2003 at 12:07 AM.
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards

  • #4
    Regular Coder
    Join Date
    Oct 2002
    Posts
    299
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for Your outstanding answer, liorean!

    Most subjects I am aware of / understand, however I will dive in the iternary operations structures to know more of it.

    One question for now, what's Your advice on the amount of used global variables, maximum 50, 100,...... Because it's so easy to have all my div.id's directly to play with.

    Jerome
    Last edited by brothercake; 04-23-2003 at 08:48 PM.

  • #5
    Master Coder
    Join Date
    Feb 2003
    Location
    UmeŚ, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    Use as few as possibly. Create one or just a few holding object containing the variables you want as properties instead.

    Also, if you declare a variable inside a function instead of globally, it will exists only so long as the function, so that's a good way of avoiding global variables.
    Last edited by liorean; 09-18-2003 at 05:42 PM.
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards

  • #6
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation

    Never use MSDN for information about anything non-MS-proprietary. If you look up a standard property MSDN will tell you how IE implements it, which may or may not be how it's supposed to be implemented, but MSDN never distinguishes. Therefore its information with regard to anything non-MS is unreliable.

    <nb>I'm not MS bashing here .. simply passing on advice because I value integrity of information ... and I've been embarrassed too many times </nb>

    For MS-proprietary information it's second to none, but it's search facility is not so great; Google Site Search is much more reliable: "site:msdn.microsoft.com your search words"
    Last edited by brothercake; 07-19-2003 at 05:44 AM.
    "Why bother with accessibility? ... Because deep down you know that the web is attractive to people who aren't exactly like you." - Joe Clark

  • #7
    Master Coder
    Join Date
    Feb 2003
    Location
    UmeŚ, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    Just made a cleenup of blind links and made some additions. (Thanks, everyone reporting those blind links and suggesting additions.)

    I'm also looking for some way to bring the structure of this list to a level that makes it easier for newbies to find what they are searching for in it (Currently it's more targetted at people already familiar with the languages and it's construction and abilities). If you have any suggestions, PM me.

    (I like to keep this thread absolutely on-topic and relevant)
    Last edited by liorean; 12-02-2003 at 04:56 PM.
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards

  • #8
    fci
    fci is offline
    Senior Coder
    Join Date
    Aug 2004
    Location
    Twin Cities
    Posts
    1,345
    Thanks
    0
    Thanked 0 Times in 0 Posts
    IE: where's my memory? by mishoo, 8/23/2004
    Description:
    Yet another bug in the oldest, poorest, most unmaintained and most buggy browser in the last 5 years, Internet Explorer. Some time ago I was doing some tests with one of my products. Worked really fine, in all browsers, including IE. The problem I'm talking about here is a little harder to detect.

    Imagine a bug that doesn't manifest until you made several dozens requests in your page. This is the most dangerous type of bug. At first you believe everything to be excellent, you start to push harder on your software, adding more features, take it to the limit. And when you notice that behavior, it's like the sky falls on your head.

    The problem I'm discussing here is that IE leaks memory on certain occasions. If your script complies to this behavior, you will usually notice an abnormal slowness when IE executes it, usually after 40-50 requests made within the same browsing session (I mean, without restarting the browser). This happened to me and: (1) I'm glad I noticed it, (2) I hate IE even more than I did so far and (3) I managed to fix it--in 3 freaking days!! ;-(
    shailluis likes this.


  •  

    Posting Permissions

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