Reply to this topic Topic Options
3 Pages V   [1] 2 3 ... Next
JavaScript Alternatives, Everything you need to know to ditch JS!
Computer Guru
Post #1 Jan 3 2006, 13:07


Mostly Harmless...
Group Icon

Group: Registered
Posts: 2,258
Joined: 23-April 05
From: The Great Middle East
Member No.: 107,016
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.gif

QUOTE
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?

Profile Card PM + Reply to Post Go to the top of the page

Log In or Register · Advertise on Neowin
Sam
Post #2 Jan 3 2006, 13:12


Neowinian Senior
Group Icon

Group: Registered
Posts: 3,213
Joined: 31-December 03
Member No.: 44,070
btw, AJAX = Asynchronous JavaScript and XML = Javascript
Profile Card PM + Reply to Post Go to the top of the page Email Poster
Computer Guru
Post #3 Jan 3 2006, 13:14


Mostly Harmless...
Group Icon

Group: Registered
Posts: 2,258
Joined: 23-April 05
From: The Great Middle East
Member No.: 107,016
I know sad.gif
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.gif

The Trouble with AJAX


Profile Card PM + Reply to Post Go to the top of the page
travl0r
Post #4 Jan 3 2006, 13:30


NeowinianČ
Group Icon

Group: Registered
Posts: 169
Joined: 6-March 05
Member No.: 99,684
Great article
I have been trying to use JS as less as possible for about ... 4 years hehe
but sometimes you gotta be quick sad.gif
it's a matter of time
Profile Card PM + Reply to Post Go to the top of the page
lunamonkey
Post #5 Jan 3 2006, 13:30


Nepicwin.net
Group Icon

Group: Registered
Posts: 8,253
Joined: 28-May 03
From: Swindon, England
Member No.: 29,476
# "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?
Profile Card PM + Reply to Post Go to the top of the page Email Poster
Computer Guru
Post #6 Jan 3 2006, 13:37


Mostly Harmless...
Group Icon

Group: Registered
Posts: 2,258
Joined: 23-April 05
From: The Great Middle East
Member No.: 107,016
Most people I have spoken to have tried *just* that... but JavaScript is buggy.

Wait. Don't get all worked up just yet wink.gif
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%?
0
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

Profile Card PM + Reply to Post Go to the top of the page
njlouch
Post #7 Jan 3 2006, 13:43


Neowinian Super Star
Group Icon

Group: Registered
Posts: 22,705
Joined: 14-January 03
From: Leicester, UK
Member No.: 21,654
A lot of your issues seem to be with how browsers and developers use JavaScript. The language itself is fine for it's purpose.
Profile Card PM + Reply to Post Go to the top of the page Email Poster
Computer Guru
Post #8 Jan 3 2006, 13:51


Mostly Harmless...
Group Icon

Group: Registered
Posts: 2,258
Joined: 23-April 05
From: The Great Middle East
Member No.: 107,016
But the thing is, when a language ends up being this mutilated and modified across different browsers, at what point does it stop being a browser issue and become a need for a new language?
Profile Card PM + Reply to Post Go to the top of the page
lunamonkey
Post #9 Jan 3 2006, 13:54


Nepicwin.net
Group Icon

Group: Registered
Posts: 8,253
Joined: 28-May 03
From: Swindon, England
Member No.: 29,476
QUOTE(Computer Guru @ Jan 3 2006, 13:37) [snapback]587008776[/snapback]

Wait. Don't get all worked up just yet wink.gif


I won't. I'm not ranting back, Imagine this is my face biggrin.gif

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 wink.gif

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).
Profile Card PM + Reply to Post Go to the top of the page Email Poster
njlouch
Post #10 Jan 3 2006, 13:54


Neowinian Super Star
Group Icon

Group: Registered
Posts: 22,705
Joined: 14-January 03
From: Leicester, UK
Member No.: 21,654
The language hasn't been mutilated at all. It's usage and interpretation has.
Profile Card PM + Reply to Post Go to the top of the page Email Poster
Computer Guru
Post #11 Jan 3 2006, 13:59


Mostly Harmless...
Group Icon

Group: Registered
Posts: 2,258
Joined: 23-April 05
From: The Great Middle East
Member No.: 107,016
QUOTE(lunamonkey @ Jan 3 2006, 15:54) [snapback]587008839[/snapback]


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.gif
Profile Card PM + Reply to Post Go to the top of the page
lunamonkey
Post #12 Jan 3 2006, 14:16


Nepicwin.net
Group Icon

Group: Registered
Posts: 8,253
Joined: 28-May 03
From: Swindon, England
Member No.: 29,476
QUOTE(Computer Guru @ Jan 3 2006, 13:59) [snapback]587008866[/snapback]

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


Sarky tongue.gif It never crossed their minds smile.gif

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.
Profile Card PM + Reply to Post Go to the top of the page Email Poster
Computer Guru
Post #13 Jan 3 2006, 14:40


Mostly Harmless...
Group Icon

Group: Registered
Posts: 2,258
Joined: 23-April 05
From: The Great Middle East
Member No.: 107,016
thanks wink.gif

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 wink.gif
Profile Card PM + Reply to Post Go to the top of the page
spartyjohnson
Post #14 Jan 3 2006, 14:43


I'm Spartacus
Group Icon

Group: Registered
Posts: 334
Joined: 18-April 03
From: Proud to be American
Member No.: 26,386
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.gif

Profile Card PM + Reply to Post Go to the top of the page Email Poster
Computer Guru
Post #15 Jan 3 2006, 14:47


Mostly Harmless...
Group Icon

Group: Registered
Posts: 2,258
Joined: 23-April 05
From: The Great Middle East
Member No.: 107,016
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 sad.gif 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.gif
Profile Card PM + Reply to Post Go to the top of the page
« Older · Web Client Side · Newer »
3 Pages V   [1] 2 3 ... Next  Reply to this topic