designsn28
08-13-2008, 06:36 PM
Are there any alternatives to javascript
Mike
edited by admin: no commercial links permitted on the forum, thank you.
Mike
edited by admin: no commercial links permitted on the forum, thank you.
|
Click to See Complete Forum and Search --> : Alternatives to Javascript designsn28 08-13-2008, 06:36 PM Are there any alternatives to javascript Mike edited by admin: no commercial links permitted on the forum, thank you. JPnyc 08-13-2008, 07:14 PM yes, don't use JavaScript, or depending on what you're doing, use flash. NogDog 08-13-2008, 08:09 PM Without knowing what it is that you actually want to do from a functional standpoint, it's rather difficult to suggest any meaningful alternatives. designsn28 08-13-2008, 09:41 PM Well I was just wondering what major advantages does javascript have, if any felgall 08-13-2008, 10:25 PM The advantage that JavaScript has is that it is the only client side language actually built into web browsers meaning that 90% of web users actually have it available. Any alternative such as flash etc all require that the browser owner download and install a plugin in order to be able to use that code. This means that far less than 90% of people will be able to see whatever you are creating in that other language at all. There is also the issue of different versions with plugins such as flash so that your audience may be further reduced because of people who have an outdated version of the plugin and can't be bothered returning to the site where the plugin came from to get the updated version. Taking all these factors into account you'd probably be lucky if more than 70% of people had the latest version of any plugin installed. Reli4nt 08-14-2008, 12:41 AM Actually flash is more ubiquitous that JavaScript at 98% but JavaScript is still incredibly common. Just not so common that you can rely on it being there. It is good for additional user experience but should never be required for anything. There are no equivalents to JavaScript on the whole. Declan1991 08-14-2008, 05:45 AM Actually flash is more ubiquitous that JavaScript at 98% but JavaScript is still incredibly common. A lot of people have Flash disabled by default though, and only enable it when they want to, and it is very annoying when there is a Flash header or navigation when it is totally unnecessary. JPnyc 08-14-2008, 06:32 AM I'm one of them. I dislike flash and only enable it when I have to. Jeff Mott 08-14-2008, 06:50 AM ...90% of web users actually have it...For at least the past six months, the number has been hovering between 94 and 95%, in case you ever wanted to update the number you report to others. JPnyc 08-14-2008, 07:44 AM I've begun disabling it on some sites. Too many sites with too much scripting, and inefficient scripting at that. Pages load much faster with it disabled I've noticed. designsn28 08-14-2008, 07:55 AM Is there a program that is used to do javascrip the same way Macromedia Flash is used to create flash? scragar 08-14-2008, 08:51 AM javascript is plain text, and text editor can write it. JPnyc 08-14-2008, 09:28 AM JavaScript is just plain old code. You can write it in Notepad or any text editor you choose, although I do recommend avoiding Word when writing anything for the Web. It has nonprinting characters that can mess up your code. Reli4nt 08-14-2008, 09:47 AM some editors such as dreamweaver let you pick the JS effect you are looking for and the drop the snippet into the page though they are very very limited in scope. I think that may have been more what designsn28 was looking for drhowarddrfine 08-14-2008, 10:18 AM Actually flash is more ubiquitous that JavaScript at 98% Not hardly. Javascript is installed by default. Flash must be installed by the user. You can bet many do not install it. Javascript is there no matter what. Stephen Philbin 08-14-2008, 12:48 PM There are two words which I doubt will ever be applicable to the statistics on the availability of Flash and Javascript in browsers: accurate and relevant. It's pretty much impossible to get truly accurate figures on the availability of Flash and Javascript in browsers. I, like many people, am using a browser which comes with Javascript built in, but have it mostly disabled. I allow Javascript on a few sites, but the rest are barred from using Javascript. I have the same setup with Flash too. So neither are either "disabled" or "enabled". It's more of an in-between. There's also no reliable way of getting this kind of information anyway. So I really don't see any point in such statistics anyway. Especially when you take the "relevant" into consideration because you should be making public domains fully functional regardless of whether Javascript is available or not. I always build on the assumption that neither are present. KDLA 08-14-2008, 01:50 PM Flash must be installed by the user. You can bet many do not install it. You also run the risk, if installation is required, of losing your visitor. I've been on MANY websites that require some sort of plug-in; I get redirected to Macromedia within the same window, and I never find my way back to the original webpage (if just happened to be surfing and didn't note the address). Declan1991 08-14-2008, 02:28 PM So I really don't see any point in such statistics anyway. It's a good way of reminding people how many users they are potentially excluding if they don't take care. Reli4nt 08-14-2008, 02:50 PM For what its worth adobe disagrees http://www.adobe.com/products/flashplayer/productinfo/faq/#item-1-3 scragar 08-14-2008, 03:12 PM For what its worth adobe disagrees http://www.adobe.com/products/flashplayer/productinfo/faq/#item-1-3 they would argue that even if only half the population had it installed, it's in their interests to do so. If you can find some independent statistics I'd be interested to hear them. felgall 08-14-2008, 06:18 PM I doubt that any browsers running on devices other than PCs even support Flash at all. Certainly the 4% web reader community doesn't support Flash and so the figure couldn't possibly be 98% - the figure is probably closer to 68% if all device types and browsers are included. Anything quoting 98% is disregarding mobile devices, web readers etc. If you disregard those then JavaScript support is 100% - and even some of those support JavaScript even though they couldn't possibly support Flash.. drhowarddrfine 08-14-2008, 06:19 PM Of the 32 browsers compared on Wikipedia, only 6 did not support Javascript and those six were Amaya, Dillo, Lynx, Mosaic, WorldWideWeb and w3m. Those 32 probably make up 99.99% of all web browsers in use (and not), not just those who clicked on that survey firm's banners (as stated on their site). Reli4nt 08-14-2008, 06:25 PM the figure is desktops some mobile devices support flash, actually quite a few now ship with it Stephen Philbin 08-14-2008, 07:12 PM It's a good way of reminding people how many users they are potentially excluding if they don't take care. Of course. I'm not unaware of that intended purpose of quoting such statistics. The point I'm making is that the statistics are pretty much worthless because it's impossible to accurately measure who has Javascript enabled, which parts of Javascript they have enabled and on which domains they have it enabled. It's equally impossible to properly meter the proliferation of Flash and Java plugins too. My point is that the statistics are pointless not only because they can't be accurate, but also because we should be building sites on the assumtion that around 1% of users have Javascript/Java/Flash, regardless of what the reality is. There's just no need to be arguing over who's statistics are the right ones when they're all inaccurate and irrelevant. Reli4nt 08-14-2008, 07:24 PM it becomes relevant when the issue of user experience arises. JavaScript and Flash should be used to enhace the experience doing things such as validating forms before submitting them (of course we dont rely on this ourselves but we can help things move quicker and smoother for users) or checking for a user name when someone is filling out the registration form. Now if only 10% of people can benefit from this then the man hours are probably better spent elsewhere. If on the other hand half or ever the majority of users have these capabilities then we know these enhancements are truly an opportunity for use to connect and improve ourselves for the users. So I disagree about them being irrelevant. Accuracy is immaterial so long as we have a general picture. \\.\ 08-14-2008, 07:48 PM Javascript as stated by several people in this thread is part of the web browser as is VB Script. You also have other scripting that will work as long as theirs provision for the script and the appropriate rendering engine is available. This list of alternatives include C, Python, Perl and Java. Flash is bad for web browsers, it does pose more of a security risk than Javascript ever has. Here: http://en.wikipedia.org/wiki/Category:Scripting_languages take your pick of them and find out. drhowarddrfine 08-14-2008, 08:03 PM it becomes relevant when the issue of user experience arises. So I disagree about them being irrelevant What do elephants have to do with anything? Reli4nt 08-14-2008, 08:17 PM What do elephants have to do with anything? That comment is nonsense. Read the post. felgall 08-14-2008, 11:07 PM Javascript as stated by several people in this thread is part of the web browser as is VB Script. VBScript is only available in Internet Explorer which means that it is only available to 53% of your visitors today and less tomorrow as people are moving away from IE. That gives it lower support than any of the other options discussed. \\.\ 08-15-2008, 05:08 AM VBScript is only available in Internet Explorer which means that it is only available to 53% of your visitors today and less tomorrow as people are moving away from IE. That gives it lower support than any of the other options discussed. And 53% is better than a big fat nuffin. This is not a question of browser coverage, it is a quest for alternative scripting and this response falls under the Adequate Provision & engine being available. Stephen Philbin 08-15-2008, 06:39 AM I never implied that Javascript should not be used. Only that a site must work wther it is active/available or not. Of course Javascript should be used if it genuinely makes the experience better, just make sure it's not a choice between Javascript-assisted features or nothing. drhowarddrfine 08-15-2008, 09:32 AM And 53% is better than a big fat nuffin. I don't think so. An elephant would rather have a big fat muffin. Do elephants even eat muffins? I still don't get what elephants have to do with this, nor the muffins that they eat. \\.\ 08-15-2008, 02:37 PM I don't think so. An elephant would rather have a big fat muffin. Do elephants even eat muffins? I still don't get what elephants have to do with this, nor the muffins that they eat. Elephants don't eat nuffin, they eat sumfin. felgall 08-15-2008, 03:20 PM And 53% is better than a big fat nuffin. This is not a question of browser coverage, it is a quest for alternative scripting and this response falls under the Adequate Provision & engine being available. I never said it didn't. I was just pointing out that in order of being supported by your visitor's browsers from best support to worst that the order runs: JavaScript - 100% of desktops, 94% overall Flash - 98% of desktops, probably about 70% overall (since a lot of people who have it installed have it disabled and only enable it when they specifically want to use it) VBScript - 53% of desktops, probably about 52% overall That makes JavaScript the best of the three for anything that you want the greatest number of your visitors to actually have run in their browser. The other thing is that with the way IE use is falling that 53% now could very well be 5.3% by this time next year. After all 2 years ago it was 97% scragar 08-15-2008, 03:33 PM JavaScript - 100% of desktops, 94% overall Flash - 98% of desktops, probably about 70% overall (since a lot of people who have it installed have it disabled and only enable it when they specifically want to use it) VBScript - 53% of desktops, probably about 52% overall I'd say javascript as 99.9% you can assume most people will have it(unless your site is so IT dependant that there's a chance your gonna get command line browsers for some reason, personally I love the speed on lynx, without images and waiting for tables slow sites load in a fraction of the time :P Not to mention that with a little hack of the lynx code you can get it to use vi as your editor for text fields, very nice :)), but honestly there are so many reasons to not have it enabled on a site by site basis I'd just always make the assumption that most people don't have it, then provide extra features for those that do, rather than writing it using javascript to try and avoid having to write things accessible in the first place. drhowarddrfine 08-15-2008, 04:57 PM I love the speed on lynx, without images and waiting for tables slow sites load in a fraction of the time :P Not to mention that with a little hack of the lynx code you can get it to use vi as your editor for text fields, very nice Absolutely agree! I'm frequently coding without a windowing environment and just don't want to start up X to look something up. As you know, some sites are easier to surf than others with Lynx and you reeeeaaallly know who's good at laying out web pages properly. ExTexan 12-04-2008, 02:19 AM ...but JavaScript is still incredibly common. Just not so common that you can rely on it being there. It is good for additional user experience but should never be required for anything. So what if Javascript is the only way to make my site work the way i want it to (VERY dynamic - using both PHP and JS)? I mean even if I can do *most* things via straight HTML, I'm using AJAX calls to populate various DIVs. And, if I decide to just make my site rely on JS (for the 90% or 94/5% - whoever you believe), what is the best method for determining if a visitor has JS enabled - or at least to inform them that JS is required to view my site? felgall 12-04-2008, 03:39 AM And, if I decide to just make my site rely on JS (for the 90% or 94/5% - whoever you believe), what is the best method for determining if a visitor has JS enabled - or at least to inform them that JS is required to view my site? Place a "get lost and never come back" in the HTML and then hide it using JavaScript. Alternatively you should make the pages work without JavaScript first (even if it is rather awkward) and then add the JavaScript as an extra layer on top to make it easier to use the page. That's the way JavaScript is supposed to be used. ExTexan 12-04-2008, 04:05 AM I see. So how would I do the different tabs (showing/hiding DIVs) without using JS? I'm doing that for performance reasons - i.e. going back to a tab doesn't reload the page, it just "unhides" it. And what about the AJAX calls? Seems to me that if I take your suggestion to make it work without JS - it would require a totally different design approach. Charles 12-04-2008, 06:39 AM I see. So how would I do the different tabs (showing/hiding DIVs) without using JS? I'm doing that for performance reasons - i.e. going back to a tab doesn't reload the page, it just "unhides" it. And what about the AJAX calls? Seems to me that if I take your suggestion to make it work without JS - it would require a totally different design approach.It would require expanding your thinking and you'll need to not be control freak. Those links that control the tabs, "onclick" they run the AJAX but the "href" attribute points to the same information available as a web page. Or if your tabs work by hiding and showing DIVs already on the page then those "href" attributes point to internal links. Always start with something that works well without JavaScript and then add the frosting. ExTexan 12-04-2008, 11:44 AM Well, it's not really a matter of being a control freak. [...and don't worry, this is not me getting testy about your comments, I genuinely want to learn the accepted approach here...] But, as I said, it was for performance reasons. Each tab of this page will be presenting master recs with many-to-one user-defined detail recs. Obviously this could require some significant database accesses to fetch all that data. Are you saying that it's better to sacrifice the performance gained (thru the use of JS) for 95% of my users just so I don't alienate the 5% who would rather disable JS in their browsers? Seems to me those 5%ers must already be used to hitting sites that just don't work for them. Charles 12-04-2008, 01:27 PM Are you saying that it's better to sacrifice the performance gained (thru the use of JS) for 95% of my users just so I don't alienate the 5% who would rather disable JS in their browsers? Seems to me those 5%ers must already be used to hitting sites that just don't work for them.Not at all. I saying you need one site that works several different ways. Back in college the brake pedal went straight to the floor on morning but I was able to keep going/stopping using the clutch and the parking break.Your AJAX will work great for people who have JavaScript but the rest of us will get the data in a different way. Consider the old pop-up problem. How do you create a link that gives the user a pop-up when it can but still keeps things going otherwise?<a href="http://www.w3.org/TR/WCAG10/" onclick="window.open (this.href, 'child', 'height=100,width=600'); return false">Likewise with your AJAX:<a href="some-script.php" onclick="return runAjax()">Just have your function, "runAjax()", return false upon a successful completion. That way browsers that support JavaScript but not your flavor of AJAX will still humm along. ExTexan 12-04-2008, 08:08 PM Charles, thanks for all your input. I'm gonna go try out your suggestions and see if I can make it work well for both situations. Cheers. drhowarddrfine 12-04-2008, 10:27 PM Well, you could offer a cookie instead of the aforementioned muffin to the elephant, if that still applies here. My opinion is I see a trend where JavaScript is going to become a way of life for everyone on the 'net and if you don't have it enabled then you're just going to suffer. With Firefox, Chrome, Safari and (I think) Opera soon coming out with browsers running js up to 40x what they do today, it will become stupid not to use it. I'm having a tough time with any compelling reason to fight too hard to make my pages not have js as an every day part of the coding and design. Charles 12-05-2008, 06:51 AM There are quite a lot of us using the NoScript extension with Firefox so I'm not thinking that our kind is going away any time soon. (And I'm not giving up my rotary telephone either.) But we're not important. The people who because of disability can't use a browser that uses JavaScript, they're the ones who matter. What do you think a just God is going to do to people who scoff at the needs of the blind? I'm certainly not going to take that chance. KDLA 12-05-2008, 07:57 AM My opinion is I see a trend where JavaScript is going to become a way of life for everyone on the 'net and if you don't have it enabled then you're just going to suffer. Do you think that maybe javascript is predominantly used by many web developers lacking server side coding experience, and resort to it as the "only" way to do things on their websites? felgall 12-05-2008, 02:24 PM There have already been court cases with substantial payouts to blind people who were unable to use a web site because the site required JavaScript. scragar 12-05-2008, 02:30 PM There have already been court cases with substantial payouts to blind people who were unable to use a web site because the site required JavaScript. Links? drhowarddrfine 12-05-2008, 10:59 PM The people who because of disability can't use a browser that uses JavaScript, they're the ones who matter. What do you think a just God is going to do to people who scoff at the needs of the blind? I'm certainly not going to take that chance.More and more I feel this is a problem for the blind and not of web browsers, web sites or the internet. While I have no problems making my site as accessible as possible, denying my site the ability to use a known, popular, much used, modern, standard technology and technique is unlawful itself. While that may come across as cold hearted, keep in mind that, for many years, I had a number of friends who were blind and I did activities with the local school for the blind. Specifically, the blind ham radio operators who got along just fine without everyone else on the airwaves doing anything special for them or feared their lawyers. I roll my eyes when people admire Spock and say, "The needs of the many outweigh the needs of the few but damn you who ignore the needs of the blind 1%." I don't see car manufacturers making cars for the blind. (I am not going to continue with this rant.) While taking care of special interest groups and the niche few, the majority that make my business profitable get ignored and their hard earned dollars waving in my face shall not be ignored by me. felgall 12-06-2008, 01:34 AM While I have no problems making my site as accessible as possible, denying my site the ability to use a known, popular, much used, modern, standard technology and technique is unlawful itself. That basically suggests that anti-descrimination laws are themselves unlawful since those are the laws that would be applied if someone covered by that type of law would use to prosecute under. With the exception of major sites you can probably get away with your site not being accessible to everyone. It all depends on how big a percentage of your potential audience you decide to discard and how much easier not catering for them will make your task. For example having a page not work if JavaScript is disabled will break the page for around six to ten percent of your potential audience (depending on which figures you believe as to how many people don't have JavaScript). Deciding to abandon support for IE6 may make your page unusable to around 20% or so of your potential audience. Deciding to require Flash may make your page unusable to an even larger percentage than that. Everyone has to decide how much effort to dedicate to what aspects of accessibility. Disabilities in themselves are not a have or have not situation either. I have seen quotes that place the number of people who use the web who have some form of disability at over 50% however many of these would have minor disabilities and probably not even think of themselves as having a disability and many of those disabilities (such as colour blindness to particular colours) is something that very few would think about when designing their pages. There are far worse things that you can do regarding accessibility than deciding to not support those without JavaScript but in most cases it is a trivial effort to provide at least some convoluted way in which those people can still use your site if they really need to. svidgen 12-06-2008, 03:22 AM You're all very good at fabricating percentages and/or quoting other website's fabricated numbers ... depending on which figures you believe as to how many people don't have JavaScript No ... it doesn't depend on which figures you believe, my friend. It depends on your intended audience. If you want 100% of the world to see your web page, you're out of luck--not everybody owns a computer or other device with TCP/IP, HTTP, and HTML software. No matter what medium, technology, syntax, language, or religion you use, there will necessarily be a group of people without access. Deal with it. In regards to lawfulness--should it then be unlawful to broadcast motion picture? Anyone hear any instances of blind folk filing law suits because motion picture is totally not fair? ... Despite how ridiculous that would be, I agree that one should still attempt to maximize the number of people who can view a web page without special requirements: As many here have stated, JavaScript should generally be used only to spruce up existing content. And any page that gains content by means of a script should supplement the script by means of a NOSCRIPT tag. What gives me the authority to say this? Well, nothing really. But, if you want that "0% to 3000000%" of users without JavaScript to have access to your content, you'll blindly agree with me ... That being said, when deciding whether to rely on JavaScript for basic functionality, it is important to determine what percentage of YOUR users have it disabled--whether it be 0% or something astronomically greater than 100% (we're talking quantum people that exist in multiple universes and own cyberdogs and cybergoats here, which is really the only way people can still be reporting numbers over ~10%). One of the most basic ways to get accurate numbers for YOUR site is to install a really simple do-little script on your own page. Have the script make an AJAX request to a sever-side logging script so you know the browser is actually running the script. You can then determine "exactly" how many of YOUR users have JavaScript enabled--or at least how many had it enabled during that period of time who didn't get disconnected before the script had a chance to post, etc. For me, on thepointless.com (http://thepointless.com), having both Google Analytics and Awstats "installed", I can actually compute a percentage for my site relatively easily. For a particular time period, I simply take the number of "viewed pages" minus the number of pages I know not to contain Google Analytics code and divide by the number reported by Google Analytics. This gives me a fairly accurate percentage of users on my site NOT using JavaScript: 21023 - 6180 ------------- = 1.2171382% 12195 That means I can safely install JavaScript intensive applications on thepointless.com and expect to "lose" only 1 to 2% of my users. However, users prefer AJAXy sites and tell their friends about them more regularly than non-AJAXy sites, I would probably actually [I]increase my traffic a little by using lots of little JavaScript tricks. However, I also agree with felgall's last comment: ... in most cases it is a trivial effort to provide at least some convoluted way in which those people can still use your site if they really need to. Given that there will "always" (but not really) be some user(s) who don't have JavaScript enabled and the fact that a web developer should not be relying on client-side computations anyway, one should never put too much reliance on JavaScript and should "always" take advantage of NOSCRIPT tags or some other method to provide supplemental (the same, but slightly different?) content for JavaScriptless users. Perhaps the best solution is to make the page static, and attach scripts which modify the DOM upon loading to add any extra functionality you like. That way, the initially downloaded page has everything the user needs--and within a second or two, it will all turn magical for the "small" portion of users with JavaScript enabled. More to the point of answering the initial question, if you really want an alternative to JavaScript, other than no JavaScript, I would recommend Java. Why Java? Because, Java is inherently object oriented, platform independent, free, and if you're looking for an alternative to JavaScript, you can't be too picky about what percentage of your users have the right plugin anyway ... felgall 12-06-2008, 03:55 PM should "always" take advantage of NOSCRIPT tags or some other method to provide supplemental (the same, but slightly different?) content for JavaScriptless users. There are much cleaner ways to do it using unobtrusive JavaScript rather than relying on <noscript> tags. Using JavaScript means that you can test whether the browser supports the particular JavaScript features you require rather than it supporting JavaScript but not the particular features you need. Your JavaScript code can end up much shorter when you don't use <noscript> and just use the JavaScript to hide the content you don't need people with JavaScript enabled to see instead. Also testing YOUR visitor counts to see what percentage don't have JavaScript enabled doesn't tell you what fraction of your potential audience you are missing out on because the audience you are missing out on are the ones NOT visiting your site who would be visiting your site if it worked for them. SO even with 99.99% of YOUR visitors using JavaScript you could still be missing out on perhaps 5% of your possible audience who visited once, saw your site didn't work and never came back but who might have visited your site every day if it did work. svidgen 12-06-2008, 04:41 PM There are much cleaner ways to do it using unobtrusive JavaScript rather than relying on <noscript> tags. You're nit-picking. Sure, there are better ways of doing it: I suggested the simplest and most intuitive (seeing as how the very function of the NOSCRIPT tag is to do what I suggested). However, I also encouraged the use of "better" techniques: Perhaps the best solution is to make the page static, and attach scripts which modify the DOM upon loading to add any extra functionality you like. That way, the initially downloaded page has everything the user needs--and within a second or two, it will all turn magical for the "small" portion of users with JavaScript enabled. ... You seem to have ignored certain portions of my previous post so that you'd have something to argue about. I don't appreciate that, I find it to be destructive behavior, and I find it to be highly offensive. Also testing YOUR visitor counts to see what percentage don't have JavaScript enabled doesn't tell you what fraction of your potential audience you are missing out on ...SO even with 99.99% of YOUR visitors using JavaScript you could still be missing out on perhaps 5% of your possible audience ... Moot point (unprovable and irrelevant to the cited text). Though, I understand your concern, and it's definitely a founded concern, though not necessarily a concern to act on. A website's demographic should remain the same so long as the content trends remain the same. As with [almost] every major field of study, past trends are the best predictors of future trends. And since we're talking about measuring your site's demographic before implementing crucial JavaScripts, it's generally safe to assume the demographic will not significantly change [for the poorer] in response to the addition of JavaScript features. So, if you're really concerned with missing out on potential visitors, measure your percentages from month-to-month for a 6 months. If the percentage of JavaScript enabled users is on the decline--don't use JavaScript. Though, I can pretty confidently say you'll see the percentage going up, indicating that you're not losing many (or any) potential visitors by implementing JavaScript features. And to be quite honest, and although this isn't necessarily the best accessibility philosophy, I think the best way to get stubborn people to start using JavaScript is to give them an overwhelming reason to turn it on--the same way we gave them a reason to buy a computer and rent an IP connection ... drhowarddrfine 12-06-2008, 05:43 PM That basically suggests that anti-descrimination laws are themselves unlawful since those are the laws that would be applied if someone covered by that type of law would use to prosecute under.My problem with it is reasonableness might not be applied. webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved. |