The ubiquitous king of the poor mans scripts.
Yea, yea, I'm stirring the pot intentionally.
I know there are many folks out there who love it and use it for all sorts of things and I think that's great - for them.
I didn't use to be this way. I used to write JS and even played with DHTML and some other cool effects. But I have since come to the conclusion that this script language is destined to become extinct sooner than later.
My reasoning is very simple, it is too browser dependent and there are too few who know how to use it correctly. That's it.
What's your vote - keep it or ditch it?
Whats your problem with it? It can do very many simple and elegant things on a webpage.
Absolutely keep it.
I feel the bad rap is/was due to the fact since it is a reasonably simple and adaptable scripting language, many new scripters wrote 'what they could' initially with the afore mentioned parlor tricks.
After looking at all script solutions for serving random text ads in little boxes, we found js did the job better, with less code, very elegantly, and does not confise SE spiders in to thinking your ads are content! Only drawback.. those with js disabled dont see them, but thier view degrades gracefully. So we use js on around 50% of our most popular pages.
Fact is js can do simple things elegantly and efficiently. stick it in an external file and you have a poor man's SSI or PHP include, which can sometimes be even better.
Agreed, that once more complex js solutions are used they can get a bit unreliable.
But for simple things it is often the best solution.
I had a "bad script day". Shouldn't have vented.
I can see it's usefulness for calculations and a few other things. My issue with it lies in the fact that people tend to go overboard with it's use. Which is what I've been running into more and more lately.
What is worse is that the bloated code is often buggy. Click a button and boom the site locks up because they're sniffing to see if I'm using IE or NN (I use Opera or Mozilla depending on my mood).
I will conceed that JS can be useful - it's just the sheer volume of poor examples really rung my bell last night. Right when I really needed to get to a few important pages. OOooooo, mmmph.. *pop!*
Lorax - I don't like it either. I used to use it though and still have some sites out there with it. I rarely let scripts run when surfing though. Consequently, I never see pop-ups, have problems with drive by downloads, etc. In fact, typically, if I go to a site that needs js to be able to use it reasonbly well, I leave and go elsewhere.
I donīt use it on webpages either. It is ok for intranet applications where you control the browser being used.
|My logs report an almost non-existent incident of non-support due to user-side preferences, which I have always suspected as being exaggerated anyway. |
I am one of those, since I have turned it off in my browser. (BTW today there was a new release of it: 15.0 :))
Agree on the server-side checks but I'd also remind you about the plus side for us poor saps on modems - nothing sucks more than entering data into a large form, hitting submit only to be told "oops you made an error".
Plus if you do it well you can also re-use those checks on the server-side (I'm thinking of regular expressions at this point since they are implemented in such a cross-platform way that what works for the client can work for the server too). This way you can mirror the majority of your checks on both sides which means less maintenance too.
|...hitting submit only to be told "oops you made an error". |
Like the nic btw.
I tend to use PHP with session vars for form handling so I simply return the user to the form with the fields filled in and the offending field highlited in some fashion. Which is my way of eliminating JS.
But hey, if it works for you...:)
I use it on one of my sites, but that's intentional to show people these "trailing mouse" etc... gimmicks.
but that's it!
I haven't used it recently and don't ever intend to again, at least not on "wide user" sites.
there was someone who mentioned pop-ups..these we can do with CSS as near as dammit.. or you can 'target="_blank"' (with transistional), why do you want fancy pop-ups anyway?
I think perhaps this is the way forward..I script in VB and there is nothing so far I have felt that I "wished I could do what JS can"
it's that audience thing again ;)
Very good practice lorax. I never understood how you can get away with anything less user friendly. :)
|I never understood how you can get away with anything less user friendly. |
There are just so many bad examples out there (of everything) and until folks find, stumble upon or get smacked up side the head by someone who shows them a better, more user friendly way to accomplish the same thing - they continue to build the same way. I know 'cause I was one of them.
Nowadays - I sort of look forward to a good dope slap. ;) Helps loosen up my death grip on favorite tools and techniques but mostly frees me up to experiment with new ideas, lines of thought, and cool technologies.
Just want to place my "yea" vote.
I have a page, in particular, that allows users to custom build their product, then hit the button and get the customized price along with their choices in an alert box(I know, not too glamorous). They can alter their choices until they are happy without loading another page. Most of the competitors use server side scripting and when I test their scripts, I find them very slow, that is unless you know your exact choices the first time around.
JS is very useful in this case, yet I have been putting off creating a solution for js disabled users, and I have gotten a few emails from users who can't figure out how to use the page and I know it's because js is off.
As I learn more about server side languages, I use less js(almost none), but IMO it still has it's place.