Executive Summary:

Microsoft's Visual Studio 2008 development platform offers new Web 2.0 development capabilities, Language Integrated Query (LINQ), Visual Basic (VB) and C# language enhancements, and mobile application development enhancements, that make this latest release an important upgrade for your organization.


Visual Studio 2008 is the latest release of Microsoft’s flagship development product. This evolutionary release sports new Web 2.0 development capabilities as well as an array of new functionality, including Language Integrated Query (LINQ), specific Visual Basic (VB) and C# language enhancements, and mobile application development enhancements. Follow along as I take you on a guided tour of the most important new features found in Visual Studio 2008.

Editions of Visual Studio 2008


Microsoft has released two versions of Visual Studio 2008: Visual Studio 2008 Standard Edition and Visual Studio 2008 Professional Edition. Both editions share several core features, including the same IntelliSense- capable IDE, project support, code editors, Windows and Web Form designers, Microsoft .NET Framework 3.5, support for 64-bit compilation, ASP .NET Asynchronous JavaScript and XML (AJAX), Windows Presentation Foundation, Windows Communication Foundation, Windows Workflow Foundation, as well as SQL Server Reporting Services and LINQ support.

Visual Studio 2008 Professional Edition extends the feature set provided in the Standard edition by including the ability to build Microsoft Office applications as well as mobile device applications. It also provides a visual Class Designer, an Object Test Bench, and integrated Unit Testing tools. The Professional Edition also comes with Business Objects’ Crystal Reports, Server Explorer, and a full copy of SQL Server 2005 Developer Edition. For more information about Visual Studio 2008’s integration with SQL Server, see the sidebar “Visual Studio 2008 and SQL Server.”

In addition to these two single-developer–oriented versions of Visual Studio, Microsoft also offers the enterprise-oriented Visual Studio 2008 Team System, which includes project management, bug tracking, and integrated team testing capabilities. Microsoft also continues to offer several free hobbyist-oriented Visual Studio Express Editions. You can learn more about these free editions in the sidebar “Visual Studio Express Editions.”

Prerequisites


Visual Studio 2008 has relatively modest hardware requirements. Microsoft recommends a system with a 1.6GHz or faster processor, a minimum of 384MB of RAM (768MB for Vista), as well as 2.2GB of available hard disk storage, and a DVD-ROM drive. Visual Studio 2008 is supported on the following OSs:

  • Windows Vista (x86 and x64—except the Windows Vista Starter Edition)
  • Windows XP SP2 (x86 and x64)
  • Windows Server 2003 SP1 (x86 and x64)
  • Windows Server 2003 R2 (x86 and x64)

Familiar IDE


When you start Visual Studio 2008 for the first time, it appears that not much has changed. You’re still greeted by the familiar Start Page with its Recent Projects, Getting Started, Visual Studio Headlines, and MSDN: Visual Studio panes, as Figure 1 shows. But if you look deeper, you’ll see that much has changed—specifically the new underlying .NET Framework capabilities and the IDE enhancements that support them.

NET Framework 3.5


Like all releases of Visual Studio since Visual Studio.NET, Visual Studio 2008 comes with a new version of the .NET Framework, NET Framework 3.5, which has a wide array of new features, including a new set of .NET Framework libraries: Windows Presentation Foundation, Windows Communication Foundation, and Windows WorkFlow Foundation. Windows Presentation Foundation is a .NET library that helps you build graphical applications for Vista. Windows Presentation Foundation supports 2D and 3D graphics, styling, support for templates as well as the ability to develop tablet applications using XML for Applications (XAML). Visual Studio 2008 includes a new graphical designer for building Windows Presentation Foundation applications. First introduced in .NET Framework 3.0, Windows Communication Foundation is a communications subsystem that’s built around the Web Services architecture. Windows Communication Foundation uses a service-oriented programming model, and it provides support for asynchronous messaging, interoperability with Microsoft Message Queue Services (MSMQ), COM, and ASP .NET Web services. Windows WorkFlow Foundation is a .NET Framework library that provides support for building workflow-enabled applications. Visual Studio 2008 provides a graphical designer for building Windows WorkFlow Foundation applications and integration with Windows SharePoint Services (WSS) 3.0 and Microsoft Office Sharepoint Server (MOSS) 2007. You can see the new .NET Framework 3.5 project types for ASP.NET projects in the New Project dialog box that Figure 2 shows.

Another great new feature in Visual Studio 2008 is the ability to target multiple versions of the .NET Framework. Earlier VisualStudio versions were limited to building code for the current version of the .NET runtime. Visual Studio 2008 extends this capability by being able to target .NET Framework 2.0, 3.0, 3.5, as well as the .NET Compact Framework. You can see the current target version of the .NET Framework in the dropdown box near the upper left corner of Figure 2. However, you should note that targeting an older version of the .NET Framework only modifies the executable files that are produced by Visual Studio 2008. It doesn’t make your Visual Studio 2008 project files compatible with previous versions of Visual Studio.

LINQ


From a database developer’s perspective undoubtedly the biggest new feature that comes with Visual Studio 2008 and the .NET Framework 3.5 is LINQ. LINQ is an evolutionary step forward for database developers as it simplifies the development process by enabling developers to write database queries directly in either native VB or C#. LINQ speeds up application development by providing immediate feedback through IntelliSense and compile time error checking that wasn’t possible using the older dual-mode ADO.NET and TSQL development methodology. For a more in-depth look at LINQ, read the article “LINQ to Your SQL Server Data,” InstantDoc ID 98205.

VB and C# Language Enhancements


.NET Framework 3.5 has several enhancements that apply to both VB and C#. To support the new LINQ technology, Microsoft introduced implicit type and anonymous type objects. Implicit variables can be declared without knowing in advance what data type the variable will be. The compiler attempts to figure out the data type based on the values assigned to the variable. If it can’t determine the value it will default to object. Similar in concept to an implicitly typed variable, an anonymous type object is an object that can be declared without assigning it a class name. In VB an anonymous object is created using the New With keywords. The following example shows an anonymous class implemented in VB:

 Dim e = New With \{ .FirstName =
  “Michael”, .LastName = “Otey” \}

This example also illustrates the new object initialization feature, which lets you assign values to object properties when the object is created.

One of the biggest changes to VB in Visual Studio 2008 is that the language and IDE are both XMLaware. The following example shows how you can directly assign a VB variable an XML value and then pull specific elements out of the XML.

 Dim xml = <employee><firstname>Michael</firstname><lastname>Otey</lastname>
  MsgBox(xml.<firstname>.Value
</firstname></employee>

VB also sports a new relaxed delegates feature that lets you declare a delegate handler such as a button click event without needing to pass the delegate all the original function parameters.

Continued on page 2

Some of the new enhancements for C# include a shorthand property declaration that allows you to define an object property in a single line of code. You can see an example of this shorthand property declaration in the following code snippet:

 Public class Employee
  \{
  public string FirstName( get; set;)
  public string LastName (get; set;)
  \}

The most notable missing feature (and the one very few people will miss) is J#. J# is the .NET Framework’s Java-like language. Not surprisingly, few Microsoft developers use it, and Microsoft sensibly dropped it from Visual Studio 2008.

Web


AJAX became popular shortly after the release of Visual Studio 2005 so there was no real Web 2.0 support in that version. Microsoft rectified this situation with Visual Studio 2008 by adding support for AJAX as well as IntelliSense and debugging support for JavaScript.

Another new Web development feature in Visual Studio 2008 is the Web page designer. The new Web Page designer uses the same design engine as Microsoft’s Expression Web, which provides a split view of the graphical design and the HTML source, as Figure 3 shows. Visual Studio 2008 also features tight integration with Microsoft Expression Web through the use of Cascading Style Sheets (CSS) and shared project files. This functionality enables Web designers to use Microsoft Expression Web to design the organization’s Web interface and then turn over that project to the Visual Studio 2008 Web developers to add the business logic. The use of CSS helps ensure that the design will remain consistent as the developers add business logic to the project.

Microsoft has also added a number of new controls, including a ListView control and a DataPager control. The new ListView control offers new data display flexibility and is CSS-compatible. The Data- Pager control handles all the logic required to enable users to page through large numbers of records.

Mobile Application Development


Like Visual Studio 2005, Visual Studio 2008 Professional supports the development of mobile device applications called SmartDevice Projects (Mobile device development isn’t available in the Visual Studio 2008 Standard Edition). Visual Studio 2008’s new device emulator has several improvements. You can now target the Pocket PC 2003, Smartphone 2003, and Windows Mobile 5.0. The device emulator supports battery emulation, which allows the device emulator to send a low-battery event. This lets your mobile applications test for low battery conditions. Figure 4 shows Visual Studio 2008’s mobile device emulator.

Visual Studio 2008 includes that latest version of Microsoft’s device development platforms: the .NET Compact Framework 3.5. You can target multiple versions of the .NET Compact Framework. Thus, when you create a new SmartDevice project, you can choose to target either the .NET Compact Framework 2.0 or the .NET Compact Framework 3.5.

In addition, Visual Studio 2008 provides a new Sync Services for ADO.NET that enables new mobile applications to continue to provide end-users with the same application experience whether they’re connected or disconnected. The mobile application runs using the SQL Server Compact edition as a local data store and using Sync Services can periodically connect to your backend database server to provide bidirectional updates to and from the mobile application.

Office Development


The Visual Studio 2008 Professional edition also includes Visual Studio Tools for Office (VSTO), which lets you create business applications with the different members of the Office 2007 and Office 2003 suites. VSTO supports the new Office 2007 ribbon interface, and enables developers to add regions and buttons to the ribbon. In addition, VSTO provides support for customizing the Outlook 2007 interface by adding your own Outlook Form Regions. Outlook Form Regions let you integrate your business applications with the Outlook 2007 interface. For instance, you could use a custom Outlook Form Region to expose portions of your organization’s CRM or ERP application directly in Outlook. Microsoft calls these Office-enabled applications Office Business Applications (OBAs).

The .NET Result


Visual Studio 2008 is a must-have upgrade for every Microsoft Web and database developer. It’s new support of AJAX, JavaScript development, CSS, and Web Expression integration make it a more capable and productive platform than any prior release of Visual Studio. For database developers, there’s no doubt that LINQ is the wave of the future, and now is the time to get started.

You can learn more about Visual Studio 2008 at www.microsoft.com/vstudio, and you can download a 90-day trial of Visual Studio 2008 from msdn2.microsoft.com/en-us/vstudio/aa700831.aspx. Or if you want to skip the installation experience, you can download a Microsoft virtual machine (VM) image with a trial version of Visual Studio 2008 preinstalled.