Product review: Visual Studio 2008 advances with few missteps
Solid upgrade to Microsoft's IDE holds improvements for users of every level; highlights, including language-integrated data queries, new graphical design surfaces, and support for Vista, Web 2.0 technologies, and multiple versions of .Net Framework, overshadow a few nits
Introducing .Net Framework 3.5
VS08 is the first version of Visual Studio to support .Net Framework 3.5. It is also the first to target multiple versions of .Net Framework (2.0, 3.0, and 3.5). Previous versions of Visual Studio supported only one version of .Net Framework, forcing developers to either maintain multiple versions of Visual Studio or to upgrade all their projects to the current version of .Net Framework. Multi-targeting is a welcome enhancement; it is included in Standard Edition and above.
I wish Microsoft had gone a little further in this direction. It's too bad that Microsoft didn't also provide targeting for .Net Framework 1.1 and easy bidirectional conversion between VS08, VS05, and Visual Studio .Net 2003 projects.
.Net Framework 3.5 has a number of new class library and language features. These include Language-Integrated Query (LINQ), Web 2.0 and SOA-related enhancements, integrated workflow, peer-to-peer protocols, and Microsoft Office support.
The tooling for all of these is found in VS08. So, for example, VS08 Standard and above have LINQ support in Visual Basic .Net and Visual C#, including an Object Relational Designer, the SQLMetal command-line tool, LINQ-aware code editors, and debugger support.
Language-integrated queries with LINQ
LINQ is a generic mechanism with many possible components. LINQ brings data queries into the C# and Visual Basic languages, and makes the syntax for queries against in-memory data structures just like queries against file systems, XML files, and SQL databases.
Several of the LINQ components and providers shipped in VS08, including LINQ to Objects (strings, reflection, and file directories), LINQ to XML, and LINQ to ADO.Net. LINQ to ADO.Net includes two components: LINQ to DataSet and LINQ to SQL. The more ambitious ADO.Net Entity Framework and LINQ to Entities are not included in VS08, but may ship later this year as an add-on.
I tested LINQ to SQL in C# against a SQL Server 2000 database. The object-relational diagram in this screen image was automatically generated by dragging the tables from a database. A set of callable, LINQ-compliant classes was automatically generated as well.
The Object Relational Designer worked well to create C# classes from the database schema, and IntelliSense worked well when I was writing LINQ queries. On the other hand, writing LINQ queries by hand against three related tables pushed the limits of my nascent LINQ skills, and I longed for the LINQ equivalent of VS08's graphical SQL Query Designer. I never did figure out how to write the LINQ equivalent of a SQL "SELECT DISTINCT" query.
IntelliSense, refactoring, unit testing, and metrics
When I was working on this small project, I found that the C# refactoring functionality (included in Professional and above) worked well and quite smoothly. When editing C#, the programmer can take advantage of automated refactoring, as shown in the popup menu of this screen image. There is full IntelliSense support for LINQ (see the code that starts with “var qAV” in the figure). Code metrics (at the bottom of the figure) are calculated only for managed code.