"What ASP.NET Developers Should Know About JavaScript" is the title of a presentation I'll be giving at VSLive! next month.
I don't plan for this to be a talk that features ASP.NET AJAX, or JavaScript data types. Instead, I want to focus on two key concepts I had to discover after I decided that I couldn't ignore client-scripting any longer:
I think these concepts are keys to understanding modern JavaScript libraries. I hope that driving home these two concepts will let a developer understand what the following code is doing, and why it works. The example is contrived, but if you can understand the following code you can follow many of the JavaScript patterns in use today.
There are lots of ancillary topics in the above code: object notation, prototypical inheritance, and the evils of the global object, just to name a few. However, given just 60 minutes I think that coming to grips with #1 and #2 lays a solid foundation for moving forward in the AJAX jungle.
Comments
I think that's a great topic for a session too - I think there should be more slightly general sessions like these at developer conferences - it's so rare to see this sort of thing at Microsoft based dev conferences these days...
Thanks
Aki
Javascript has really been an enlightening experience to learn, and, oddly enough, it's making some of the functional programming aspects of C# 3.0 easier to grasp.
Two years ago, if someone mentioned an anonymous delegate creating a closure I would have glazed over. Today, I can instead just whine that my employer chose VB. ;)
The script the sample includes is from the MS AJAX library (http://ajax.asp.net). You can download, install, and then copy this script from a subfolder in the install directory.
As for resources - it's hard. There are a good books, and the best web resource is Douglas Crockford's : http://www.crockford.com/