Showing posts with label JavaScript. Show all posts
Showing posts with label JavaScript. Show all posts

Friday, April 24, 2009

JavaScript Isn't So Weak

Alot of developers think that JavaScript isn't a powerful programming language to be used for professional development.  

Yes JavaScript have some weak points (just like every other programming language) But if you look around you will find websites like this one where it show how powerful JavaScript is for writting online games.

JavaScript is even popular for creating ritch Web 2.0 applications that include technology like AJAX etc. 

So the lesson to learn is to never judge before you actual used it... Like you can never judge C if you never wrote a line of code in it.

There will be no weekly source code this week.

Wednesday, April 15, 2009

Weekly Source Code: JavaScript.... Big Reason Why It Sucks

Today in the Web 2.0 world you do alot of JavaScript coding being DHTML, all the set of frameworks (jQuery etc) or do AJAX. The biggest thing that all JavaScript coders (even the pros) moan about isn't how difficult it is to test/debug JavaScript (tools like Firebug or JavaScript support in MS Visual Studio.Net 2008 IE make this very easy) but the dreadful word: "browser compatibility".... Yes Internet Explorer (IE) vs Firefox etc. All the things that make you want to scream / run away crying!

Its such a pain for me, since I use Google Chrome as my main default browser so everything just works but then later I found that it doesn't work in IE because of some browser compatibility issue or a weird way that IE handle some JavaScript.... The main problem here is that the browser companies (Microsoft, Mozilla etc) doesn't come together and work on a solid JavaScript standard. Ladies & gents, that is the reason why we've language standards!! There is a promise that the next version of JavaScript will be standard accross all browsers but thats only "promises".

For example:
var name = "Lennie";
alert(name[0]);
where you want the first characters e.g. "L" but in IE (IE is always the bad child it seams...) it returns "undefined" :-(

So you need to write it:

var name = "Lennie";
alert(name.charAt(0));

this works fine in all browsers.

So something to consider when your coding in JavaScript again.