Quantcast
Channel: The Microsoft MVP Award Program Blog
Viewing all articles
Browse latest Browse all 788

Script References in Visual Studio 2013

$
0
0



Editor’s Note: In partnership with Microsoft Press, now celebrating their 30th year, MVPs have been contributing to an ongoing guest series on their official team blog. Today’s article is from ASP.NET/IIS MVP
James Chamberswhich is the 32nd in the series.

Some of the gems that make Visual Studio the best development environment are so humble that you’re likely to miss them. The updates to script references, in my opinion, fall into that category while still improving on an already great feature of the product: IntelliSense for JavaScript.

A Little Background on IntelliSense

IntelliSense has been featured for nearly two decades now in Visual Studio’s lineage, dating back to 1996. Developers have become so accustomed to using it that when you spend any time in a different development environment you immediately feel impaired.

 

Figure1.png

IntelliSense is great for learning APIs, object exploration and, when used well, can dramatically speed up the time it takes to write code. It also has the nice side benefit of allowing us to write appropriate and descriptive property and method names without having to worry about how long it would take later to access those members by typing them out L-E-T-T-E-R-B-Y-L-E-T-T-E-R.

When feature phones started introducing autocomplete, I was like, “Pfft! I’ve had autocomplete for years!”

IntelliSense for JavaScript

Let’s be honest here, the web’s kinda caught on now, almost to the point where it might stick around. More and more of the code we write has gotten closer to the client, especially in web development where we strive to create rich and interactive experiences for our users. It became increasingly painful to have to flip from a .Net language to JavaScript and lose our ability to navigate across objects. Where, in C#, we could dot-type into our objects, we’d always have to jump out to a separate JS file or spin up a browser to find out more about the methods in a JavaScript library.

Thankfully, Visual Studio 2008 introduced the first bits that really helped us gain some IntelliSense over our JavaScript, however the context was limited to pages and scripts where references were located, and the scripts they referenced and so on. This breaks down pretty quickly when you have partial pages that don’t reference the scripts you’re using or when you’re working on your own JS libraries that don’t immediately load a library but still depend on it (such as a jQuery plugin).

Visual Studio 2010 helped out by pseudo-executing our code, improving performance, and adding type inference on JavaScript objects and variables. Then Visual Studio 2012 came along and upped the game by introducing the Chakra runtime from IE, further improving performance and shipping with an editor that supported the _references.js global references file. 

So what was left for Visual Studio 2013?  To continue reading the full article click here

About the author

 

James Chambers is a husband, father, speaker, author and Senior Software Developer in Canada, where he once made a snowblower out of three electric toothbrushes, a shovel and duct tape, all while fighting off an angry pack of polar bears. His development passions are fueled by new tech, new tools and mentoring others. Outside of geeking, James is driven to help find a cure for Juvenile Diabetes, ensure children world-wide have access to clean drinking water and to find ways to better distribute the world's food supply. Follow his coding adventures and other exploits at http://jameschambers.com.

About MVP Mondays

The MVP Monday Series is created by Melissa Travers. In this series we work to provide readers with a guest post from an MVP every Monday. Melissa is a Community Program Manager, formerly known as MVP Lead, for Messaging and Collaboration (Exchange, Lync, Office 365 and SharePoint) and Microsoft Dynamics in the US. She began her career at Microsoft as an Exchange Support Engineer and has been working with the technical community in some capacity for almost a decade. In her spare time she enjoys going to the gym, shopping for handbags, watching period and fantasy dramas, and spending time with her children and miniature Dachshund. Melissa lives in North Carolina and works out of the Microsoft Charlotte office.


 

 


Viewing all articles
Browse latest Browse all 788

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>