The Javascript Archive Network

Javascript Archive Network is a new site which claims to be “a comprehensive resource for Open Source JavaScript libraries and software.”, unfortunately simply accessing the site in my IE6 generates two script errors. So it’s not a good start. The authors also desperately need to set a background colour - people, please stop making this mistake!.

So what’s the error, the first is that the HTTP variable is just used without being checked that it exists first, a common error, but one scripters must stop making if the quality of their scripts are going to go up, anyway it’s unfair to criticise the page, it’s really the scripts that matter - So I’ll probably criticise those instead, it’s what normally seems to happen in this blog…

Well I’m not, it’s got a lot of crap in it, it’s got a some good in it, just like CPAN has, what’s really missing is some way to identify the good stuff from the bad stuff, CPAN you can generally do this simply because of the longevity and the breadth of the archive. Hopefully the same could happen with JSAN, but until, maybe there should be some sort of review process on scripts, so that competent scripters get in there and highlight bad things in the scripts. Of course that’s difficult to organise, hopefully adding a comments system to the packages would be a quick cheap way of at least allowing people to comment on scripts, so I’m off to ask the founder bod.

Comments

  1. Dean Edwards Says:

    I got mailed about this too. I had pretty high hopes at first. I thought it would be a centralised repository for all kinds of scripts. Instead, they appear to be imposing some kind of framework. Some of the code there is good but some of it isn’t. I’m not sure about the use of ActiveX to load scripts either. What’s wrong with the

  2. Dean Edwards Says:

    I meant: “What’s wrong with the <script> tag?” btw.

    Get a preview button! ;-)

  3. Casey West Says:

    Thanks for taking a look at JSAN. I know we aren’t comprehensive but I didn’t know about the bugs. I don’t have a copy of Windows and so I rely on the good graces of those who do to help me debug problems with Internet Explorer. I’m going to have to find a way to acquire Virtual PC for my Mac.

    Moving on, I will update my styles to include a default background color. This website and infrastructure is just two weeks old so kinks abound.

    As for the framework. Many people seem to like the idea of using the JSAN library in conjunction with a single file per public class (or function grouping) to create maintainable and modular code. However, I could care less if you actually use that. I just want you to upload your useful code to JSAN. :-) There is a restriction on the way that a distribution is laid out and that’s largely for my sanity.

    However, I welcome your comments, suggestions, patches, and commits! Get involved in any way you can, I’d really appreciate it. Again, thanks for being interested.

  4. Jim Ley Says:

    Casey, Opera 8.01 suffered the exact same problems, so it’s not simply an IE issue, I didn’t check anywhere else, but I can’t actually see where you’re even attempting to create the HTTP object?

    I agree with Dean, I’m not keen on the framework idea - although lots of people have had that argument with me. A comments/rating system would be really good, the big motivation for uploading and participating is if we can correct and make sure that the bad scripts are known to be bad, is that something that’s likely?

  5. Casey West Says:

    A ratings system is in the cards, yes. Also, a per-distribution RT queue is planned, someone just needs to write the import script. :-)

    I don’t have Opera handy but I’m going to find a way to make it so.

    The HTTP object is being created in /js/HTTP/Request.js most likely.

  6. Casey West Says:

    I downloaded Opera and used it to fix the JS bug you found. I also updated the style sheet to have a background-color for the body. Thanks for you help!