V
vbgunz
David said:Because I don't want to give it to him.
Why would you care?
there needs to be a DOM library. anyone know of one?
David said:Because I don't want to give it to him.
Why would you care?
Because I don't want to give it to him.
So sell it. <g>
Because I don't want to give it to him.
Why would you care?
vbgunz said:there needs to be a DOM library. anyone know of one?
Why not? What would it hurt?
Because maybe I would switch to it if it was better than what I'm
already using.
Until a better alternative _actually exists_, people will continue to
use the library that they find best suited for their task.
Your argument sounds like:
1. All libraries suck
2. I know the better way to do it
3. I have a library that is better than any other out there
4. You can't have it
It's really a pretty simple question that the critics here never want
to answer:
Let's say a group of developers are building a webapp that needs some
Javascript development. There is no in-house library to start with,
and all of the developers are just average at javascript, at best.
What would be your recommendation? I see some possibilities:
1. Use a freely-available library that isn't perfect, but has lots of
examples, speeds up development, and doesn't appear to break in any
cases
2. Write everything from scratch, which might be lower quality than
the libraries and take too long
3. Hire a competent developer to write everything from scratch, which
again might take too long and may not be an option financially
4. Make a post to comp.lang.javascript asking which library to use and
be told that they all suck, and awesome library code exists but you
can't have it.
5. ???
In a real case like this, how would you recommend that people proceed?
For example, I have been distributinghttp://PointedEars.de/scripts/dhtml.js
as free software under the GPL v2 (or later) for almost five years now
| > [jQuery criticisms]
| > Enough is enough. If you use jQuery after reading this, you are
| > deserve everything you get.
|
| Thank you for your detailed reply. I am going to investigate these
| things further and find out if jQuery can be improved.
|
| I haven't done an extensive look "under the hood" of jQuery, but I
| have looked at some of the code. I've also noticed examples of
| questionable code, but I assumed there was a reason for them doing
| things the way they do. I've never had a problem with jQuery not
| functioning correctly. As long as I see the expected behavior right
| now, the underlying code can be streamlined and improved. All the
| issues you mention can be fixed and improved while still maintaining
| the same API, making the library more solid without the end-user even
| knowing about the changes.
|
| > If
| > you take an average JavaScript developer and give them this mess to
| > play with, are you really empowering them to write competent
| > applications?
|
| I still think so, yes. Having a developer program to the API to
| simplify their development is a good thing. It's a layer over the low-
| level stuff, but that enables them to be much more productive. If
| there is a problem found in the library behavior, it can be fixed.
|
| > If you use or advocate jQuery after today, you are stupid.
|
| I will continue to use it and advocate it. I'll also try to improve
| it.
|
| I guess I'm stupid.
|
| > > (Previous time to develop functionality) - (current time to develop
| > > similar functionality) = Time Savings
| > > Time Savings * Pay Rate = Money Saved
| > Oversimplification.
|
| Really?
|
| > > You would recommend that we stop using it and start coding from
| > > scratch?
| > Why do library-advocates invariably see just those two choices?
|
| Because library-critics rarely provide any real answers or
| suggestions. Just criticisms.
|
| It's easy to question everything. It's much harder to provide a real
| answer.
|
| I have little respect for people who constantly bitch about what
| everyone else provides for free to the world, yet never actually
| provide anything themselves.
|
| If everyone else is doing it wrong, and you know how to do it right,
| why don't you show the world how it should be done? Those who are the
| supposed "experts" that bash everyone else rarely put their own
| libraries and code up for public consumption and criticism. I have
| respect for people like Peter who is obviously an intelligent and
| knowledgeable contributor to this group and has also put his own
| library out there. If the more vocal critics would do the same,
| perhaps these other "horrible" libraries would die out and the world
| would be a better place.
|
| Matt Kruse
Matt said:this.isIE4DOM = typeof document.all == "object" && !this.isOpera;
Really?
Thomas said:[...] You may rest assured that I will continue to review
and, where necessary, refactor the code on a regular basis.
Free stuff is often worth not much more than the price paid. If yours isI have, in the past, considered selling JavaScript libraries and
widgets, but it seems to me that too many people are giving them
away. Factor in that most potential customers are unable to evaluate
code quality and you get a pretty lousy market outlook.
Free stuff is often worth not much more than the price paid. If yours is
enough better than the free stuff, your market might be larger than you think.
But don't you think a large portion of that market would just steal
the code?
You just don't get it. There is no single library that is appropriate
for every task.
I am tired of hearing the "write everything from scratch" argument.
That is not the only other choice.
For the last time, there is no "magic bullet" general purpose library
that is suitable for all tasks.
These "real" people should
proceed to either hire competent developers or learn JavaScript
themselves.
Douglas said:I would urge many of the regulars to reconsider
their positions.
Some of the Ajax libraries have gotten quite good lately.
They eliminate most of the browser inconsistencies,
relieving one of the major pain points in browser
programming. And they shift the level of programming up
a level, so that you can focus more on your application,
and less on the browser's many limitations.
The biggest problems with the libraries are that there
are too many of them,
and that there are some problems with the browser
architecture (particularly with security) that are
unsolvable, given the current state of standards and
browser implementations.
It looks like the too many problem will solve itself with
a shake out.
I am predicting that the winners of the shake out will be
Dojo and YUI because they are the best supported and
documented.
Good use of an Ajax library can improve your productivity
and improve the portability of your application.
The library makers scramble when every new browser ships
to find the workarounds for the new bugs and gotchas.
They are much better at that game than you want to be.
The several recent threads about JavaScript libraries has seemed quite
confrontational to me. I'm sure I've contributed to that myself, so I
apologize. Maybe it was perceived that I was being difficult on
purpose,
but I can say that it was out of frustration,
and not out of
intent. I feel it's an important topic though,
so I'd like to give
everyone the benefit of the doubt and try to work through what I think
are some communication issues.
David, is it possible you're misunderstanding Matt's intention? It may
be that he's not looking for a single library to be used for every
task, but is simply interested in being able to leverage preexisting
code written by others. Isn't this a common desire for programmers? If
we begin a networking project which requires C programming, we don't
start by developing a TCP/IP library, right?
For example, if someone wanted to utilize regular expressions in
Common Lisp, one option would be to write their own regular expression
library, and another option would be to simply use CL-PPCRE. There is
a web site:http://www.weitz.de/cl-ppcre/which provides
documentation, etc. This library has received great reviews from the
Common Lisp community. It's important for newcomers to Common Lisp to
be aware that such libraries exist to avoid reinventing the wheel.
In the other thread, I was truly trying to discover if a similar
situation existed in the JavaScript world i.e. well known public
libraries that are worthwhile to use.
Do you think it's reasonable for
JavaScript programmers (of any level) to be interested in reusing
preexisting code written by others in this way - not to shield them
from learning JavaScript, but to simply save some coding/testing/
debugging time?
Maybe there have been multiple "from scratch" posts because that
phrase has a different meaning with different people. I think other
people have been frustrated from this as well. I won't speak for Matt,
but when I see "write everything from scratch", I think the author is
referring to writing code themselves instead of utilizing preexisting
code from other sources.
So, when several people make the assertion that "you don't have to
write everything from scratch" or "you don't have to write it all
yourself", but don't provide a means for accomplishing that (i.e. a
source of preexisting code), it sounds like a circular argument and is
frustrating - for both parties I expect.
I doubt that anyone would disagree with that statement. I also agree
that the larger a library is, the greater the possibility that you
won't need a large portion of it for a particular task. I think it's
probably common for people to inquire about large, general purpose
libraries such as Prototype, JQuery, Dojo, YUI, etc. because those are
the only ones they're familiar with because of the "press" they
receive.
It's possible that they aren't looking for that in particular (e.g. a
large bloated library), but feel the only way they can reuse
preexisting code written by others is by utilizing one of them, and so
are interested in trying to determine if learning/using one is a good
investment.
Do you think learning JavaScript and utilizing someone else's
preexisting code is mutually exclusive?
I'm not trolling, it's a
serious question. In every other language I've developed in
(Assembler, C, C++, Java, Ruby, Common Lisp, etc.) I've utilized
libraries written by others - not to avoid learning those languages,
but to be efficient. JavaScript running in a browser has some
challenges those other languages don't share with respect to library
use, but in principle, I would still think the benefits of library use
would apply.
This is why I gave the logging example "library." It is not clear what
size, scope, and purpose of code you want to reuse and the criteria
keeps changing yet you still want an answer. If any size, scope and
purpose is sufficient then the logging example is sufficient. If the
size, scope and purpose matter even a bit then they must be specified
and you will get a much more useful answer.
When I've been involved with other online communities related to
libraries, I get a sense of "I don't want to learn JavaScript
Code reuse is an important topic.
The fundamental libraries seem to be for events and Ajax. Really with
those two libraries you can build everything else quite easily. I
wrote my own event and Ajax libraries (roughly based on the YUI API)
and you can even find them available on the web.
It has worked out
much better than using one of the big name libraries. I still receive
emails from the YUI and Prototype ticket systems for tickets I created
over a year and a half ago. I didn't have time to wait for that long.
I also don't have any of the bloat of features that I don't use and
don't even think are a good idea to use.
Using preexisting code probably means different things to different
people.
What makes you think that modules developed for my own use would be
appropriate for somebody else?
I think you misunderstand my intention. I have no plans to publish
the next free library. I might post some low-level functions, which
could be of interest to people who need a foundation to start their
own libraries.
You just don't get it. There is no single library that is appropriate
for every task. That is what jQuery, Prototype, etc. try to be and
they fail miserably at it.
And no, I am not interested in
publishing and supporting my codebase as a free library. Sorry.
I am tired of hearing the "write everything from scratch" argument.
That is not the only other choice.
For the last time, there is no "magic bullet" general purpose library
that is suitable for all tasks.
I'm sorry Peter, but if you continue to insist that what you provided
was a realistic solution to my question (regardless of how ill-formed
you may have felt it was)
I think it may be difficult for us to have
a conversation. I noticed you put "library" in quotes, so maybe you
sensed it was not a reasonable solution also.
If you honestly feel that you would consider creating a web site, for
example, to offer that code to the public as a "library", then I
apologize, but I seriously doubt that is the case.
Do you now
understand why I included "publicly available" as a criteria?
Anyway, if any library/module authors who were proud of their code
were reading any of these threads, I expect they would have mentioned
their offerings by now, so we're probably beyond beating a dead horse
at this point, I think it's probably a bloody pulp
I believe you, and others, may have projected that attitude onto
people who don't share it.
That's probably where the "straw man"
arguments keep coming from - not from maliciousness, but from not
bothering to actually understand where people are coming from and
simply assuming.
Do you reuse code from others? If so, what are the sources of code
that you've found valuable.
Well, why the heck didn't you mention those instead of the logger
thing ?!
What's the URL?
If I end up writing a lot of code myself, that's fine, but it doesn't
make sense to reinvent the wheel if you don't have to. I have to say
the effort to have a dialog here has been much more than any other
newsgroup. Discovering some valuable, time saving libraries for Common
Lisp was straightforward.
Yes, but "preexisting code from other sources" should be pretty clear,
even in this crowd, right? "preexisting" => "it has already been
written"
"from other sources" => "I didn't write it"
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.