Developers pick favorite Visual Studio 2010 features.
Instead of thinking of recently released Visual Studio 2010 as just another integrated development environment, Microsoft is pitching it as a full-fledged platform for developing all things Windows--desktop, Web, mobile, enterprise, and everything in between. But being "full-fledged" requires tools and features, and lots of them.
Visual Studio 2010 has features you'd expect of any IDE, like an editor and debugger. It also has visual design tools. But what makes it more than just another IDE is extensibility. Like previous versions, Visual Studio 2010 accommodates third-party and roll-your-own macros, plug-ins, add-ins, and packages. Being able to adapt tools to fit the development environment instead of the other way around is a powerful capability, particularly when it comes to programmer productivity.
All this feature richness is great, but at some point it runs the risk of feature bloat, bogging down resources and performance in the process. Remember the Ada programming language? Oft described as having everything including the kitchen sink, Ada was ahead of its time with object-oriented and other capabilities. But its plethora of features was more than most developers could handle, and it never went mainstream. That's something the Visual Studio team should keep in mind.
That said, to find out more about Visual Studio 2010's features, I asked top-flight Windows programmers what they like best about VS2010.
Code Contracts Guarantee
Visual Studio 2010's Code Contracts is a .NET 4.x feature with tremendous potential. Code Contracts are methods developers use to define the terms of service of a given class and its methods. They're based on Bertrand Meyer's Design by Contract concept, where each method indicates the conditions that must be verified for the code to execute, the conditions that will be verified after the execution completes, and the conditions that never change during the life of any class instance.
Code Contracts let you strictly define the specs for each class and method and go a long way toward proving the semantic correctness of code. Once you define Code Contracts, you can use them as exception handlers in your code or just keep them as specifications.
Visual Studio 2010's Static Checker analysis tool uses Code Contracts. It runs in the background for each build, checking whether each method gets and returns proper values based on the declared contract.
The result? You get warned at compile time about code that compiles OK but will fail at runtime.
-- Dino Esposito, software consultant
IntelliSense Makes Sense
We already know that IntelliSense, which displays a list of every accessible element in a namespace, class, and object, can have a big impact on developer productivity. Improvements to it in Visual Studio 2010 promise to make developers even more productive.
In previous Visual Studio versions, even after you entered characters to refine an IntelliSense search list, you still had to search through the list for the grouping you were looking for. For instance, if you wanted to see all classes that contain the word "Exception" in the System namespace, you could refine the IntelliSense list. But the only way to actually find the group of classes with "Exception" in the system namespace was to manually scroll through all the IntelliSense items to find where your target items were grouped.
With the improved IntelliSense for Visual Studio 2010, if you want to find all the classes in the System namespace that contain "Exception," all you do is type "System.Exception," and the list is populated with every class in the System namespace that contains the word "Exception."
Essentially, IntelliSense now performs a strstr-style search instead of a strncmp-style search. It's a simple improvement that leads to great productivity gains.
-- Robby Powell, group product manager, GrapeCity
Do More With Multimonitors
Multiple monitor support in Visual Studio 2010 lets me use both my monitors and see code in full screens. The split-screen feature that came out with Visual Studio 2008 was nice, but I could only work on one form at a time and on one monitor. Because I had to keep scrolling the different split screen, I didn't use that feature to its full extent.
Multiple monitor support will let me view as much code as possible using both my monitors. And it's simple to use; I can take any embedded tab item in Visual Studio--a designer, code, or markup--tear it from the main window and drag it anywhere I want.
-- Jason Beres, product management director, Infragistics
Visual Studio 2010 debugging windows--Parallel Stacks and Parallel Tasks--provide invaluable information about the way tasks and threads interact to run code in parallel.
The Parallel Tasks window displays a list of all the tasks and their status--scheduled, running, waiting, waiting-deadlocked, and so on--providing a snapshot of what's going on with each one. You can order and group information shown in the windows. You can double click on a task name to access the code that's being run by it.
The Parallel Tasks grid shows a column, or Thread Assignment, that displays the ID for the thread shown in the Threads Windows, letting you see which managed thread is supporting a task's execution.
The Parallel Stacks window displays a diagram with all the tasks or threads, their status, and their relationships. Switch from the Tasks view to the Threads view to see the whole map of what's going on with tasks and managed threads in your parallelized code.
-- Gaston Hillar, IT consultant
The single most-useful new feature is the design-time support and property window available for Silverlight applications. While I use Expression Blend a lot and still prefer it for creating the initial layout of screens, the integrated Visual Studio 2010 visual designer for Silverlight definitely saves time.
Silverlight 3 had no designer support within Visual Studio, so having a way to visually move controls around, change properties, and even hook up data bindings is welcome. I can open an XAML file and directly adjust properties of controls. Data bindings can be set directly through the data-binding window.
If you're a Silverlight developer, you'll use the new visual designer a lot. It's not as powerful as Expression Blend and doesn't let you do things like edit control templates, but it does provide a more efficient development workflow that boosts productivity.
-- Dan Wahlin, founder, The Wahlin Group
With UML design tools now built-in, no longer do you need to depend on Visio, Rational Rose, or other UML design tools to create UML diagrams. Now you can do it from within Visual Studio.
Visual Studio 2010 provides support for Use Case, Class, Sequence, Activity, Component, and Layer diagrams. You can use the built-in UML modeling tools for conceptual and logical analysis during the software development cycle.
And, there's a new project type called "Modeling Projects" in your "Add New Project" dialogue to control and organize the UML diagrams. Moreover, you can save your UML diagrams as images or in XML Paper Specification (.xps) formats.
-- Joydip Kanjilal, software consultant
F# Made Easier
When learning a new programming language, immediate feedback from an interactive console helps. That's certainly the case with support provided for F#.
Modern functional languages such as F# Interactive are becoming the paradigm of choice for working with multicore processors. Visual Studio 2010's F# interactive window lets you to run F# code interactively or execute F# scripts. It executes a read, evaluate, and print (REPL) loop cycle for the F# language. Granted, you can run the fsi.exe console application, but the F# Interactive window is more convenient and instructional.
To access this new window, select View, Other Windows, F# Interactive in the IDE's main menu. Once you enter two semicolons (;;) to terminate a line or several lines of code, F# Interactive attempts to compile the code. If successful, it executes the code and prints the signature of the types and values that it compiled. Of course, the interpreter will print error messages if something goes wrong. Code entered in the same session has access to previously entered constructs, a useful feature to test code before creating an F# program.
Building A Mobile Business MindsetAmong 688 respondents, 46% have deployed mobile apps, with an additional 24% planning to in the next year. Soon all apps will look like mobile apps – and it's past time for those with no plans to get cracking.
Join InformationWeek’s Lorna Garey and Mike Healey, president of Yeoman Technology Group, an engineering and research firm focused on maximizing technology investments, to discuss the right way to go digital.