Category Archives: JavaScripting

TypeScript, JavaScript, and Dart

Very intresting talk about JavaScript with two smart guys behind TypeScript and Dart. First I thought these two new languages are the same thing. Meaning, TypeScript is a copy of Dart but actually they are quite different.

Quoting Scott Hanselman:

People have compared TypeScript to Dart. That’s comparing apples to carburetors. TypeScript builds on JavaScript so there’s no JS interop issues. Dart is a native virtual machine written from scratch. Dart interops with JavaScript…but it’s not JS. It doesn’t even use the JavaScript number type for example.

From Why does TypeScript have be the answer to anything?

jQuery IntelliSense support in VS

I was hoping that it would happen but I never believed that Microsoft would involved themselves in OpenSource library. But luckily I was wrong. ScottGu writes:

I’m excited today to announce that Microsoft will be shipping jQuery with Visual Studio going forward.  We will distribute the jQuery JavaScript library as-is, and will not be forking or changing the source from the main jQuery branch.  The files will continue to use and ship under the existing jQuery MIT license.

It seems that Microsoft is really starting to turn their ship towards Open Source, it is great to see that they did choose best technology for developers.

Atlas will be Microsoft AJAX Library

This is pretty obvious but I am going to make post anyway since I need to start to fork yet another JavaScript library. Atlas Javascript Library will be renamed to Microsoft AJAX Library and server-side stuff ASP.NET 2.0 AJAX Extensions.
From Ajaxian

–clip–

Scott Guthrie has announced the “Atlas” 1.0 Naming and Roadmap, which includes the news that Atlas 1.0 will ship around the end of this year, that it will become “fully supported” by Microsoft.

–clip–

Spam blocking with JavaScript and CSS

I got inspired by kari patila’s post where he uses CSS class to hide spam text using CSS and I wrote something my own by using JavaScript and content to write email address.

.email:after {
content: “@jpkeisala.com”;
}

<a class=”email” xhref=”http://www.jpkeisala.com/v6/#” mce_href=”http://www.jpkeisala.com/v6/#” onclick=”window.location = ‘mailto:’+this.innerHTML+’@jpkeisala.com’”>jp</a>

a bit ugly but i think it works.

When JavaScript is cool…

This is really cool especially for me old dhtml dude/today XSLT dude (and seems like AJAX dude tomorrow).

$(“ul#menu>li[ul] a.active”).toggle(function(){}

So, what is going on above? I am writing CSS selectors combined with XPath to target specific elements. Library that makes this all possible is called jQuery

XPath is a part of a part of it’s jQuery expression language together with CSS.
jQuery is really worth of checking out.

Yahoo Mail Worm

Now that the Rich Internet Applications are getting more and more popular, just like any other environment we are getting problems from the bad guys.  Now that the door is opened publicly there will be lots of crackers crawling through AJAX codes and finding holes to insert their own little exploits, this of course means that more security problems like the Yamanner worm are along the way.

What makes it a problem in AJAX world is that source-code is relatively easy to get and for writing an exploit you don’t have to be a clever guy, it’s pretty easy. Also for AJAX developers it’s very hard to filter out possible exploits and write safe JavaScript.

So how to solve security problems that JavaScript brings us?

Btw: Here is a source of XHR object that made all this possible.