By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,962 Members | 1,791 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,962 IT Pros & Developers. It's quick & easy.

Javascript Libraries

P: n/a
Are there any good qualities libraries out there, free or for
"reasonable" cost?
--
Matt Silberstein

Do something today about the Darfur Genocide

http://www.beawitness.org
http://www.darfurgenocide.org
http://www.savedarfur.org

"Darfur: A Genocide We can Stop"
Jan 9 '06 #1
Share this Question
Share on Google+
23 Replies


P: n/a
Matt Silberstein said the following on 1/9/2006 12:47 AM:
Are there any good qualities libraries out there, free or for
"reasonable" cost?


http://www.JavascriptToolbox.com/

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/

Jan 9 '06 #2

P: n/a
Matt Silberstein wrote:
Are there any good qualities libraries out there, free or for
"reasonable" cost?


To do what?

--
Matt Kruse
http://www.JavascriptToolbox.com
http://www.AjaxToolbox.com
Jan 9 '06 #3

P: n/a
On Mon, 9 Jan 2006 03:06:07 -0600, in comp.lang.javascript , "Matt
Kruse" <ne********@mattkruse.com> in <dp*********@news4.newsguy.com>
wrote:
Matt Silberstein wrote:
Are there any good qualities libraries out there, free or for
"reasonable" cost?


To do what?


Yeah, I know, I should have said a bit more. I have in mind a consumer
oriented service site, so I have lots of general needs. I would much
rather use a well developed library than write my own so I can
concentrate on the, I hope, original stuff. So I am looking for a
variety of things. I have a vague need, vague responses are probably
good enough.

--
Matt Silberstein

Do something today about the Darfur Genocide

http://www.beawitness.org
http://www.darfurgenocide.org
http://www.savedarfur.org

"Darfur: A Genocide We can Stop"
Jan 9 '06 #4

P: n/a
On Mon, 09 Jan 2006 01:06:02 -0500, in comp.lang.javascript , Randy
Webb <Hi************@aol.com> in
<fa******************************@comcast.com> wrote:
Matt Silberstein said the following on 1/9/2006 12:47 AM:
Are there any good qualities libraries out there, free or for
"reasonable" cost?


http://www.JavascriptToolbox.com/


Thanks, somehow I did not have that one.
--
Matt Silberstein

Do something today about the Darfur Genocide

http://www.beawitness.org
http://www.darfurgenocide.org
http://www.savedarfur.org

"Darfur: A Genocide We can Stop"
Jan 9 '06 #5

P: n/a
Matt Silberstein wrote:
http://www.JavascriptToolbox.com/

Thanks, somehow I did not have that one.


Check back in the coming weeks, too, as I am nearly done creating the new
site from scratch and improving on much of the code.

--
Matt Kruse
http://www.JavascriptToolbox.com
http://www.AjaxToolbox.com
Jan 9 '06 #6

P: n/a
Matt Silberstein wrote:
[...] "Matt Kruse" [...] wrote:
Matt Silberstein wrote:
Are there any good qualities libraries out there, free or for
"reasonable" cost?

To do what?


Yeah, I know, I should have said a bit more. I have in mind a consumer
oriented service site, [...]


First of all, a consumer-oriented service site does not _depend_ on
client-side JS/ECMAScript support.
PointedEars
Jan 9 '06 #7

P: n/a
Thomas 'PointedEars' Lahn said the following on 1/9/2006 4:12 PM:
Matt Silberstein wrote:

[...] "Matt Kruse" [...] wrote:
Matt Silberstein wrote:

Are there any good qualities libraries out there, free or for
"reasonable" cost?

To do what?


Yeah, I know, I should have said a bit more. I have in mind a consumer
oriented service site, [...]

First of all, a consumer-oriented service site does not _depend_ on
client-side JS/ECMAScript support.


Question: What does that have to do with anything in this thread?
Answer: Nothing.
Question: Why does TL post such unrelated gibberish?
Answer: He knows no better yet?

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jan 9 '06 #8

P: n/a
Thomas 'PointedEars' Lahn wrote:
First of all, a consumer-oriented service site does not _depend_ on
client-side JS/ECMAScript support.


Oops, you forgot to write "in my opinion".

A web site depends on whatever the hell it wants to, whether you agree with
it or not.

--
Matt Kruse
http://www.JavascriptToolbox.com
http://www.AjaxToolbox.com
Jan 9 '06 #9

P: n/a
Matt Kruse wrote:
Thomas 'PointedEars' Lahn wrote:
First of all, a consumer-oriented service site does not _depend_ on
client-side JS/ECMAScript support.


Oops, you forgot to write "in my opinion".


No, I did not. Forcing consumers to have client-side JS/ECMAScript support
to use the service is _not_ consumer-oriented, from a very objective point
of view.
PointedEars
Jan 9 '06 #10

P: n/a
VK

Matt Silberstein wrote:
Yeah, I know, I should have said a bit more. I have in mind a consumer
oriented service site, so I have lots of general needs. I would much
rather use a well developed library than write my own so I can
concentrate on the, I hope, original stuff. So I am looking for a
variety of things. I have a vague need, vague responses are probably
good enough.
Then another must in your collection should be "prototype.js" library
<http://prototype.conio.net/>
From my personal experience a lot of home-developers are using it. It

is based on how many times my shortcut function $(id) for
document.getElementById had clinched in someone's environment (because
prototype.js has it's own of the same kind).
Actually the absence of package namespaces is a killer in JavaScript.
That would be a project for the good of humanity :-) to collect all
most popular libraries and get the list of used function/glob variable
names from them. Spice it up with the list of "top 20 tasty names" like
IE, FF, NN etc. which should be presumed by anyone's library to be
occupied in the global scope. Add window own properties atop of it
(like "self"). All together it would be a must-have table for any
JavaScript programmer, I think.

Jan 9 '06 #11

P: n/a
VK wrote:
Matt Silberstein wrote:
Yeah, I know, I should have said a bit more. I have in mind a consumer
oriented service site, so I have lots of general needs. I would much
rather use a well developed library than write my own so I can
concentrate on the, I hope, original stuff. So I am looking for a
variety of things. I have a vague need, vague responses are probably
good enough.


Then another must in your collection should be "prototype.js" library
<http://prototype.conio.net/>


No, it should not. But I am not surprised that you recommend it.
From my personal experience a lot of home-developers are using it.

[...]


People without minimum clue, no doubt.

Will you learn how to quote?
PointedEars
Jan 9 '06 #12

P: n/a
Thomas 'PointedEars' Lahn wrote:
No, I did not. Forcing consumers to have client-side JS/ECMAScript
support to use the service is _not_ consumer-oriented, from a very
objective point of view.


Sure it is. Just not to your standards, which you are generalizing to be the
standards that everyone should follow. How nice of you.

There is always a "minimum requirement" to use any type of software. If you
buy software off the shelf today, surely you wouldn't expect to use it on
your old 486 running Windows 3.1. If that was your computer, you would have
limited options. But the software maker surely would not be criticized for
making software that is not "consumer oriented".

If a site decides to require javascript (or flash, or SSL, or CSS, or a
browser newer than Mosaic 1.0, etc) then they have purposely limited their
potential audience. This is not a bad thing. It just has consequences. If
the site builders are okay with the consequences, then that's their
perogative. I'm a consumer, and I don't mind sites that require javascript
at all. Clearly your generalization is just your opinion.

--
Matt Kruse
http://www.JavascriptToolbox.com
http://www.AjaxToolbox.com
Jan 9 '06 #13

P: n/a
Thomas 'PointedEars' Lahn escreveu:
VK wrote:
Matt Silberstein wrote:
I would much rather use a well developed library than write my own so I can
concentrate on the, I hope, original stuff.[...] Then another must in your collection should be "prototype.js" library
<http://prototype.conio.net/>


No, it should not. But I am not surprised that you recommend it.


I took a look on this code one month ago and I didn't liked too, the
guy prototyped even the Object, which killed the "for..in" loop.

In my opinion most of those functions just complicates what was so
supposed to be very easy... Some of them are handy, but since he's
writing a library that's used by a lot of people, he should write
better things and for sure avoid global objects, anyway, it's not my
problem ;]
It is based on how many times my shortcut function $(id) for
document.getElementById had clinched in someone's environment (because
prototype.js has it's own of the same kind).
I also had problems with this Prototype library, but it was due to the
"for..in" death, I sent an email to the creator and he said that was
going to correct.
Actually the absence of package namespaces is a killer in JavaScript.


But you can create your namespaces, it won't avoid such problems, but
if you choose a nice name the chances of breaking your code will really
decrease, and if it get overwritten by another developer, at least it
will be easier for you to find the problem as nothing will work :)

JonasStuffs = {
a: function(){},
b: 123
};

You can even make something in a java style haha:

com = {jonasraoni: {etc: {
a: function(){},
b: 123
}}};

Sure it doesn't need to look so ugly...
--
Jonas Raoni Soares Silva
http://www.jsfromhell.com

Jan 10 '06 #14

P: n/a
On 9 Jan 2006 14:57:19 -0800, "VK" <sc**********@yahoo.com> wrote:
Actually the absence of package namespaces is a killer in JavaScript.
That would be a project for the good of humanity :-) to collect all
most popular libraries and get the list of used function/glob variable
names from them.


Surely any competent library that you wanted to integrate would only
use one global name?

Jim.
Jan 10 '06 #15

P: n/a
VK

Jim Ley wrote:
Surely any competent library that you wanted to integrate would only
use one global name?


You can count on it! :-)

Jan 10 '06 #16

P: n/a
VK said the following on 1/10/2006 12:16 PM:
Jim Ley wrote:
Surely any competent library that you wanted to integrate would only
use one global name?

You can count on it! :-)


Then why would you need a "list of global variables"?

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jan 10 '06 #17

P: n/a
VK

Randy Webb wrote:
VK said the following on 1/10/2006 12:16 PM:
Jim Ley wrote:
Surely any competent library that you wanted to integrate would only
use one global name?

You can count on it! :-)


Then why would you need a "list of global variables"?


Because you cannot count on everyone else.
I thought the OP's idea was to "urbi et orbi", not just sharing
experience between a group of "selected people" (I'm aside). There are
rather popular libraries which overload or extend host object methods
(window or document) and which have some global variables like
"isSomething". It is terrible, incorrect, errorneous, false, profanic,
obscene, sacrilegious, amateurish, dilettantish, jackleg, jackass and
mf b.s.

The problem remains that a lot of people are not aware of it or do not
give a tea-spoon of the substance for this matter ;-)

So rather then pretend that the problem do not exists it is better to
get a fair picture of what obstacles can be met by academically correct
libraries in the imperfect surrounding.

IMHighlyHO

Jan 10 '06 #18

P: n/a
On Mon, 09 Jan 2006 22:12:12 +0100, in comp.lang.javascript , Thomas
'PointedEars' Lahn <Po*********@web.de> in
<75*****************@PointedEars.de> wrote:
Matt Silberstein wrote:
[...] "Matt Kruse" [...] wrote:
Matt Silberstein wrote:
Are there any good qualities libraries out there, free or for
"reasonable" cost?
To do what?


Yeah, I know, I should have said a bit more. I have in mind a consumer
oriented service site, [...]


First of all, a consumer-oriented service site does not _depend_ on
client-side JS/ECMAScript support.


You are, of course, welcome to your own private definitions. I am, of
course, free to make an attempt to produce a product. The product I
have in mind would provide consumer value and requires JavaScript (or
functional equivalent) for implementation. I don't want to package it
as a stand alone application, that would not make sense for the stuff.
So I am willing to exclude some X % that has JavaScript turned off. I
would, of course, make that as clear as is reasonable.
--
Matt Silberstein

Do something today about the Darfur Genocide

http://www.beawitness.org
http://www.darfurgenocide.org
http://www.savedarfur.org

"Darfur: A Genocide We can Stop"
Jan 10 '06 #19

P: n/a
VK

Matt Silberstein wrote:
So I am willing to exclude some X % that has JavaScript turned off. I
would, of course, make that as clear as is reasonable.


May be consider as highly trolling, but these "users with JavaScript
turned off" for me still remain kind of Bigfoot or Flying Soucer.
Anyone knows about them, many believes in them, knows stories about
them, someone even personally met... another person who sees them by
own eyes. I'm just kinda staying out of luck I guess. Between me and my
colleges we have over 30 traps set all around the area (web-servers
with visitors stats) and no one damn bell buzzed for many years. Maybe
we should try in Oregon?

Jan 10 '06 #20

P: n/a
VK said the following on 1/10/2006 2:50 PM:
Randy Webb wrote:
VK said the following on 1/10/2006 12:16 PM:
Jim Ley wrote:
Surely any competent library that you wanted to integrate would only
use one global name?
You can count on it! :-)

Then why would you need a "list of global variables"?

Because you cannot count on everyone else.


Then don't. If you are using a library in a page/site then it is your
obligation, as the programmer, to ensure that you do not have name
clashes. And then, you only need a list of the ones in the Libraries you
are using.

A "Global List of Global Names in Libraries" would be completely and
utterly useless though. What need do I have for a list of names that may
or may not be in Libraries that I may or may not use? None.

Even taking just Matt Kruse's Libraries, if you made a list of all of
the Global Names it uses, and then use just one of the Libraries, then
the list is useless and irrelevant.
I thought the OP's idea was to "urbi et orbi", not just sharing
experience between a group of "selected people" (I'm aside).
I don't understand Latin so I am not sure what you just said to me.
There are rather popular libraries which overload or extend host
object methods (window or document) and which have some global
variables like "isSomething".
And if you use one of those Libraries, then you would need a list of
variables in *that library only*.

It is terrible, incorrect, errorneous, false, profanic, obscene,
sacrilegious, amateurish, dilettantish, jackleg, jackass and mf b.s.
In your opinion, maybe. That doesn't make it so.

The problem remains that a lot of people are not aware of it or do not
give a tea-spoon of the substance for this matter ;-)
And you propose to save them from that? Good luck.
So rather then pretend that the problem do not exists it is better to
get a fair picture of what obstacles can be met by academically correct
libraries in the imperfect surrounding.


Just the sheer number of possibilities makes that impossible to do. But
you can start it off. When you get the first 10 million, or so, global
variable names that are about on the web, you can post a URL to your
list here.
--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jan 11 '06 #21

P: n/a
VK

Randy Webb wrote:
If you are using a library in a page/site then it is your
obligation, as the programmer, to ensure that you do not have name
clashes. And then, you only need a list of the ones in the Libraries you
are using.
1) Is it also my obligation to ensure that window.alert() indeed shows
alert and not a postcard? Or that for-in loop gives some expected
results? Or that attachEvent() is overloaded so actually it's now a
pointer to addEventListener?
It is *not* about predicting all possible obstacles: you cannot write
an absolutely enviroment independent program. But you may try to list
the most probable "ennemies", at least top three maybe.
A "Global List of Global Names in Libraries" would be completely and
utterly useless though. What need do I have for a list of names that may
or may not be in Libraries that I may or may not use? None.


2) That brings the point two, and it's excellently illustrated by this
yesterday post:
<http://groups.google.com/group/comp.lang.javascript/browse_frm/thread/20427dbd3a890b00/1ef7c4b35e964237#1ef7c4b35e964237>

Did you know the meaning of "crossobj" variable? Nor I - until I read
the post and googled for it. And for many end users this "crossobj" is
full of meaning and they probably will be glad to see a "speaking"
object name in your library.
Overall if you're making a *product* (as was spelled by OP) then
popular "folk's libraries" are a must-read and a must-study. Not to
copy the style or approach - but in these libraries people are
expressing exactly *what they think they need* and *how they think
about it* (customer behaviors).
You can call sh** on <side quote>these ignorants who don't know what do
they really need</side quote> and make everything in your {co{rre{ct
wa}y}} - But it may (or may not of course) make the market destiny of
your product much more difficult. Again - not to break the coding rules
in someone's favor. But if you can put a nice color band around your
product, why not try to do it? And "folk's libraries" may hint you of
what color customers like :-)
I thought the OP's idea was to "urbi et orbi", not just sharing
experience between a group of "selected people" (I'm aside).


I don't understand Latin so I am not sure what you just said to me.


Sorry. "for the city and for the world" - thus for whoever wants to
listen, to everyone. (see p.2 above)

<snip>
The rest is commented directly or indirectly in the points above I
guess.

And last but not least: IMHO

Jan 11 '06 #22

P: n/a
Randy Webb wrote:
Even taking just Matt Kruse's Libraries, if you made a list of all of
the Global Names it uses...


Side note: When I release the new JavascriptToolbox.com, most of my
libraries will have been re-written to use closures and expose just a single
global name, or in some cases 2 or 3.

And I'm going to add this to my "Best Practices" document. When writing libs
and you don't know what other libs a user might include in their page, it's
best to try hard to avoid name collisions.

But I certainly wouldn't conclude that any library which exposes more than a
single name to the global scope is written badly.

To many programmers, writing code like this:

if (isInteger(num)) {
...
}

is just easier, cleaner, and more readble than

if (Validator.isInteger(num)) {
...
}

so I don't think that exposing global names is necessarily always a bad
thing.

--
Matt Kruse
http://www.JavascriptToolbox.com
http://www.AjaxToolbox.com
Jan 11 '06 #23

P: n/a
VK

Matt Kruse wrote:
Randy Webb wrote:
Even taking just Matt Kruse's Libraries, if you made a list of all of
the Global Names it uses...


Side note: When I release the new JavascriptToolbox.com, most of my
libraries will have been re-written to use closures and expose just a single
global name, or in some cases 2 or 3.

And I'm going to add this to my "Best Practices" document. When writing libs
and you don't know what other libs a user might include in their page, it's
best to try hard to avoid name collisions.

But I certainly wouldn't conclude that any library which exposes more than a
single name to the global scope is written badly.

To many programmers, writing code like this:

if (isInteger(num)) {
...
}

is just easier, cleaner, and more readble than

if (Validator.isInteger(num)) {
...
}

so I don't think that exposing global names is necessarily always a bad
thing.


Of course not! My relevant post about it in this thread was exaggerated
for *irony*.

First of all there are function-shortcuts - like $() for
document.getElementById(). If one has to use com.vk.misk.$() instead of
$() then what a hell shortcut is that? :-)

Secondly there is still in use (though obsolete)
"TwoLettersPrefix_underscore" way introduced by Dreamweaver. During the
Browser Wars "XX_functionName" was a widely accepted standard. Of
course its limitation is obvious: say MM_ can be equally used by
Macromedia, Inc. and by some say Matthew Morgan. So the risk of name
collision is still rather high - but not *so* high.

Thirdly it is simply much more difficult to work only on the levels of
your own object because of JavaScript's "incontinence of this" flaw.
Namely object methods acting like these "smart clouds" from some sci-fi
movie. On constructor call they are all glued together in one unit with
a clear "this", but right after fall apart again. This forces to
continuously watch the context and keep it somehow manually, while the
context itseld is like a piece of ice on the plate: one wrong move and
it slides away. On a big project this continuos this'ing and {curling)
is time and attention expensive. It is *not* a reason do not use it -
but it is a reason why someone *may* use something else instead.

Jan 12 '06 #24

This discussion thread is closed

Replies have been disabled for this discussion.