Microsoft.NET

……………………………………………….Expertise in .NET Technologies

What is New in Visual Studio 2008

Posted by Ravi Varma Thumati on May 13, 2009

Introduction

             Microsoft Visual Studio is an Integrated Development Environment (IDE) provided by Microsoft to create and develop Windows-based, Web-based, Console-based and Mobile-based applications for .NET framework.  These applications might be created by using different languages such as Visual Basic, Visual C#, and Visual C++. Traditionally we used to create these applications using a Notepad. For this we needed a compiler that could convert the programming language into machine language. Now, we might be wondering if a notepad can create all these applications, why do we need Visual Studio as an editor.

Building applications using notepad would take much time than building the same application in Visual Studio. This is because Microsoft visual studio provides various benefits to design and create the applications, as compared to a notepad. For example, if we need to memorize all the language syntax’s in case if we are using notepad. In case of Visual Studio you do not need to remember the syntax; Visual studio will prompt you with the available options for the command if you type first few letters.

The following are some of the benefits of using Visual Studio 2008.

  • Helps in minimizing the development time
  • Simplifies the process of testing application
  • Provides different toolsets for integrating graphic designers into the overall development process.
  • Supports multiple versions of .NET framework
  • Enhancements in data retrieval and data binding
  • Provides support for web, mobile, client, vista, and office application development
  • Inspects code to find sections of code that need to be re-factored.

New features of Visual Studio 2008

Visual Studio 2008 is an IDE designed for writing, compiling and debugging the code in much easier way. It contains a complete set of development tools for building ASP.NET web applications, web services, desktop applications and Mobile applications.

The following are some of the new features and enhancements made in Visual Studio 2008

  • Support for Multi-Targeting
  • Web Designer and CSS support
  • Support for ASP.NET AJAX and Jscript IntelliSense
  • Improved Deployment
  • Support for Client application services
  • Support for Reporting applications
  • Project Designer
  • Data
  • Support for LINQ (Language Integrated Query)
  • Visual Studio 2008 Debugger

Multi-Targeting Support

Earlier, each Visual Studio release only supported a specific version of the .NET Framework. For example, VS 2003 only works with .NET 1.1, and VS 2005 only works with .NET 2.0.

One of the major changes with the VS 2008 release is to support what Microsoft calls “Multi-Targeting”. This means that Visual Studio will now support targeting multiple versions of the .NET Framework, and developers will be able to take advantage of the new features that Visual Studio provides without having to migrate their existing projects and deployed applications to use a new version of the .NET Framework.

Now when we open an existing project or create a new one with VS 2008, we can pick which version of the .NET Framework to work with. The IDE will update its compilers and feature-set to match the chosen .NET Framework.

Features, controls, projects, item-templates, and references that do not work with the selected version of the Framework will be made unavailable or will be hidden.

Unfortunately, support has not been included to work with Framework versions 1.1 and earlier. The present release supports 2.0/3.0 and 3.5 .NET Frameworks.

Microsoft plans to continue multi-targeting support in all future releases of Visual Studio.

Creating a New Project with Visual Studio 2008 that Targets .NET 2.0 Framework

The screenshots below depict the creation of a new web application targeting .NET 2.0 Framework. Choose File->New Project. As we see in the snapshot below in the top-right of the new project dialog, there is now a dropdown that allows us to choose which versions of the .NET Framework we want to target when we create the new project. The templates available are filtered depending on the version of the Framework chosen from the dropdown:

clip_image002

Can I Upgrade an Existing Project to .NET 3.5?

When we open a solution created using an older version of Visual Studio and Framework, VS 2008 would ask if migration is required. If we opt to migrate, then a migration wizard would start. If we wish to upgrade our project to target a newer version of the Framework at a later point of time, we can pull up the project properties page and choose the Target Framework. The required assemblies are automatically referenced. The snapshot below shows the properties page with the option Target Framework marked.

clip_image003

Web Designer, Editing and CSS Support

One feature that web developers will discover with VS 2008 is its drastically improved HTML designer, and the extensive CSS support made available.

The snapshots below depict some of the new web designer features in-built into VS 2008.

Split View Editing

In addition to the existing views, Design view and Code view, VS 2008 brings along the Split view which allows us to view both the HTML source and the Design View at the same-time, and easily make changes in any of the views. As shown in the image below, as we select a tag in code view, the corresponding elements/controls are selected in design view.

clip_image004

CSS Style Manager

VS 2008 introduces a new tool inside the IDE called “Manage Styles”. This shows all of the CSS style sheets for the page.

It can be used when we are in any of the views – design, code and split views. Manage Styles tool can be activated by choosing Format -> CSS Styles -> Manage Styles from the menu. A snapshot of the same would look like the following:

clip_image005

Create a new style using the new style dialog window as show in the snapshot below.

 clip_image006

Now, the style manager would show .labelcaption style as well in the CSS styles list. However, if we observe that the body element has a circle around it but the .labelcaption does not have one, this is because the style is not in use yet.

clip_image007

We will not select all the labels below and apply our new style .labelcaption.

clip_image008

We can choose to modify the existing style through GUI using “Modify style…” menu option in the dropdown menu as shown above or choose to hand edit the code by choosing the option “Go To Code”.

CSS Source View Intellisense

The designer is equipped with the ability to select an element or control in design-view, and graphically select a rule from the CSS list to apply to it.

We will also find when in source mode that we now have intellisense support for specifying CSS class rules. The CSS Intellisense is supported in both regular ASP.NET pages as well as when working with pages based on master pages.

clip_image009

Code Editing Enhancements

Below is a non-exhaustive list of a few new code editing improvements. There are many more about which I don’t know yet.

Transparent Intellisense Mode

While using VS 2005/2003 we often find ourselves escaping out of intellisense in order to better see the code around, and then go back and complete what we were doing.

VS 2008 provides a new feature which allows us to quickly make the intellisense drop-down list semi-transparent. Just hold down the “Ctrl” key while the intellisense drop-down is visible and we will be able to switch it into a transparent mode that enables us to look at the code beneath without having to escape out of Intellisense. The screenshot below depicts the same.

clip_image0010

Organize C# Using Statements

One of the small, but a nice new feature in VS 2008 is support for better organizing using statements in C#. We can now select a list of using statements, right-click, and then select the “Organize Usings” sub-menu. When we use this command the IDE will analyze what types are used in the code file, and will automatically remove those namespaces that are declared but not required. A small and handy feature for code refactoring.

clip_image0011

ASP.NET AJAX and JavaScript Support

JavaScript IntelliSense

One new feature that developers will find with VS 2008 is its built-in support for JavaScript Intellisense. This makes using JavaScript and building AJAX applications significantly easier. A double click on HTML control in design mode would automatically create a click event to the button and would create the basic skeleton of the JavaScript function. As we see in the depicted image below, JavaScript Intellisense is inbuilt now. Other JavaScript Intellisense features include Intellisense for external JavaScript libraries and adding Intellisense hints to JavaScript functions.

clip_image0012

JavaScript Debugging

One new JavaScript feature in VS 2008 is the much-improved support for JavaScript debugging. This makes debugging AJAX applications significantly easier. JavaScript debugging was made available in VS 2005 itself. However, we had to run the web application first to set the breakpoint or use the “debugger” JavaScript statement.

VS 2008 makes this much better by adding new support that allows us to set client-side JavaScript breakpoints directly within your server-side .aspx and .master source files.

We can now set both Client-side JavaScript breakpoints and VB/C# server-side breakpoints at the same time on the same page and use a single debugger to step through both the server-side and client-side code in a single debug session. This feature is extremely useful for AJAX applications. The breakpoints are fully supported in external JavaScript libraries as well.

Improved Deployment

Deployment in Visual Studio has improved with the enhancements of ClickOnce deployment and windows Installer deployment.

ClickOnce is a deployment technology which enables deploying a self-updating windows and console applications that can be installed, updated and executed from a web site. Visual Studio 2008 includes the following enhancements for ClickOnce deployment.

  • ClickOnce has now support for deployment of windows presentation foundation (WPF) web browser applications. WPF web browser applications are hosted in a web browser and hence require special appropriate user interface and default value in the IDE
  • ClickOnce provides independent software vendors the option of re-signing the application manifest with their customer’s company name, application name, and deployment or support URL.
  • Using the publish wizard or the Project designer’s publish page, you can build and deploy Visual Studio tools for office applications
  • ClickOnce helps in generating manifest under user account control (UAC) on windows vista.
  • ClickOnce helps in deployment of office add-ins and documentation while using Visual Studio tools for office
  • ClickOnce supports third-party browsers. Here, the user can install a ClickOnce file directly from the run command.
  • ClickOnce supports changing the deployment location of an application and handling expiration of the certificate.

Support for Client Application Services

Client applications are newly introduced in .NET 3.5. These services enable windows applications and windows presentation foundation applications to easily access the ASP.NET login, roles, and profile services. These services also let you authenticate users and retrieve user’s roles and application setting from a shared server.

Support for Reporting Applications

A reporting application is used to prepare reports. Visual Studio 2008 supports many new reporting features and enhancements which are as follows:

  • New Report Projects: Visual Studio 2008 provides two new project templates for creating reporting applications. The first template is the report application template which is available on the new project dialog box and second template is the ASP.NET reports web site template which is available on the new web site dialog box.
  • Report Wizard: Visual Studio 2008 provides a Report Wizard which guides you through a number of steps to create a basic report. After the wizard is finished, you can make enhancements to the report by using Report Designer
  • Expression Editor Enhancement: The expression editor provides sample expressions that you can directly use in your report or customize it according to your environment
  • ReportViewer Printing: When you configure the ASP.NET ReportViewer control for local processing, the RSClientPrint control becomes available. Using this you can print reports that have been processed by the ReportViewer control and are not dependent on a report server
  • PDF Compression: The ReportViewer controls can now compress reports that have been rendered or exported to the PDF format.

Project Designer

Windows Presentation Foundation (WPF) applications have been added to Visual Studio 2008. There are four WPF project types:

  • WinFX Windows Application
  • WinFX Web Browser Application
  • WinFX Custom Control Library
  • WinFX Service Library

When a WPF project is loaded in the IDE, the user interface of the Project Designer pages lets us specify properties specific to WPF applications.

Data

Microsoft Visual Studio 2008 Beta 2 includes the following new features to incorporate data into applications:

  • The Object Relational Designer (O/R Designer) assists developers in creating and editing the objects (LINQ to SQL entities) that map between an application and a remote database
  • Hierarchical update capabilities in Dataset Designer, providing generated code that includes the save logic required to maintain referential integrity between related tables
  • Local database caching incorporates an SQL Server Compact 3.5 database into an application and configures it to periodically synchronize the data with a remote database on a server. Local database caching enables applications to reduce the number of round trips between the application and a database server

LINQ (Language Integrated Query)

LINQ is a new feature in VS 2008 that broadens great querying capabilities into the language syntax. LINQ introduces patterns for querying and updating data. A set of new assemblies are provided that enable the use of LINQ with collections, SQL databases, and XML documents.

Visual Studio 2008 Debugger

The Visual Studio 2008 debugger has been enhanced with the following features:

  • Remote debugging support on Windows Vista
  • Improved support for debugging multithreaded applications
  • Debugging support for LINQ programming
  • Debugging support for Windows Communications Foundation
  • Support for script debugging, including client-side script files generated from server-side script now appear in Solution Explorer

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: