Matt said:
"Value" is decided by each individual person,
It certainly can be, but without (at least some) common criteria there
is not much point in those people trying to talk to each other about
"value". Yesterday "value" was proportional to instances of script
deployment, I don't agree but at least that is concrete enough to be the
subject of rational consideration. Today it is entirely a matter of
individual opinion.
and by extension the general public.
The general public (even just the Internet using portion of the general
public) are unlikely to have any well formed attitude towards browser
scripting. The majority will be totally unaware of browser scripting as
a distinct aspect of a web page/site, and script design should aim to
keep the role of scripting in a web page/site transparent to users.
For some people, the ability to implement
functionality in 10 minutes yet have it break in 2% of browsers
You do love stating numbers without any apparent relationship to
anything.
might
have higher value than a custom-built solution that doesn't break in
any bowser but takes 8 hours to code and test. For a flashy personal
fun site, the deciding factor for "value" might be a really slick
interface with lots of options, and quality of code and browser
support might not be important at all.
If it is an informed decision appropriate to the context then that is
fine. Though when extremely questionable statistics start appearing in
the criteria you have to wonder how informed the decision could be.
In terms of javascript coding, I can think of a number of factors
which would contribute to a person's perception of 'value' for a
given solution:
From the list you appear to be looking upon this person exclusively as a
potential purchaser (acquirer) of pre-existing browser scripts. Rather
than, say, the commissioner of browser scripts for a particular task, or
the project manager of a team, including javascript authors, creating
commercial web applications in a software house, or any of the many
other people who might have a reason for weighting these and other
factors.
Implementation is a relatively vague term when used in this context. It
is common to talk of implementing a specification, but ease of
implementation in that context is a quality of the specification not of
the script that will be implemented from it. Ease of implementation
might also be a quality of a design, existing prior to any script that
represents the implementation.
Given the previous discussion I assume you mean ease of deployment,
employment or use in a web page/site. The ease of that is related to
various factors including the quality of the documentation (which is
independent of the script) and who is doing it.
The author of a script would usually find it trivial to deploy without
any documentation at all, while a complete newcomer might struggle even
with comprehensive and well-written documentation and a script designed
to be easy to deploy. Then there is quite a spectrum in between where
different factors contribute to ease of deployment/use, and factors
contributing to the significance of the javascript code to its ease of
deployment.
Take deployment through JSP tag libraries, for example, It would be
quite feasible to use a script implementation that was objectively
complex to set-up and initialise within a tag library because that task
would be done once by the specialist who created the tag library code.
All of the details would be completely concealed from whoever was
eventually using that tag library, allowing easy deployment of that
script by people who would be incapable of using actual javascript code
independently. But a script written with the intention that it be used
directly by those same people would do well to be as simple as a JSP tag
to employ.
So in the case of the code inside the tag library, effort put into
making the javascript easy to set-up and initialise has little reward as
it is only occasionally done, no matter how many times the corresponding
tags are used. That effort would be better directed at making the script
as well suited to its use within a tag library as possible. While effort
put in to reduce the set-up and initialisation complexity of the script
for direct deployment is very significant because that would be done
repeatedly, and by people who would not normally be expected to have
more than a minimal understanding of javascript.
- Browser support (including how well it degrades)
- Extensibility
I am not sure extensibility should be in here at all. It speaks of your
library mentality, where you want to be adding ever more and more
features. But that produces the code bloat problem that is one of the
main arguments against libraries as a concept in browser scripting.
Modularity should probably take the place of extensibility in this list.
Small, direct, re-usable components so that they can be mixed and
matched to suite the application.
The availability of features doesn't mean much if you don't intend using
them. Beyond the need for a script to have all of the features that are
wanted/needed (specified), features that are not used are just code
bloat (and maybe higher memory/resource consumption, slower execution
and download, etc.).
- Price/licensing/restrictions
Price (or cost) certainly. Licensing and licensing restrictions are
closely related to the purchasing (acquiring) of software products.
Browser scripts themselves are not necessarily software products, they
may be, for example, created in-house and used as part of, say, a web
application product. They would still have an absolute cost (in
developer hours), and knock-on cost implications resulting from their
design. But licensing would not be a issue at all.
Again very much related to the extent to which a browser script is
itself seen as the product.
- Quality of coding (and by extension, ease of maintenance)
- Speed
Speed of execution, speed of download, creation deadlines. A DHTML
animating script needs to be fast (generally), while form validation
execution speed probably doesn't matter at all (unless it is really
bad).
In your eyes, quality of coding and degrading gracefully are
the most important factors, above all else, right?
I have never said this. I have said that quality is an absolute
characteristic of code and so can be used in objectively comparing code
(rather than your rather flexible criteria of "value"), and I have said
that quality is more likely to be achieved by attempting to achieve it.
What I do consider more important than (almost) anything else is design.
Design that is appropriate for the application, specification and the
context, design that encompasses established software design principles,
applies recognised applicable best practices, facilitates effective
testing and eases implementation (and to some extent documentation).
The stress that I place on graceful degradation follows from the
realisation that it is necessitated in a script intended for use in a
web browser in an Internet context.
Much as the author of a web application that is to operate over HTTP
needs to recognise that HTTP has characteristics that need to understood
and handled at the design stage of that application, the author of an
Internet browser script needs to recognise that browsers also have
characteristics that need to be handled at the design stage. One of
those characteristics is that client-side scripting is optional, another
is that it is unreliable when it is available. Failing to recognise
those (and other) facts, and handle them, is failing to design/author an
Internet browser script.
Graceful degradation is nothing but one of a number of design
prerequisites in scripts intended to be used in web browsers over the
Internet.
Designing for another context, say an Intranet, where client-side
scripting is not optional (because someone has decided that it is not)
and scripting is not unreliable (because only a finite set of browsers
are intended to be used) removes those factors from the list of
prerequisites. The result of such a design will not be a script suited
for use in an Internet browser context.
Clean degradation offers the only practical way of handling the optional
client-side scripting and the variation in DOMs that results in
unreliability in scripts, and it is best handled at the design stage as
attempting to bolt it on afterwards impacts significantly on many other
significant aspects of any script (ease of deployment being a pertinent
example).
A combination of good design and skilled implementation will tend to
result in a quality script, but a combination of appropriate design and
knowledgeable implementation should be enough to produce a reliable and
functional script.
A solution cannot have high
value without those being top-notch?
We are getting further away from any definition of "value" as time goes
by.
But to others, the important factors might be different. The
determination of 'value' can vary greatly.
See what I mean?
In fact, you place almost
no importance on 'ease of implementation'
That isn't what the archives would show (assuming we are actually
talking about ease of deployment again), I have actually written quite a
lot on designing for easy deployment. It should be a factor in a design.
Its significance is specific to the expected circumstances of
deployment.
or 'available features'
(since you disagree with the concept of libraries entirely), which
others might put at the top of the list.
As I said, features beyond what is needed (or specified) are potentially
negative.
I argue that my solutions
provide higher value to some people because we are targeting
different factors as priorities.
All else aside, you promote scripts you have designed without clean
degradation as Internet browser scripts, and then come up with spurious
justifications for not considering normal browser characteristics in
your design. I am just not going to see that as good (or even
appropriate) design, and targeting them at people who don't know enough
to recognise the consequences, or making them easy to deploy for those
people, is not going to change that.
Because I believe you are wrong.
Technically, I think linux is better than Windows as an OS.
However, I use Windows daily because it provides more value to me.
It's "better" for me. Even though I don't believe it's technically
superior.
If you make a judgement on technical criteria then technical superiority
relates to "better", if you choose other criteria then they rank
"better". You chose "not technically ideal" and "follows all the
technical ideas" as the characteristics for comparison, which look like
technical criteria to me (nothing else is implied about the hypothetical
scripts under discussion).
heh, that is _everywhere_ in the world. How many people use Windows
with bugs and viruses and broken features, because it is more
convenient than more technically superior solutions?
WTF has that got to do with anything? We are talking about people who
purport to be professionals providing professional services to clients.
The question would be whether a professional should be
recommending/supplying software to a client because it was convenient
for them. An ethical professional should be doing what they thought was
best for their client. There are many valid reasons why that actually
may result in recommending a Windows OS over another. But they would
relate to the circumstances of the client not the convenience of the
"professional".
How many web
developers receive requests for features every day that are
technically stupid, but must be implemented because it adds
convenience for the users?
How do "technically stupid" and "adds convenience for users" get to
appear together in the same sentence? If something is technically stupid
it stands a very good chance of inconveniencing users. Or are you using
"users" to refer to someone other than the person sitting in front of
the browser again?
Your date picker script on your example page would be unacceptable to
most clients I've worked with because of the UI.
Specifically?
You dynamic select list script degrades nicely, but in a form that
would be unacceptable to most.
Isn't that what I have been saying from the outset; that the dependent
select list concept has the potential for clean degradation but the
degraded state is unsatisfactory as a user interface? Making a fully
server-side approach the easiest way of achieving the combination of
reliability and functionality in a task that is a fairly common
requirement, but usually pre-supposes the availability of server-side
scripting.
But in circumstances where my UI is being unsatisfactory yours is
non-functional.
^
There should have been a "not" in there.
Perhaps. I've seen it happen. Repeatedly. Have you not?
I am yet to meet a businessman (or woman) who would turn down the
opportunity to make money when all else was equal.
So you're not doing feature detection, but rather not using a feature
entirely. Logical, of course, but it's still an example of a bug which
cannot be detected through normal means.
One example from a browser that will build 10,000-odd objects for an
average web page, allow their error free use and facilitate feature
detection on all the rest of them and their properties. Appending child
nodes to attribute objects is something that does not need to be done at
all, so it is not a big deal to not be attempting it.
Feature detecting is not diminished in its practicality by locating one
or two fatal problems in arias of the DOM you would not normally be
going into.
Feature detection has grown out of a need that no other strategy came
close to satisfying. It is practical, it is implementable and it works.
And much as your assertions that it would be of no use in the case of
Opera 5.02 proved pessimistic, once you become familiar with the
techniques and the proper application of the strategy you will find that
it can handle everything you are likely to throw at it. (And it isn't as
if there is any contender as a viable alternative, short of the
acceptance of unreliability and uncontrolled failure.)
... . In fact, the first
result in a search I just did was
http://www.quirksmode.org/js/options.html which states "You cannot
create or delete options in Operate 5.02- on Windows". I guess I
wasn't the only one to reach such a conclusion
Jim wants me to put a link to quirksmode.org in the resources section of
the FAQ. I probably will but I am not so sure it is a good idea. Finding
them peddling old wives tails doesn't help.
At the end of the day, it's pretty clear that we have different
ideas about javascript development. I think libraries are
fantastic, and have a lot of value for many developers.
You disagree.
And I didn't turn out to be alone in that opinion did I?
I think your
code is clearly advanced and looks technically excellent, but I also
think some of it is completely unreadable for most people (date
picker code, for example).
The date picker code is not exactly formatted for being read. The
commented development version would be easier to understand, but it is
too big a script to be practical to document as an example for learning
purposes.
You believe in being technically excellent
first, and useable second. I believe in the opposite.
Do you have any specific reasons for attributing that belief to me?
It's a shame that someone like you who is technically talented in
coding isn't willing to make implementation suggestions for scripts
like mine, which are highly useable, have a lot of features, can be
easily implemented, are well supported, and work in the way that many
developers want them to.
I have made suggestions; I suggested you design was fundamentally
ill-suited to the environment of its application. You don't believe me
so there is not a great deal more I can do.
No one is capable of creating the most ideal solution
by themselves, IMO. Multiple people working together to
create the best possible solutions would be fantastic.
<snip>
My experience of problem solving says: stage 1. Identify the problem.
And uses that to define what would qualify as a solution.
Richard.