M
Matt Kruse
Richard, I believe that you are being intentionally obtuse, so I won't
respond to everything you've written.
I believe we have different views of the world, and maybe both of our views
are correct in their owns ways, I don't know. I do know that I have
thousands of sites who have benefitted from my approach, and thousands of
users who have thanked me or donated money to me. And some emails in
response to this thread and others expressing disgust with your attitude in
this group. So it's clear to me that I'm not nearly as "wrong" you wish to
imply. But I'll address a couple of your points...
Obviously the world is black and white to you, either people agree with you
or they are wrong.
But your willingness to write over 100 lines of response, yet not point out
a single technical criticism of code, says to me that you'd rather argue
endlessly and prove your correctness than actually accomplish anything.
That's a bummer.
(and, btw, I certainly never claim that my code is perfect - I'm always
working to improve it, as time permits. In many cases, I already know how to
improve it, I just don't have time to do so.)
Not everyone wants or needs to understand javascript in order to use it.
I don't subscribe to such elitist attitudes.
Yet no other suggestions or url's are posted?
Again, you're more interesting in arguing than anything else.
You apparently have no real-world sites or libraries to put forward as
examples of successful implementations of your views?
I think that's a highly flawed definition.
I think a solution accomplishes a goal given a set of requirements.
If supporting non-javascript-enabled browsers isn't a requirement, for
example, then the set of available solutions may change.
Furthermore, I don't think a javascript solution needs to also hold the hand
of the developer and instruct them on how to degrade gracefully, or decide
if they really want to use javascript at all. That's outside the scope of a
javascript library. The user should understand and decide on those issues
before deciding on the javascript solution needed to solve its part.
True, but it's also useless by itself, and requires javascript knowledge to
assemble anything that actually accomplishes a goal.
I build small, efficient components also. They exist in my libraries. I just
choose to assemble them into larger scripts which solve a bigger problem.
Exactly. And that's the purpose of a library of functions, of course.
But, you hate libraries. You want to re-write everything all the time.
There are some requirements which are very basic and very common. Creating
libraries for these functions is very practical.
For example, having a "popup date picker" for a date input field is a common
requirement. Yet, it's a pretty complex task to actually implement. Why
would a person who is not interesting in learning or writing javascript
build it from scratch with low-level components, rather than using a
pre-packaged solution like mine or others?
Even though the size of my library is nearly 35k, it provides a lot of
functionality out-of-the-box. Most people can have it working very quickly,
have all the features they need, and have all major browsers supported, with
very little effort. If used in many pages, it's probably cached anyway, so
it wouldn't impact speed much at all.
If they built it from scratch to have the same functionality as you would
propose, they may spend 50 or more hours of coding and testing, and spend a
large amount of money to get exactly the same result - or something that
isn't as complete without them even realizing it.
To me, the first option is clearly superior for _most_ people.
Well, you can certainly find flaws in that library given the current state
of web browsers. I've debated about whether to leave it up there anymore,
but I do still find people who need it, so I've left it up.
It was written way back when 4.x was the most current Netscape browser, and
using DOM methods wasn't even an option yet. Way back then, if you wanted
client-side table sorting, it was a tough, tricky thing to implement.
_Especially_ if you wanted to support Netscape 4. Can you point me to
another client-side table-sorting script which supports Netscape4? They
might exist, but they are rare indeed.
That specific library exists for people writing web apps where javascript is
enabled, and users might be using Netscape 4. Believe it or not, that
situation exists more than any of us would like! And for developers in this
situation, looking for a client-side table sorting script, my library offers
a very unique and functional solution for them, when writing it from scratch
might cost them considerable time and cost.
In a wide-open internet situation, perhaps.
I recently had an email exchange with a user whose client still had
Netscape4.78 as their standard browser. All of your fancy DOM stuff simply
didn't apply to him at all, and he was thankful that there were solutions
out there that still supported ancient browsers. Clearly, not all peoples'
requirements are as simple as you would like to believe.
I certainly understand your point. Look at my dhtml tree:
http://www.mattkruse.com/javascript/mktree/
That's an approach to adding javascript functionality to plain html content,
and I love the idea quite a bit. But it simply doesn't work in all
situations.
No, I understand exactly what you're saying, and I've done plenty of things
implemented in the ways you describe. However, NOT ALL SITUATIONS ARE THE
SAME, despite your insistence that everything fit into your pre-defined box.
Degredation strategy is up the person implementing the library, not up to
the library itself.
You are very wrong, sir Richard.
It means that I have 24 hours in a day, and I use them in the ways that are
most beneficial to users of my code, and profitable to me.
If that doesn't please YOU, I simply do not care.
respond to everything you've written.
I believe we have different views of the world, and maybe both of our views
are correct in their owns ways, I don't know. I do know that I have
thousands of sites who have benefitted from my approach, and thousands of
users who have thanked me or donated money to me. And some emails in
response to this thread and others expressing disgust with your attitude in
this group. So it's clear to me that I'm not nearly as "wrong" you wish to
imply. But I'll address a couple of your points...
Richard Cornford said:What would be the point of enumerating the many specific implementation
flaws in your code when you refuse to even recognise the fundamental
design flaw?
Obviously the world is black and white to you, either people agree with you
or they are wrong.
But your willingness to write over 100 lines of response, yet not point out
a single technical criticism of code, says to me that you'd rather argue
endlessly and prove your correctness than actually accomplish anything.
That's a bummer.
(and, btw, I certainly never claim that my code is perfect - I'm always
working to improve it, as time permits. In many cases, I already know how to
improve it, I just don't have time to do so.)
And an attitude that it is
better to refer people to copy and paste scripts, rather than assisting
them in better understanding the task and its issues, will not assist
them in untangling the code within those libraries.
Not everyone wants or needs to understand javascript in order to use it.
I don't subscribe to such elitist attitudes.
That doesn't seem like a search combination calculated to locate code.
Yet no other suggestions or url's are posted?
Again, you're more interesting in arguing than anything else.
You apparently have no real-world sites or libraries to put forward as
examples of successful implementations of your views?
You have a very personal definition of "solution". To my mind a solution
modifies a situation such that there are no problems remaining.
I think that's a highly flawed definition.
I think a solution accomplishes a goal given a set of requirements.
If supporting non-javascript-enabled browsers isn't a requirement, for
example, then the set of available solutions may change.
Furthermore, I don't think a javascript solution needs to also hold the hand
of the developer and instruct them on how to degrade gracefully, or decide
if they really want to use javascript at all. That's outside the scope of a
javascript library. The user should understand and decide on those issues
before deciding on the javascript solution needed to solve its part.
Encapsulating commonly needed and specific (usually low level) tasks
into efficient small components is a viable way of authoring re-usable
code.
True, but it's also useless by itself, and requires javascript knowledge to
assemble anything that actually accomplishes a goal.
I build small, efficient components also. They exist in my libraries. I just
choose to assemble them into larger scripts which solve a bigger problem.
And once any individual component has been
rigorously tested in isolation its behaviour can be relied upon to
contribute towards the creation of a reliable larger application.
Exactly. And that's the purpose of a library of functions, of course.
But, you hate libraries. You want to re-write everything all the time.
It is
also more practical to build such a collection in a response to
requirements
There are some requirements which are very basic and very common. Creating
libraries for these functions is very practical.
For example, having a "popup date picker" for a date input field is a common
requirement. Yet, it's a pretty complex task to actually implement. Why
would a person who is not interesting in learning or writing javascript
build it from scratch with low-level components, rather than using a
pre-packaged solution like mine or others?
Even though the size of my library is nearly 35k, it provides a lot of
functionality out-of-the-box. Most people can have it working very quickly,
have all the features they need, and have all major browsers supported, with
very little effort. If used in many pages, it's probably cached anyway, so
it wouldn't impact speed much at all.
If they built it from scratch to have the same functionality as you would
propose, they may spend 50 or more hours of coding and testing, and spend a
large amount of money to get exactly the same result - or something that
isn't as complete without them even realizing it.
To me, the first option is clearly superior for _most_ people.
Again you are applying your unusual definition of "solution". Take you
table sorting library...
Well, you can certainly find flaws in that library given the current state
of web browsers. I've debated about whether to leave it up there anymore,
but I do still find people who need it, so I've left it up.
It was written way back when 4.x was the most current Netscape browser, and
using DOM methods wasn't even an option yet. Way back then, if you wanted
client-side table sorting, it was a tough, tricky thing to implement.
_Especially_ if you wanted to support Netscape 4. Can you point me to
another client-side table-sorting script which supports Netscape4? They
might exist, but they are rare indeed.
That specific library exists for people writing web apps where javascript is
enabled, and users might be using Netscape 4. Believe it or not, that
situation exists more than any of us would like! And for developers in this
situation, looking for a client-side table sorting script, my library offers
a very unique and functional solution for them, when writing it from scratch
might cost them considerable time and cost.
Now contrast that with the DOM table sorting scripts. OK, they only work
on javascript capable dynamic DOM browsers (but those fall on the
acceptable side of your 80/20 criteria anyway)
In a wide-open internet situation, perhaps.
I recently had an email exchange with a user whose client still had
Netscape4.78 as their standard browser. All of your fancy DOM stuff simply
didn't apply to him at all, and he was thankful that there were solutions
out there that still supported ancient browsers. Clearly, not all peoples'
requirements are as simple as you would like to believe.
You library solves one problem by introducing another, the DOM version
solves the same problem (to the same criteria of acceptability) but does
not introduce any other problems into the situation.
I certainly understand your point. Look at my dhtml tree:
http://www.mattkruse.com/javascript/mktree/
That's an approach to adding javascript functionality to plain html content,
and I love the idea quite a bit. But it simply doesn't work in all
situations.
maybe the way that the inappropriateness of the fundamental design of
your libraries would require you to jump through hoops to create a
reliable system that is contributing to your impression that creating a
reliable system is difficult, time-consuming and expensive.
No, I understand exactly what you're saying, and I've done plenty of things
implemented in the ways you describe. However, NOT ALL SITUATIONS ARE THE
SAME, despite your insistence that everything fit into your pre-defined box.
I would say that visiting a demonstration of any javascript code with a
javascript disabled browser is a very obvious test for the acceptability
of its degradation strategy
Degredation strategy is up the person implementing the library, not up to
the library itself.
You can cater for everyone, but not caring to try is guaranteed to mean
that you never will.
You are very wrong, sir Richard.
It means that I have 24 hours in a day, and I use them in the ways that are
most beneficial to users of my code, and profitable to me.
If that doesn't please YOU, I simply do not care.