• 0

JavaScript Alternatives


Question

I personally hate JavaScript. As I have mentioned before, it is a language that was supposed to be dead by now! Except Google had to come and make AJAX a fashion, and AJAX had to use JavaScript....

Anyway, I took up a personal vendetta against JavaScript... The result is a lengthy post about alternatives to JS. At the moment it is simply a review of different technologies that can be used instead, their pros, their cons, and just how hard they are to use, and how well they display.

Nothing can be exactly like JS.. but that is a good thing :yes:

In a nutshell, my biggest problem with JavaScript is that it tries to do too much, it has too much buggy code, it is largely not XHTML 1.1 compliant (don't even think about XHTML 2.0!), and almost never displays the same or even properly across the major browsers. So I'm going to try to find a viable alternative (or mix of alternatives) that will let us accomplish what we need in a way that will display on the major browsers (here taken to be IE7, Firefox 1.5, and Opera 9) in a code-compliant manner, and more importantly in a simple and bug-free shape.

Get rid of JS for good!

BTW does this go here or in the reviews or how-tos section?

Link to comment
https://www.neowin.net/forum/topic/415794-javascript-alternatives/
Share on other sites

Recommended Posts

  • 0

Now you have gone and done it. You have ticked my thinking bone. I wonder if it would be possible to simply use Java to reference the components of the web browser (including the html). I have never tried it before.

Why would you want to load a huge plugin , Java, to do the same thing that can be done with Javascript with very little overhead? ;)

I dont know why people are complaining when Javascript makes Web Applications really efficient by cutting down on postbacks.

  • 0

methinks someone has become confused between java and javascript :]

I dont know why people are complaining when Javascript makes Web Applications really efficient by cutting down on postbacks.

No, AJAX does that. AJAX employs JS to help it pull it off.. i'm just complaining that JS is buggy and incompatible... now I have changed my mind that JS just needs to be standardized ;)

Oh yeah, thanks MSG.. I updated the DHTML bit...

  • 0

methinks someone has become confused between java and javascript :]

No, AJAX does that. AJAX <emp>employs</emp> JS to help it pull it off.. i'm just complaining that JS is buggy and incompatible... now I have changed my mind that JS just needs to be standardized ;)

I understand the differences between Java and Javascript. Read spartyjohnson's post closely as it talks about Java.

What do mean by JS needs to be standardized and incompatible?

I mean I never have any problems with my code on diffetent browsers. Can you provide some of your code that only works on some browsers?

  • 0

Why would you want to load a huge plugin , Java, to do the same thing that can be done with Javascript with very little overhead? ;)

I dont know why people are complaining when Javascript makes Web Applications really efficient by cutting down on postbacks.

You have a semi valid point. The issue here with Javascript is that it is old and not up to date with new programming styles. It has not really been updated since the mid 90's. It doesn't support OOP or compiled code and classes. It is not really standardized between browsers, there is a spec, but not really followed.

  • 0

i meant spartyjohnson not you :/

JavaScript has 5 different ways to open a link in a new window. Do you know how many of these are cross-browser supporting 100%?

yep. ZERO.

Firefox uses workarounds to MAKE the buggy JavaScript code work.. here: http://neosmart.net/MiddleClick.htm

if you have Avast Browser (???) or IE 7, give it a shot... Try middle clicking a link. in FF (WHICH IGNORES javascript on middle click) they will open properly, but in Avast.. nope, iE7 = nope. Early Opera = nope

Go to gmail.com with konqueror, go to live.com with Opera...

Go to a million different sites IE, and many times at the bottom of the page there will be a "JS script error"

Don't say that is just IE.. FF just does not have warnings for when JS fails.. but it fails on FF too..

Google products automatically disable scipt errors in IE... cuz they know that personalized google is also buggy..

  • 0
i meant spartyjohnson not you :/

Go to gmail.com with konqueror, go to live.com with Opera...

Go to a million different sites IE, and many times at the bottom of the page there will be a "JS script error"

Don't say that is just IE.. FF just does not have warnings for when JS fails.. but it fails on FF too..

Google products automatically disable scipt errors in IE... cuz they know that personalized google is also buggy..

I am confused? You meant me for what? In respect to Java and Javascript being different, yes I know they are different. I am well versed with both of them.

  • 0

Guru...

I think you need to brush up your self proclaimed Guru status on this topic. You seem to have many technologies confused and to be under the impression that many of these technologies are synonymous.

Javascript is fine. What we NEED is a standardized javascript (or some client side OOP language that accomplishes what Javascript does). The problems you state are not with Javascript itself, but rather the different variations of it. Remember Microsoft JVM (Java Virtual Machine)? Pure crap. Sun's engine? Under construction (part of the problems that you encounter are due to revisions to the language, not because there's something wrong with the language).

Also, Flash is NOT an alternative to javascript. Flash is completely different in design AND implementation. There are things that Javascript can do that Flash cannot do. And even moreso... Javascript does not hide in-page content. This is important so as not to impede search engine indexing. However, Flash circumvents the page source completely and provides no method of indexing the pages "content". It also is not supporting accessability standards to the extent that CSS is. Flash is NOT a viable alternative to anybody serious about their profession in this field.

Then you speak of DHTML as if it's its own beast... it's not. DHTML references using Javascript to dynamically control/modify the properties, attributes, and contents of HTML elements within the page. Without Javascript there is no DHTML.

Lastly... Javascript != Java AND Java != Javascript. They are made by the same company, share a similar name and syntax, and that's where the similarities stop. Java is a programming language totally separate from Javascript. Javascript is designed to only run within browsers. Java is designed to run in many different environments depending upon the compilation. Java cannot in any way replace javascript.

Just wanted to clear some things up. I'd hate to see people getting confused by reading bad information. I, of course, mean no disrespect or harm. I only mean to provide a more accurate account of what these technologies are and are not.

PS - You removed the post on your blog... ???

  • 0

OK....

@spartyjohnson: forget it.. the avatars are confusing me :p

@MSG: I realize that Java is not JavaScript.. where did I say it was???

I ALSO realize that Flash cannot replace JavaScript.. That is why in the blog I put it and Java at the top together, as solutions that would emulate what many users need JavaScript FOR, but do NOT accomplish what is required, because they are NOT scripting languages...

I corrected hte bit about DHTML.. I learned DHTML as something on its own that is useless, but with JavaScript becaomes powerful.. I was obviously wrong and fixed that accoridngly, and posted a thank you note too.. your post is still there, i did not touch it :confused:

EDIT

I origingally felt that JavaScript needed to be replaced completely, by (why u put in parentheses) a OOP scripting language client side.. after posting here and Luna suggested rewriting/standardizing JS... i realized that was the better solution and said so...

  • 0

You said that Java could perform the same functions as Javascript. You also state the same as ASP.NET. The truth of the matter is that ANY server-side language can accomplish the same end result but the goal of using javascript is to alleviate the page postback. This cannot be accomplished by using a server side language. In fact, the more times you post back the larger your margin for error(s) in some way/shape/form.

Again you refer to DHTML as if it is its own language. It is not. DHTML == Javascript. DHTML *IS* Javascript. DHTML is not useless by itself because DHTML does not exist by itself. Javascript makes HTML Dynamic, and DHTML = Dynamic Hypertext Markup Language, or DHTML.

I dont think the answer is to replace Javascript, but refine it and to standardize it. I see you think the same. But understand that Javascript itself isn't causing your problems. It is more than likely a combination of a lack of understanding of correct javascript syntax and/or techniques and the interfacing between the browser as well as whatever flavor and version of javascript is being used.

  • 0

My own relationship with Javascript has been mixed. Here's how it went:

1. Learned about it in my first days of Web design, interested

2. Found scripts that actually did something, liked it

3. Found Dynamic Drive and all those flashy things, disliked it

4. Matured in my Web design knowledge and approach

5. Went back to liking JS after seeing what it could do while still being in the standards

But just the same, anything not XHTML is technically invalid...

Actually, the use of other languages and such are promoted by the W3C (CSS isn't XHTML, for example).

My biggest gripe with all these end-user scripts is that they do NOT conform to the W3C revolution of separation of content and display

Now we're talking. You're probably thinking about those scripts people use to emulate CSS (e.g. dropdown menus, mouseover animations, and the like). Any good designer knows that such things belong in CSS and CSS alone.

all display should be in the CSS file, all content should be in the *.htm* file...

But Javascript isn't just display, it's dynamic content. It's not as if you can do a server callback without reloading the page in CSS, it's just not what those languages were designed for.

- XHTML: All content

- CSS: Controlling the look and feel, includes menus and such

- JS: Only for enhancing XHTML/CSS content, nothing more

so unless you can make a OOP scripting language that goes in the CSS File and then reference it with CSS Tags in teh HTML file, it is not compliant.

Last time I checked, <script type="text/javascript" href="blah.js"></script> was valid ;)

And THIS requires a new version of CSS.. which requires W3C support *before* we even begin!

Again, let CSS control the presentation and let JS control dynamic things.

By the way, there was an attempt to standardize Javascript, and that is ECMAScript.

My viewpoint is that Javascript should only be used when nothing bad could happen, and never to generate static content or control the static look and feel of any page. Good examples of Javascript being used for what it was intended to do include:

- Subtly alerting a user if they fill out a form incorrectly (via inline text messages)

- Opening windows the right way (via <a href="blah.html" class="popup">blah</a> and JS code to convert links with class "popup")

- Utilizing the DOM

- Developing Web applications

And what NOT to do with Javascript:

- Alert boxes

- Menus

- Event changers (onMouse*, onKeyPress, etc.)

- Writing buggy code

- Including Javascript inline in the (X)HTML

- Making pages that don't degrade gracefully

  • 0

OK.. WEIRD

When you mentioned that the post was missing (@MSG), I checked, no problem, it was there...

Apparently so long as I was logged in as Administrator there was a problem and the post was showing. soon as i logged out the post became 'unpublished,' disappeared from record, logged back in, its still missing... I had to manually edit it via its post number in the address bar, then republish it...

Sorry guys! (its back now though :rofl: )

  • 0
Actually, you can do pretty much anything with Javascript now. After all, where'd you think we got those shiny new AJAX apps from?

Hate to be blunt :laugh:

But did you read the article? :wacko:

I am not denying that you CAN do anything, my gripe is that stuff that should be done with CSS is being done with JS, and that the other 'cool stuff' with JS are largely incomatible, badly written, and bloated.. ;)

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Anthropic pulls Fable 5 and Mythos 5 after US export control order by Pradeep Viswanathan In April this year, Anthropic launched the Claude Mythos Preview frontier model with state-of-the-art cyber and coding capabilities for a select set of companies around the world. After preparing appropriate guardrails, early this week, Anthropic launched Claude Fable 5 and Mythos 5, its most capable AI models. Claude Fable 5 is for general users and comes with strict safeguards, while Mythos 5 is designed with fewer safeguards for cybersecurity and biology use cases. Today, Anthropic abruptly suspended access to its Fable 5 and Mythos 5 AI models for all customers after receiving an export control directive from the US government. The company received the directive from the government today at 5:21 p.m. ET, and the received letter did not provide any details regarding the national security concern. Anthropic understands that the government became aware of a method to bypass, or “jailbreak,” Fable 5, which might be the reason behind the directive. The order was issued under national security authorities and requires the company to suspend all access to Fable 5 and Mythos 5 by any foreign national, whether they are inside or outside the United States. The restriction also applies to foreign national employees working at Anthropic. As a result, the company has disabled both models for all customers to ensure compliance. Access to previous Anthropic models like Opus and Sonnet is not affected by this government order. The company highlighted that it had developed strong safeguards to reduce the possibility that Fable is misused for tasks related to cybersecurity. In fact, many developers are complaining that the safeguards are going overboard. Additionally, the company worked with the US government, the UK AISI, multiple private third-party organizations, and internal teams to red-team Fable’s safeguards for thousands of hours. Finally, Anthropic noted that no testers have yet been able to find a universal jailbreak on Fable 5. As expected, Anthropic disagrees that a narrow potential jailbreak should lead to the recall of a commercial model used by hundreds of millions of people. It warned that applying this standard across the AI industry could effectively halt new frontier model deployments. Anthropic concluded by mentioning that it is working to restore access to Fable 5 and Mythos 5 as soon as possible and plans to share more details within the next 24 hours.
    • Brave Browser 1.91.172 is out.
    • Any Video Converter Free 9.2.3 by Razvan Serea Any Video Converter is an All-in-One video converting tool with an easy-to-use graphical interface, fast converting speed and excellent video quality. Any Video Converter supports all popular video formats and converts your videos to different video formats including MP4, MOV, MKV, M2TS, M4V, MPEG, AVI, WMV, ASF, OGV, WEBM, and more. It supports converting videos to customized percent (50%, 100%, 200%, and more) or resolution (480p, 720p, 1080p, 4K, and more); It supports encoding videos into x264, x265, h263p, xvid, mpeg, wmv, and more. Any Video Converter Free key features: Compatible with Windows 11/10/8.1/8/7 (32-64bit) User interface are available in 14 languages Convert all kinds of video formats including high-definition videos Extract audio from any videos and save as MP3/WMA for your mp3 player Take snapshot from any videos and build your own picture collection Support high-definition for both input and output Batch add videos from hard drive and batch convert Customize output parameters completely as you like Manage your output videos files by group or output profile Merge several video files into a single and long one Clip a video into segments Free Audio Filter: Adjust audio volume and add audio effects Crop frame size to remove black bars and retain what you want only Adjust the brightness, contrast, saturation Rotate or flip or add noise/sharpen effects Produce output video with subtitles of your own dialogue and much, much more... Any Video Converter Free 9.2.3 changelog: Fixed video download engine auto-update failures. Added custom speed control support in the speed change tool. Added support for downloading YouTube AI-generated subtitles. Added support for preserving original audio stream in the format convert tool (e.g., Dolby Atmos, DTS:X). Fixed other bugs and improved overall performance. Download: Any Video Converter Free 9.2.3 | 7.6 MB (Freeware) View: Any Video Converter Free Home Page | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • Not sure what country you’re in but in many countries you can absolutely jail the sellers behind businesses… in fact I’d say in most countries you can do that
    • I guess we are done since you refuse to read my comment you replied to or my other comment in another thread you were also a part of here.
  • Recent Achievements

    • Contributor
      MarkHughes4096 went up a rank
      Contributor
    • Dedicated
      jordanspringer earned a badge
      Dedicated
    • Rookie
      Rimplesnort went up a rank
      Rookie
    • One Year In
      Markus94287 earned a badge
      One Year In
    • One Month Later
      Markus94287 earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      505
    2. 2
      +Edouard
      176
    3. 3
      PsYcHoKiLLa
      148
    4. 4
      ATLien_0
      92
    5. 5
      Steven P.
      79
  • Tell a friend

    Love Neowin? Tell a friend!