about
framework & approach
knowledge network
news & events
technology council
why join?

Friday, February 29, 2008

VS 2008 - Javascript Intellisense

It's a big step in the right direction, but there are still some things that need to be figured out. My biggest problems are:
  • Lack of intellisense support within the prototype. Let's say I'm writing a JS "class". Intellisense seems to work well for all external libraries that are properly referenced, but I can't access the current class methods and properties within its prototype. "this" doesn't give me any choices.
  • Some methods referrencing the DOM rather than javascript objects seem to not work as expected. The first one that comes to mind is "$get()" in the MS Ajax library. Using getElementById() shows all the DOM element properties and methods, but the "$get" shortcut doesn't. It's a real pain actually, and it looks like a bug. It seems like DOM element are described via "isDomElement=true" in the comments rather than the "type" attribute, but it doesn't seem to work properly. I've found multiple posts about the topic, but no response from Microsoft.
  • Not support for code folding / outlining. That seems like a pretty basic feature - all other JS editors offer it, and I don't understand why it didn't get implemented. It makes long javascript files a big pain to edit.

Overall, JavasScript Intellisense works really well if you write small snippets of code referencing well-described external files. Referencing Web Services works really well, too. But if you're writing complex components, it's not going to do much for you.

0 comments: