SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast
    Join Date
    Aug 2008
    Posts
    73
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    script libraries

    on average how many developers use script libraries to complete their websites (ie dynamic drive ---mootools---jquery) i am very comfortable with html and css but have not had the need to learn javascript and am using free scripts from libraries ( im including credits offcourse).
    just wanted to know if this is ok practice.
    thanks

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,263
    Mentioned
    196 Post(s)
    Tagged
    2 Thread(s)
    I use some files from the YUI library. IMHO there's nothing wrong with using library files if they do what you need to have done and you don't feel like writing your own code to do the same thing. But to use them without a basic understanding of javascript and how they work is likely to lead to problems at some point.

  3. #3
    SitePoint Enthusiast
    Join Date
    Aug 2008
    Posts
    73
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks for the info (i do know a little javascript but usually just enough to get me into trouble) is there a limitation to howmany scipts you can attach to a site as sometimes when i have to many running they make others not work.
    this could also be a z-index problem? im not sure would appreciate any input
    thanks

  4. #4
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,263
    Mentioned
    196 Post(s)
    Tagged
    2 Thread(s)
    Technically you should be able to use an almost infinite number of scripts.
    The problem comes when there is a conflict in function and global variable names. And when a script changes the DOM that another is using.

    I have never used all that many, so I haven't had that problem yet, but AFAIK using namespaces can help some.

    Z-index problems are a CSS thing, and would only be a problem if a script modifies it and your CSS isn't written to take it into account.

    By looking at error messages, you should be able to locate the naming conflict problems, then change the name to something different in one of them. Hopefully libraries will all have "uniquifiers" to eliminate these problems soon, but most aren't written with this in mind yet.

  5. #5
    SitePoint Enthusiast
    Join Date
    Aug 2008
    Posts
    73
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks for the adive and info i appreciate it
    cheers


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
  •