It's certainly easier to declare your conclusions as superior when you
dismiss the opposing viewpoint outright.
I thought I dismissed you outright, but like a bad penny, you have
turned up again to suck all of the rational thought out of this
discussion.
Declaring that development in the "Real world" requires something like
jQuery does not represent a rational viewpoint. It is a frequently
(and irritating) mantra spewed by those who have neither rational
views nor points. I don't care to counter such non-arguments any
further.
I am surprised you still feel the need to respond to me, then.
I feel the need to stop the spread of misinformation and bad advice
related to browser scripting. I, for one, am tired of tripping over
easily preventable mistakes every time I browse the Web. It sometimes
seems there is not a usable page on the Internet. Even worse,
disabling scripting does not typically increase usability, but only
serves to expose additional misconceptions of the responsible
designers and developers. And most irritating of all, any attempt to
dispel myths and ill-conceived notions about Web development seems to
draw legions of half-wits who proceded to dilute relevant criticism
with irrational (and often nonsensical) ramblings. Call it "esprit de
twits."
No, I see an upgrade to IE7 happening in a year or two. I've already
tested with IE7 and the app and jquery work fine with it. A move to
If your app works in IE6, then it should almost certainly work in
IE7. Despite a half-dozen year gap between the two releases, MS
changed virtually nothing in their ECMAScript implementation.
IE8 may be many years off, and I don't predict any problems with that,
either.
Your prediction seems short-sighted to me. If, as reported, IE8 will
be markedly closer to the standards-based browsers, then your only
recourse when using an IE-sniffer like jQuery will be to force your
pages to "thunk" back to IE7 compatibility mode. In other words, you
have painted yourself into a corner where your code cannot take
advantage of future improvements to a user agent that is currently
riddled with flaws and outright failures. While the rest of the world
moves on (at least those who had the good sense to avoid browser
sniffing libraries), your application will be forever stuck in the IE
dark ages.
I should write something like this up in a page that could be
referenced when arguments like this come up...
Something like what? How to leverage the inherent obsolescence in
libraries like jQuery to maximize past, present and future
incompatibilities? There are enough half-baked browser scripting
articles out there as it is.
I can think of a number of things that would need to be considered
when deciding what javascript strategy to use in a project. For
example,
The first of which is to define the goals of the project.
a) What is the target audience? Is the user environment known? Is it
subject to change? Will js be required?
Well, if JavaScript will not be required (and it should rarely be an
absolute requirement), then you don't need a JavaScript strategy.
b) How critical is performance?
Performance of what? You haven't defined what the project is supposed
to do.
c) What types of things will javascript be used for now and in the
future?
Hard to say at this unspecified project.
d) How many developers will be writing javascript code?
As many as it will take to reach your unspecified goal within an also
unspecified period of time.
e) How experienced are the developers with js coding?
The developers should be chosen according to the goals of the
project. You don't bend a project to suit arbitrary developers.
f) What is the project's budget?
It seems you are getting further and further off the subject at hand.
What is the point of this checklist?
g) Are there any existing requirements or standards used by the
client, or by the development team?
Again, you are trying to bend a project to best match an arbitrary
team of developers. This is ridiculous advice.
h) What is the delivery schedule?
What is the price of beans in Somaliland? Could this be any more
irrelevant to the current discussion?
i) Will the developers rely on documentation for the js functionality
being used?
Documentation is typically done after the development has been
finalized. Otherwise, what would you document?
j) Is there a resource available to maintain, debug, and improve the
js code?
How can there be a resource available to maintain, debug and improve
code that has yet to be designed?
That one is as useful as any that preceded it.
Now, I'll throw a hypothetical situation at you that comes from
experience in real projects, and you tell me what you would have done
differently or why the decision reached is the wrong one.
Oh, yes sir. I'll get right on that.
A project is to begin to develop an internal webapp to be used by 25
users at a single location for a single client. All users have XP and
IE6. The project budget and timeline are very tight and success is
Are you serious?
critical. You are the technical lead in the US and you have 20
developers in India who will do the coding. All of them are decent
LOL. Thanks for the keen insight into your shop.
Java/web programmers with average javascript knowledge. The
application requires a good amount of js coding for ajax, form
validation, some dynamic UI elements, etc. It has been partially
mocked up in plain HTML but almost no actual js has been written to
drive it. You can't quit, and you have to make this project a success.
Go.
Sorry, I don't care to join your developer fantasy league.
There are a couple of different ways you could approach this. Some of
them:
a) Demand that an experienced js developer be hired and added to the
team. Good luck. Resources are limited and hiring someone would take
too long. Work with the resources you have.
You are inventing a scenario which you hope will lead to a
hypothetically optimal solution that involves jQuery. I'll ask again:
are you serious?
b) Pick the most knowledgeable js coder in the group and put him in
charge of writing all the js from scratch. It's hard to say what
you'll end up with. That's a risk.
It is hard to say why I am still reading this. I want the last five
minutes of my life back.
c) Try to find existing code from experts on the web and mash it
together to be used. Oh, wait, there aren't many actual code resources
available from the "experts" and even finding the right "experts" is
LOL. Who told you that? And do the quotes indicate some unfulfilled
desire to be taken seriously as an "expert."
difficult. That scrolling table body you want to create in your app?
Are you talking to me? I don't want a scrolling table body.
That one expert, Richard Cornford, has an example of that but it's not
documented and as far as you can tell you aren't even allowed to
legally use it. Trying to find code written by experts that could be
How much documentation do you need for the scrolling table body that
you presume I want?
put together into a real app by amateurs will end up in a mess.
So it is your presumption that the hypothetical developers in India
are amateurs. Why did you hypothetically hire them?
d) Pull existing, proven code from other projects into this one and do
a lot of copy and pasting. The developers will need to do their own
trial and error, because none of the code is well documented and there
is no overall API or design to make the pieces fit together.
Are you familiar with the term "loaded question?"
e) Use a library like jquery. The browser environment is fixed and
And of course, here is the self-serving "answer."
supported by the library. The library is very well documented. There
So was the Holocaust.
are tons of examples. There is a support group where questions are
Bad examples. The support group has been shown to be made up of
people who regularly use jQuery.
quickly answered. It's free. The API is easily understood. The file
You get what you pay for of course. And the API is a horrible
abstraction. The solution to virtually everything is to call a
function named $. How intuitive. Not to mention the fact that lots
of other libraries use the same symbol for very different purposes.
No chance of confusion (or collision) there.
size is minimal. The amount of code to be written from scratch is
We've been over that. It is a 50K (minified) library that is all over
the map in terms of functionality. Chances are that your hypothetical
project will download lots of unused code.
greatly reduced and the potential for bugs is greatly reduced. It can
What?! The library that you have chosen to buttress your hypothetical
project is teeming with bugs of all shapes and sizes. How is starting
out with something that is buggy going to reduce the potential for
bugs?
be used from day 1 rather than waiting for a home-grown library to be
Who says this hypothetical project needs a library at all? You
haven't defined its goals at all.
created. It will be maintained and tested by others who will find bugs
and fringe cases that you would never think of - at no cost to you.
But wait, there's more! Act now and we will throw in a set of jQuery
commemorative steak knives. Lifetime warranty included. No payments
ever! This offer is void where prohibited. Warning: library may
explode.
Now, maybe you have a different perspective, but it's situations like
Maybe?
this that make me conclude that using a library like jquery is the
best choice. It would let me focus on bigger problems that are more
And what about the above drivel leads you to that conclusion?
complex, and put the load of generalized javascript development and
browser debugging on to someone else's hands. Is jquery perfect? Hell
Whose hands? The jQuery guy? Post back when your shuttle lands.
no. But it's probably better than what would have been written by my
offshore team. And it works without a single problem in the target
But you are the one who hypothetically hired the imagined team of
Indians to develop your undefined project. How can you say that
jQuery would be the best way to rectify what could hypothetically be
considered a mistake?
environment, enabling animations, effects, and functionality that
LOL. The jQuery animations are the worst of the lot. And where in
the unspecified specs did it say that the project required animations?
would have been out of the question if it needed to be coded from
scratch.
Oh absolutely. Animations would have been hypothetically out of the
question. The fact that even novices can produce simple animations,
like those found in jQuery, must have escaped you.
Could it break in browser X in 2 years? Perhaps. But hopefully that
But that isn't a hypothetical concern. You can just jump in your time
machine and retroactively fix them.
will mean just popping in an updated version of the library with the
same API. If it means taking a look at the code to try to fix a bug in
That assumes that people who cannot write a competent library today
are well-suited to create a competent library in the future, when
browser sniffing will be even less viable due to a proliferation of
devices that utilize embedded browsers. The authors' current stance
of "we don't care about those" wouldn't seem to justify this
assumption.
the library itself, so be it. It's still way more economical than
Voodoo economics.
coding from scratch. And it helps to manage risk, because jquery is
known to work right now, whereas writing code from scratch has a risk
That must be some newfangled usage of the words "known" and "work"
that I am unfamiliar with.
of failing or not being delivered in time or being unmaintainable.
So it is your position that code written and documented in-house by a
team that is picked according to their suitability for a given project
is harder to maintain than an open source black box that was written
by some random amateur with a blog.
JQuery isn't perfect. But it's way better than the alternatives that I
can see.
Your myopia is well-documented in this area. Did it occur to you that
there might be other alternatives for your hypothetical project?
This is what I call the "real world". As you can see, it has little to
See previous post.
do with whether or not a specific browser sniff is required or if a
particular code branch is actually unreachable. While getting that
stuff perfect is a great goal too, there are bigger and more important
issues to be considered.
You need to prove some points before launching into a summation.
I would love to work on projects where everyone knows exactly what
they are doing and there are dedicated JS developers who have
developed a robust internal set of tools that are documented and have
a solid API. So far that hasn't happened for me, and I haven't known
many places where that is the norm.
Then perhaps those places are in the wrong business?
I don't mindlessly advocate jquery. I'm not sure if I've ever
What do you call this post? It is no more cerebral than one of Mr.
Haney's sales pitches on Green Acres (Mr. Douglas, this library was
designed by John Resig and used to fend off twenty Indians in that
great hypothetical siege at jQuery junction.)
recommended it. What I have done, occasionally, is defend it for use
in situations where I think it solves a problem well.
But you never offer a clear explanation of what the problem is and why
your favorite library is the best way to tackle it.
So it isn't on an Intranet and it isn't on the Internet. Ah, I get it
now. It is another hypothetical.
Never going to happen. And can you believe that I actually use ActiveX
quite a bit? To access the filesystem, even? Unbelievable!
See above.
No thanks. I don't care for a rerun.
No! And can you believe that things still work perfectly?! Oh My God!
Inconceivable!
Not really. You stated that you only support IE6 (and likely only a
handful of its myriad configurations.) If you use a cinder block to
squash a fly, it will likely remain dead forever, but that doesn't
indicate that you needed the cinder block to accomplish this feat.
I am asking you nicely. Please stop posting your hypothetical
nonsense to this newsgroup. Thanks in advance for your cooperation.