Matt said:
You can't make everyone's decisions for them.
I don't even try to make peoples decisions for them. But I do try to
encourage the making of informed decisions.
If someone is looking for a technical solution,
you provide them with a technical solution.
If someone is paying me for a technical solution then I do try to create
the best technical solution that I am capable of, otherwise I would not
be able to take any pride in my work.
It's up to them to decide if it fits.
No, I would have said that it was up to them to come up with a
specification first (though not necessarily on their own).
If they want consulting to know whether it's the best option,
or if there are better ways to deliver content, then that's a
different issue.
Getting opinions on the best way of doing anything is an inevitable
consequence of using Usenet. If people don't want that then they need to
employ developers directly.
But have you thought about how this notion sits with your suggestion
that the individuals that employ javascript on their web sites should
not be expected to have more than a rudimentary knowledge of javascript?
How can someone with little knowledge of javascript make an informed
decision about the relative quality and suitability of javascript
implementations for any given context unless someone who has that
knowledge tells them what needs to be considered?
His job is to help me pick
a muffler, make sure it works for my car, and put it on.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^
See, you actually want a lot more than the abiity to demand something
and just have it handed over regardless. You want the people who have
technical skills to to bring them to the table if you don't have
them.
Likewise, a provider of technical solutions should
help pick the best solution, make sure it works,
and provide implementation details.
I don't have a problem with that in general, but helping to pick the
best solution certainly should include things like advising on the
appropriateness of the criteria.
If the user's requirements are "this should work in all
browsers anywhere" then that certainly changes the situation.
There is a running theme in your posts where you describe the people who
employ your javascript as "users". Given what you write I can see how,
from your perspective, they are users; your users at least. But they are
not users they are developers, designers, web site owners, and
ultimately clients. The user is the person sitting in front of their
browsers looking at the resulting web site. Making life easy for the
clients you consider your users isn't necessarily doing any good for the
real users.
When you say that this "changes the situation" you are implying that a
web site should not be expected to be functional on the Internet by
default. I would have thought that would be the reverse of the normal
client's expectations. My starting point would be to assume that a
public web site was expected to operate to normal Internet
interoperability standards by default and then examine the validity of
any reasoning that suggested detracting from that. It should be the
things that do introduce a dependency of some sort, such as data binding
or socket communication through applets or ActiveX that change the
situation.
But no client would specify every web browser anywhere, and no sane
developer would accept the requirement, because neither is capable of
being aware what every web browser anywhere means. There would be no way
to know if the result met that requirement and so no way of deciding if
and when the job was finished (for either party).
A specification of a list of browsers with which a commission will
function can be looked upon as a specification of test criteria that can
be used to determine that the delivered end result confirms with the
specification. But the Internet was designed around interoperability and
normal authoring principles, the application of suitable standard and
appropriate design can deliver a result that works (and should be
expected to work, even if that could not be made a specified
requirement) with browsers outside of the test set.
If the user says "it only needs to work on IE6" then
that may affect the solution selected.
When a specification says that something only needs to work on IE 6 it
means that it only needs to be demonstrated to be working on IE 6, it
doesn't mean that it must not work on any other browser, and it does not
mean that it only has to work on javascript enabled default
configurations of IE 6 either.
Anything that will cope with all configuration
permutations of IE 6 could be implemented in a way
that would work pretty much the same on all dynamic standards
compliant browsers (at minimum) for no additional effort in
script creation. Under those circumstances, and given a non-Intranet
application, it looks like the initial specification was not well
informed, or it was chosen for convenience in testing.
If you want to function as a consultant and tell people when
various technologies should be used, and the good and bad of
various design decisions, that's cool. There's a need for that.
There is a need for that.
I'd rather focusing on providing technical solutions that
can be implemented by people who have already decided that it's
what they need. It's more fun. IMO.
I could churn out javascript dependent half-ass hacks till the cows come
home, any fool could. But to implement a script such that it meets the
strictest design criteria, addresses and handles all of the issues,
exhibits planned behaviour in the face of every permutation of browser
environment and do so on a time scale equivalent to any less complete
'solution', that is a challenge. And for me a challenge is more fun.
Not to mention that you learn more from being challenged than from going
over the same ground time and again. Two years ago I was writing scripts
much like you write now, and I thought I know what I was doing, but at
least when I was introduced to the issues in browser scripting I was
willing to recognise them an learn to handle them. Your complacency is
going to mean that in two years time you are going to still be writing
scripts much as you do now, and continuing to contribute towards making
the Internet a worse place than it has to be.
Certainly.
If your requirement is to support all browsers, even without
javascript enabled, then you should do X.
If only certain browsers are required to be supported, then you
should do Y. If you require backwards-compatability, then you should
do Z.
And you accuse me of trying to fit everything into a box that I am
comfortable with. This is hardly a comprehensive list of web site design
requirements, but if X is normal internet authoring with
interoperability as the goal it must also satisfy Y under most
circumstances and Z much of the time.
It's up to the person implementing the site to determine what the
requirements are.
Who is the "person implementing the site"? The owner of the site, their
business managers, the project manager, the designer, the developers?
Aren't the requirements going to be hierarchical? Is a business manager
expected to comprehend the distinction between an unnecessary dependency
and an unavoidable one, or a designer the best person to be choosing a
menu implementation (rather than just deciding what it should look like
when implemented)? Shouldn't design be a collaborative process moving
through stages from the general to the specific, with the input form the
top of the decision making hierarchy maybe diminishing and the input
from the bottom end increasing as the process moves toward completion?
Then it's that web developer's fault for not understanding their
true requirements, and finding a solution which fit them.
The web developer certainly could have done better in that area. But
there is your problem again, web developers don't necessarily have the
skills to judge every aspect of what they are asked to do. They may know
everything that can be known about their own specialisation and next to
nothing about another. This individual seemed mostly concerned with
server-side scripting, but that wouldn't equip him to judge a javascript
implementation or comprehend the impact on accessibility that followed
from the HTML/CSS employed by that script.
It's certainly not the script author's fault for implementing
something that doesn't fit someone else's requirements.
But the script author was utterly misguided in creating a script for use
in a browser environment that detracted from the usability of that
browser for no apparent reason. Though in practice I have no doubt that
the actual reason was an ignorance of how to do any better.
Browsers have characteristics and scripts for use in browsers should
take those into account. Fonts can be scaled to suite the user, that
isn't a secret it is right there in the menus for anyone to see.
Then again the script author may have known that the menu could be
implemented flexibly but didn't care to learn to do any better and just
offered the script up on a take it or leave it basis, and the developer,
not knowing what criteria to apply to the choice of menu script, used it
because it was there.
That happens a lot, people who don't know any better lumber themselves
with problems by choosing inappropriate scripts because those scripts
are easy to find. Not knowing what they have done until a problem
manifests itself and then not knowing what to do about it. Assuming the
consequence of the use of a poor script has an observable manifestation,
which might not be the case when, say, a needless javascript dependency
is reducing turnover for a small business site as there will be not
turnover figures without the dependency against which a comparison could
be made.
Hmm.... if window.Option exists, and a call to it works, then an
Option object can be created. In every browser that I know of, if I
can create an Option object, I can add it to a select list. Except
for Opera 5.? which has a bug. That could be checked as a special
case with browser sniffing. By default, in case of any errors at all,
the javascript mode could be turned off.
Do you propose to _never_ add options to select lists? Because even
attempting to do so and seeing if it works will fail in some browsers
in some situations, in a way that cannot be trapped.
I have told you before, you start off with the OPTIONs defined in the
HTML and you test the dynamism of the browser by trying to remove them.
Then a worst case failure leaves those OPTIONs available to the user.
The same goes for the submit button, define it in the HTML and
conceal/remove it with a script and the whole implementation is much
simpler and no longer has any path that will leave the user without the
ability to use the form.
It is defining data/content for a script in any place other than
on the HTML page that is directly responsible for *needlessly*
introducing javascript dependency in the vast majority of scripts
that suffer from it. And it is a design decision, not something that
follows from the use of javascript as such.
You can't code for _every_ situation.
I can try.
Buggy browsers should not be supported.
Is there (or has there ever been) a single web browser that does not
have a bug?
All you are saying is that if a bug cannot be handled by your scripts as
you design them then it is the browser's fault, bugs your scripts can
cope with you don't consider a problem but that does not mean they are
not there (or are not bugs).
Now you're really reaching, Richard
Sure, it may be more work, but your argument was that it's not
possible - not that it was easy and quick.
No, I think you will find that I said "it cannot be satisfactorily
implemented", which is not the same as impossible, and certainly does
include a consideration of how many hoops have to be jumped through in
order to implement it.
Lots of cool things are extra work. If a person wants this
functionality on both server-side and client-side,
then they can do the work.
Which was my point. If they do it exclusively on the server these is no
extra work, and if they use a client-side implementation that degrades
there is no extra work (even if the degraded interface is not that
usable in this instance), but if they use a javascript dependent
implementation, and want reliability, they have to put work in to
compensate for the script.
A design that lumbers someone else with extra work to compensate for its
shortcoming is not a good design. In a team context designing scripts to
minimise the effort needed for their employment by server-scripting
colleagues is the best plan. And that is easiest achieved by having the
scripts manipulate the HTML (and get their date from the HTML) because
server scripting is optimised for the creation of HTML and the people
doing it know how to understand and write out HTML. While presenting
them with new and complex javascript data structures to learn and
assemble on the server is unpopular, error prone and a sure way of
needlessly introducing javascript dependencies.
Designs based around the manipulation of HTML page content also offer
easy paths of clean degradation, and consequentially facilitate
reliability in the face of any browser environment.
Besides, both client-side code and server-side code would surely work
off the same back-end logic, so outputing the requirement script
calls surely would not be as much work as you would make it seem.
Above a certain level they are the same, but the specific form input
handling is very different. In a standard form handling script the input
from the HTTP request is validated and if it validates it is processed
and some sort of result response is generated, and if invalid it is
returned to the user for correction. You plan adding the handling of
partly completed form data and the construction of incremental stages in
the multiple selection.
The handler still has to do what it would have done otherwise but now it
is also interested in the user's current stage in the selection process
and re-assembling the party completed form to be returned to the user,
and it has to know at which point the form is finished so it can do the
validation instead. And if the form doesn't validate it is going to have
to handle the possibility that the user may want to change the
selection.
It is trivial to implement a progressive selection as a wizard style
interface with back and forward options but doing it all in one big
handler for a form introduces quite a lot that needs additional thought.
Plus the turnaround on the server would be slower if the whole form was
going back and forth each time.
Richard.