Contents tagged with JavaScript
-
Woohoo! I'm on TV!
The latest episode of the .NET show is all about ASP.NET Ajax. Brad and Matt first have a really interesting discussion of the history and architecture of ASP.NET Ajax and then you can see me demo-ing UpdatePanel, extenders and localization.
-
The format for JavaScript doc comments
Xml documentation annotations are going to drive JavaScript IntelliSense in Visual Studio Orcas (the next version of Visual Studio). For more than a year now, we've been including xml doc comments to all public APIs in the Microsoft Ajax Library (which are a great place to check out some examples of those comments). We also use the doc comments to automatically generate parameter validation code in the debug version of our scripts.
-
How to keep some context attached to a JavaScript event handler?
The problem is the following... You want to attach a handler to a DOM event but you want some information to remain associated with it. Let's say for example that the handler is a method of an object that makes use of the "this" pointer somewhere in its body (as it should, otherwise it should probably be static). As the API to attach a handler just takes a function pointer, and the "this" pointer is determined by the DOM element that triggered the event, it seems difficult to do. The Microsoft Ajax Library (like almost all Ajax libraries, let's be honest) provides an easy way to work around that. If you call:
-
Scott on JSON hijacking
Scott has a great post on how ASP.NET Ajax has built-in mitigations already in place for JSON hijacking attacks:
http://weblogs.asp.net/scottgu/archive/2007/04/04/json-hijacking-and-how-asp-net-ajax-1-0-mitigates-these-attacks.aspx -
Microsoft joins OpenAjax
I'm extremely pleased to announce that we're joining OpenAjax today and that I'll represent the company in the organization's meetings starting this Thursday. This is a way for us to ensure that our user community can combine the Microsoft AJAX Library and ASP.NET 2.0 AJAX Extensions with other frameworks, today and in the future. Interoperability in the browser is a hard problem but it opens key Ajax scenarios. An industry-wide organization such as OpenAjax is a great way to ensure this goal is met in the long-term.
-
What are these Foo$Bar$baz functions in the Microsoft Ajax Library files?
If you've looked at the debug version of our JavaScript files, you may have noticed code similar to that:
-
What happens when Mozilla, Microsoft and Opera get together under Douglas Crockford's moderation?
A very interesting conference that's available from Yahoo!. Douglas Crockford's introduction is worth the watch in itself but the others also have very interesting things to say.
-
ASP.NET Ajax-aware JavaScript IntelliSense available from the Orcas CTP
This is an absolutely awesome feature. IntelliSense / autocompletion for JavaScript is a difficult problem (because of the dynamic nature of JavaScript) which the Visual Studio team is brilliantly solving. They were able to build an elegant solution to the problem that works reasonably well on plain JavaScript, but really shines when used with ASP.NET Ajax. The type information that we added to our debug scripts through doc comments really helps in making the whole experience seamless.
-
We shipped!
I'm very proud to announce that ASP.NET Ajax 1.0 shipped this morning. This is the result of all the work we've done since the first CTP and of all the very valuable feedback from our early adopters. I can't stress this enough: this product is probably one of the Microsoft products that incorporated the most user feedback. It is also to my knowledge the first time that Microsoft releases the full source code for a supported product (yes, we have full 24x7 support for ten years).
-
From closures to prototypes, part 2
In part 1 of this post, I exposed the differences between the closure and the prototype patterns to define JavaScript classes. In this post, I'll show the shortest path to convert an existing class built using Atlas and closures to a prototype-based class. I'll also show a few caveats that you need to be aware of.