• 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

I know :(

But maybe we can make AJAX 2.0 with CSS instead of JS

The only reason I have not jumped to AJAX yet is just that... But read the comments on the link below.. yawnmoth has some code for using AJAX without JS! :yes:

The Trouble with AJAX

  • 0

# "Belive it or not, almost anything that can be done in JavaScript can be done with CSS."

Belive (sic) it or not, you can't do _almost_ everything. You can't even do _almost_ half.

# "JavaScript is that it tries to do too much, it has too much buggy code,"

That's the browser's fault, not the language itself. MS and NS and Moz all have their own ways of doing things.

"Buggy"??? Code has as many bugs as the developer writes. This is any language, not just JS.

#"and almost never displays the same or even properly across the major browsers. "

JS is just logic. It doesn't actually render anything except the mark up language that you tell it to. If there are bugs and differences, it's the developers fault (and perhaps the browsers fault for these differences.) You can't blame the language, the same could be said for C#.net or XSLT.

" "dhtml ...was a new language that came with a purpose, but was for some reason or the other turned down. It is important to note that DHTML quite often worked hand-in-hand with JavaScript to make stunning menus and effects,"

New language? No it wasn't. dhtml = changing css properties with javascript.

# "expect to see pure XML-driven webpages that use different server-side scripts combined with CSS"

Basically, is your point : "Get rid of Javascript and perform everything on the server"?

How about if people write well structured, well commented Javascript using proper naming conventions that displays and renders mark up that is accessible by everyone using a modern browser?

  • 0

Most people I have spoken to have tried *just* that... but JavaScript is buggy.

Wait. Don't get all worked up just yet ;)

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

  • 0

Wait. Don't get all worked up just yet ;)

I won't. I'm not ranting back, Imagine this is my face :D

I'm all for getting rid of redundant technologies and buggy code, but I don't feel as if it's javascripts fault.

Most of the webs horrors are down to developers. Bad developers who throw the latest fad at their website.

I remember the Maquee plague of 1998/99 and the Flash 4 (with sounds) epidemic of 2000.

The chromeless window fad of 2000/2001 was also a high point ;)

I do honestly think we'll have an ajax red alert in 2006.

Any technology will get tried and tested until death, but I don't think Javascript is going to die any time soon. I don't think it should just yet either.

Perhaps they just need to re-evaluate it, standardise it and removed half of the features to be left with just logic and far fewer methods.

Also, I seriously hope that CSS is never used as an alternative to Javascript for logical programming (as you hinted in your blog).

  • 0

Any technology will get tried and tested until death, but I don't think Javascript is going to die any time soon. I don't think it should just yet either.

Perhaps they just need to re-evaluate it, standardise it and removed half of the features to be left with just logic and far fewer methods.

Also, I seriously hope that CSS is never used as an alternative to Javascript for logical programming (as you hinted in your blog).

Damn! can you belive it never crossed my mind to have JS standardized???? :pinch:

  • 0

Damn! can you belive it never crossed my mind to have JS standardized???? :pinch:

Sarky :p It never crossed their minds :)

I mean - They should revisit it / give it a new name / make the methods consistent / at least make it case sensitive / remove crap like font style methods and redundant pop up methods (nice example by the way) .

I mostly agree, but I put more blame at people like me, the developers. We find something cool, try it out, leave it there. We can't guess what's going to happen in 3 years time to a technology.

For all we know, CSS could be replaced with something even greater, more standardised, etc... etc...

The earth used to be flat remember.

  • 0

thanks ;)

nicely put... but I'm a developer too, and I think the most we can do is try our best to diffrentiate between "fad" and "useful step forward"

Have you seen the registration page on IPB 2.1? very simple and subtle usage of AJAX to check if the email address or username you chose has been used before... if it is ok the feild glows green, and if its not it turns red... nothing overdone...

Then you have Personalized Google Homepages on the other end with drag and drop sentences and everything way over done.. followed closely by Live.com...

Then you have 'too much but dead useful' application of AJAX on the new Kahuna Mail from MS... used to make custom right click menus and drag and drop messages that make you feel you are in Outlook 12..

rambling on and on.. don't even know what i am trying to point out here ;)

  • 0

I have been thinking of this more and more. I think it would be great to create a web scripting language that supports classes, true OOP and is standardized. Input would be taken from the developers of the web browsers, but it wouldn't be up to them to integrate the scripting into the browser. Make it a Browser Helper Object that could integrate with IE, Firefox, Mozilla, and Opera.

Just a thought. :whistle:

  • 0

that is definitely the bud of a good idea.

The fact that it will be externally supported via activeX or whatever by a 3rd party plug in means two things:

1) Users can use their favorite browsers and still experience the web in the latest and most compliant form...

2) It will run slower :( because it is not 100% integrated code.. but I doubt the speed difference would be TOO big.. just the tmie required for ht eplgin to load.. and if it is preloaded....

2) convince firefox and ie and opera to ship it with their product.. cuz god knows most ignorant PC users won't have any idea what the hell it is :rolleyes:

  • 0

Does anybody know of anything that has already been suggested like this? I find it hard to believe that I am the only person that is thinking this thought.

If not, I guess we could startup a sourceforge project, but it would need actual support by developers. My last sourceforge project didn't go over well (Not really management material I guess...;))

  • 0

Well I have quite a few startup projects and stuff... and IMO made out of management material...

But this is a BIG idea.. and needs many developers, some $$$$, and some sponsors....

BTW i am more of a software than web guy.. well, much more... ;)

  • 0

I don't know exactly how to get ahold of those resources. I believe though that if something like this doesn't already exist it would be quickly adopted by the web community because we are not the only people outraged by the current solution of web scripting. Once the adoption of a new technology takes place the rest of the community will follow suit and it will become bundled into browsers.

  • 0

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

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

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

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

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

  • 0

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

Client side scripting in CSS seems even uglier.

It's not logical to suggest that, for example, setting and reading client side cookies should be done in a stylesheet. :s

Content in xhtml

Design in css files in head of xhtml

Client side logic in script files in head of xhtml

Server side logic in code behind page in dotnet (c#, vbscript).

the method seems fine to me, but I agree the language itself needs a tidy.

  • 0

It seems to me that we could simply use a <ref> tag and reference the main class of a script from the HTML file. I have never seen scripting done in CSS and cannot say how that would look, but I think it would be messy to do scripting where layout and presentation are done.

  • 0

Most people I have spoken to have tried *just* that... but JavaScript is buggy.

Wait. Don't get all worked up just yet ;)

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

I am a web developer and I use Javascript all the time. My code works on Firefox, IE and I never had any complains from customers.

  • 0
Yeah link ref seems to be the most popular now for RSS and CSS and the rest...

Let's keep with *SS them and make it JSS.. JavaScript Super Sized :D

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.

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

    • 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
    • Week One Done
      Markus94287 earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      505
    2. 2
      +Edouard
      175
    3. 3
      PsYcHoKiLLa
      155
    4. 4
      ATLien_0
      90
    5. 5
      Steven P.
      79
  • Tell a friend

    Love Neowin? Tell a friend!