Directions
on Microsoft Publications Separator Contact Us Separator About Us Separator Samples Separator Subscribe Separator Jobs
Home > Samples > Update > August 2007
 previous sample more recent sample
Visual Studio 2008: A First Look

[bio]

The following is the full text of an article published by Directions on Microsoft, an independent research firm focused exclusively on Microsoft strategy & technology. More samples of our content, as well as a list of upcoming articles and reports are also available.

Visual Studio (VS) 2008, now in beta and due to ship by the end of 2007, includes the latest version of the .NET Framework, significant improvements in the way developers query databases, and better support for developing applications with Office 2007. However, there will be few improvements for application modeling or support for the Dynamic Systems Initiative (DSI). Visual Studio Team System (VSTS), Microsoft's product for allowing teams of developers, testers, architects, and managers to collaborate more efficiently, sees only minor improvements.

LINQ Leads Language Improvements

The most significant improvement to Visual Studio 2008 (formerly code-named Orcas) and the accompanying .NET Framework 3.5 is the introduction of Language Integrated Query (LINQ), which provides developers with the ability to write SQL-style queries directly from within the Visual Basic (VB) and C# programming languages. LINQ promises developers a single consistent way to retrieve and update almost any type of data, which in turn can speed programming for most business applications.

LINQ consists of an updated set of .NET class libraries that provide basic query functionality, along with changes in the VB and C# programming language to make those capabilities more accessible. (The C++ language also can use the underlying class libraries, but it does not include any language extensions, so accessing LINQ from C++ is not as convenient as with C# and VB.)

Applications that access data, particularly data stored in relational database management systems (RDBMSs), often contain important logic that isn't expressed in the programming language but is instead represented as plain text (usually in quotation marks). For example, when a program queries a database for all attributes of customers living in a particular Zip code, ordered from highest sales to lowest, the program isn't using any of the traditional features of programming languages, such as IF and WHILE statements. Instead, it assembles a database query as plain text (e.g., "SELECT * FROM Customers WHERE ZipCode = '20212'") and sends that statement to the database.

With LINQ, the same queries can be expressed using built-in language features, enabling the compiler and integrated development environment (IDE) to assist the developer with features such as statement completion and checking for potential errors before the code is run. (For an illustration of how LINQ appears in Visual Studio, see "LINQ in Action".)

Some database-oriented programming languages, such as those used in dBase and FoxPro, have incorporated SQL queries, but LINQ differs from those in several significant ways.

First, LINQ doesn't incorporate any specific dialect of SQL. Instead, it takes concepts common to all query languages, such as ordering, filtering, and joining data from multiple tables, and allows each programming language to incorporate those in a way that makes sense for the particular language.

Second, unlike previous attempts, which were tied to a specific database engine, LINQ is a general-purpose query system that is extensible to almost any data source.

Microsoft includes LINQ support for several data sources, including built-in .NET data types, such as lists and arrays; SQL Server; and XML.

In addition, a LINQ query can combine data from multiple sources. For example, an in-memory list of customer names and addresses can be joined with a database containing account information. This flexibility, along with extensibility to add new data sources, means developers can use a single set of commands and libraries for retrieving and updating almost any type of data.

VB and XML

Although LINQ is the most significant language improvement in VS 2008, it is not the only one. For example, Microsoft has built support for processing and handling XML directly into VB, although not C#. The new feature could make it easier for VB programmers to create and manipulate XML data from within their programs.

The fact that the C# team chose not to incorporate the same feature illustrates the different design philosophies behind each language. Since its inception, the C# team has been working to avoid making language changes that, although useful in the short-term, create future headaches. The VB team, on the other hand, is focusing on addressing whatever problems developers are facing today.

The VB approach can deliver short-term benefits: it will almost certainly be easier to use VS 2008 to manipulate XML data from VB than from C#. But history shows that there are risks as well. Although it's hard to see XML becoming irrelevant, in 1999 the same could have been said of COM when VB6 integrated COM into the programming language. But by 2002, Microsoft had shifted away from COM in favor of the .NET Framework and VB6's language support was not just irrelevant, but it had become an obstacle to moving VB to the .NET Framework.

Developers must decide which they prefer: C#'s more cautious and forward-looking approach, or VB's willingness to try to solve current problems.

C++ Focuses on Native Development

Since the introduction of the .NET Framework, Microsoft has tried with Visual C++ to keep a foot in both the traditional world of native Win32 development and the emerging world of .NET development. Despite those efforts, C# and VB are much more popular than C++ with .NET developers. With VS 2008, Microsoft is focusing its C++ efforts on native Win32 development, while also making some improvements in interoperability with the .NET Framework.

Vista user interface (UI). Improvements to the Microsoft Foundation Classes (MFC) enable applications built with that framework to use Vista's new common dialog boxes and controls.

User Account Control. VS 2008 allows C++ developers to indicate whether their applications require administrative privileges, helping them work better with Vista's User Account Control feature.

Multiprocessor builds. The C++ compiler now has the ability to compile multiple files in parallel, potentially providing a dramatic improvement in compile times, particularly on multiprocessor or multicore systems.

.NET interoperability. VS 2008 contains a version of the C++ Standard Template Library (STL) designed to work with the .NET Framework, enabling those C++ developers targeting the .NET Framework to use a library they are familiar with.

Catching Up to the Platform

VS 2008 ships with an updated version of the .NET Framework, version 3.5. The new version includes the same core runtime as versions 2.0 and 3.0. The .NET Framework 3.0 shipped with Windows Vista and introduced the Windows Presentation Foundation (WPF), Windows Communication Foundation (WCF), and Windows Workflow Foundation (WF). Version 3.5 adds support for LINQ and Silverlight (Microsoft's cross-platform version of WPF, aimed at Internet video and Rich Internet Applications), among others.

Although developers can use VS 2005 to create applications for the .NET Framework 3.0, VS 2008 is the first version of the product specifically designed for the new framework. New features aimed at supporting the .NET Framework 3.0 include the following:

Multitargeting build system. Previously, applications built with a particular version of VS were tied to a particular version of .NET. For example, VS.NET 2003 targeted .NET Framework 1.1 and VS 2005 targeted .NET Framework 2.0. Developers who needed to build applications that ran on an older version of the framework had to keep multiple versions of VS installed and switch between them. With VS 2008, developers can build an application that runs on .NET Framework 2.0, 3.0, or 3.5 from within the same IDE, eliminating the need to have multiple versions of VS installed—one for developing current applications and another for maintaining older ones.

New project types. The New Project dialog box in VS 2008 now includes projects for ASP.NET applications that use AJAX, WPF applications, and WCF services, among others. (A separate beta that adds Silverlight projects is also available.) In addition, the New Project dialog box contains a drop-down menu listing versions of the .NET Framework. Choosing an older version of the Framework restricts the types of projects the developer can create to those that are compatible with the chosen version of the framework.

XAML designer. Developers using WPF or Silverlight now have a graphical tool for editing the XML Application Markup Language (XAML) files that describe the UI of their applications. Graphic designers can use the Expression tools to create user interface elements, including animations, as XAML files and developers can use VS 2008 to edit those files through either a WYSIWYG display or through the existing XML editor. Changes made in one view are immediately displayed in the other. In addition, when the developer selects an element in one view (by clicking on a bitmap image, for example), the corresponding section of the XAML file is selected as well.

Web services hosting. VS 2008 makes it easier for developers to test and debug WCF-based Web services by providing a built-in host for the service to run in. With previous versions, developers explicitly had to create a test harness to run their services, but VS 2008 takes care of that automatically.

Gaps in Platform Support

However, some gaps in VS's support for the .NET Framework remain. First, VS 2008 does not include specific tools for editing WCF's XML configuration files. These files are used to separate the core business logic of a Web service from the details of how the service is invoked, such as the URL of the Web service or the security mechanism that the service requires. Although editing XML directly can be very efficient for developers with significant WCF experience, a customized editor would make it much easier for developers to discover the various options that WCF offers.

Second, Expression Blend, Microsoft's tool that allows designers to combine video, text, vector graphics, and bitmap images to create animations based on XAML, uses the VS 2005 project system. Therefore, projects created with Expression Blend must be converted before being used in VS 2008, after which they can no longer be used in Blend. Blend 2.0 should fix this problem although no ship date has been announced. Until then, Microsoft is providing a utility to that allows developers to reconfigure Blend for the VS 2005 and VS 2008 project systems as needed.

Tools for Office Included

VS is not only a tool for building .NET applications. Visual Studio Tools for Office (VSTO) allows developers to build applications that extend Word, Excel, and other Office applications. VS 2008 includes new features that allow developers to take advantage of Office 2007 and makes VSTO available to a broader set of developers.

Office 2007

For end users, the most obvious change in Office 2007 is the introduction of a redesigned UI. The new UI abandons the fixed structure of menus arranged in a menu bar. Instead, it features a "ribbon," an enlarged toolbar that shows labeled command icons for the user's current activity. The commands on the Ribbon change dynamically as the user works, presenting commands relevant to the user's activity. Custom ribbons are defined via XML files, but VS 2008 provides a graphical tool that lets developers create and edit their own ribbons rather than editing the XML file with the text editor.

In addition, custom Office applications typically have a document or template associated with them. For example, a custom expense reporting application would typically have a spreadsheet for the user to enter expenses and would include code to look up account numbers or expense codes from a corporate ERP system. With VS 2005 and Office 2003, developers were able to edit the underlying Office document directly from within VS, but with Office 2007, developers had to edit the underlying document separately from the custom code. VS 2008 allows developers to edit Office 2007 documents directly, making it easier for them to create custom Office applications.

(For an illustration showing both custom ribbons and editing Office documents in place, see "Office Tools in VS 2008".)

VSTO Included in More Editions

VS 2008 makes Office development simpler by including VSTO features in the Professional Edition of VS 2008. With VS 2005, VSTO was licensed separately: the Professional Edition lacked the ability to build Office applications. Developers who wanted the VSTO features as well as all the features of the Professional Edition (such as support for the C++ language and building applications for mobile devices) either had to license Visual Studio Team System, at a considerably higher price than other editions of VS, or license both VSTO and VS Professional.

The move to include VSTO features in VS Professional should make Office development available to more developers.

Minor Updates to Team System

Visual Studio Team System (VSTS) consists of a server application, Team Foundation Server (TFS); a set of specialized editions of the VS IDE, each aimed at a particular role in the software development process; and a testing agent that allows developers to see how their Web applications perform under very high loads. Initially, VSTS offered editions for developers, testers, and architects; an edition for database developers was subsequently added.

In VS 2008, VSTS receives minor updates, including:

Deleting projects. Administrators now have the ability to delete projects from the server, recovering the disk and database space. Prior versions simply marked deleted projects as unavailable without actually removing them from the database.

Maintainability index. Project managers have a new metric to help track code quality: the maintainability index, which combines several previously available metrics, such as lines of code, lines of code per class, and number of levels of inheritance used, in an attempt to give a high-level view of how easy or difficult the code will be to maintain over time.

Tracking changes. A new annotation feature helps managers identify which lines of code in a module were changed by which person.

Modeling Goes Unchanged

Somewhat surprisingly, given the importance Microsoft is putting on modeling in its Dynamic Systems Initiative (DSI), VS 2008 contains only minor improvements for modeling applications. Moreover, Microsoft hasn't given any details of what improvements will be coming in the follow-on release, which is code-named Rosario and is unlikely to ship before 2009.

The lack of clarity around modeling could indicate that Microsoft is rethinking its approach. Microsoft's initial foray into tools for software architects has not met with much success, and IBM, which acquired Rational in 2003, continues to lead.

Historically, Microsoft's Developer Division has been skeptical of the value of modeling, especially of general-purpose modeling tools such as the Universal Modeling Language (UML) used by IBM. Microsoft has expressed doubt that such tools can effectively represent all the different types of applications developers build.

Microsoft's Developer Division has instead taken a two-pronged approach: providing a base foundation to enable third parties to build custom graphical designers and source-code generators (called Domain Specific Languages, or DSLs) for specific types of applications, while at the same time introducing mechanisms like LINQ that enable developers to express higher-level concepts directly in programming languages.

Some major systems integrators (e.g., Unisys) have created DSLs. Organizations like these, which follow a structured methodology to repeatedly build similar kinds of applications, can amortize the work of creating a DSL across multiple applications. However, many other developers cannot justify the considerable cost of developing DSLs. These developers can benefit from broad improvements to programming languages (like LINQ), but are unlikely to be drawn to Microsoft's modeling approach.

Shell Available to Partners

Third parties that build their own tools can use the Visual Studio 2008 Shell as the core IDE of their tools free of charge. Previous versions of the shell were available only to Premier Partners in the Visual Studio Industry Partners (VSIP) program and required a royalty payment to Microsoft.

A partner can choose to use the VS 2008 Shell in one of two ways:

Integrated. Third-party tools can be automatically merged with any other installations of VS 2008 running on the same machine. For example, vendors of programming languages can use integrated mode to add their language alongside Microsoft's, allowing developers to use the partner's language with the Visual Studio tools. Earlier versions of VS also supported integrated mode.

Isolated. In this mode, third-party tools run independently from any other installations of VS. Isolated mode is useful for partners who are building specialized tools but want to get a head start by not having to implement their own menu, toolbar, project, and window systems. This mode is new in VS 2008.

Resources

The Visual Studio home page is msdn.microsoft.com/vstudio.

Beta 1 of VS 2008 can be downloaded, including image files for running in a virtual machine, at msdn2.microsoft.com/en-us/vstudio/aa700831.aspx.

Microsoft's overall approach to modeling is described in "Modeling Framework Key to Microsoft's Management Strategy" on page 6 of the June 2007 Update.

back to top