An Overview of ASP.NET 3.5 and Visual Studio 2008By Scott Mitchell
On November 19, 2007, Microsoft officially released the ASP.NET version 3.5 and Visual Studio 2008. Like with the progression from ASP.NET 2.0 to 3.0, the features in ASP.NET 3.5 are additive, meaning that the core assemblies installed from the .NET Framework version 2.0 are still used by the 3.0 and 3.5 versions. The In short, ASP.NET 3.5 doesn't change or take away or break any functionality, concepts, or code present in 2.0 - it simply adds new types and features and capabilities to the framework.
This article provides an overview of the new features in ASP.NET 3.5 and the new web/ASP.NET-related features in Visual Studio 2008. Read on to learn more!
Separating Out the New Framework Features
When a new version of ASP.NET is released, that means that a new version of the .NET Framework has been released. After all, the Web controls and page rendering logic that make up ASP.NET are implemented as classes in the .NET Framework. Yet the .NET Framework comprises much more than just ASP.NET. Consequently, a new version of the .NET Framework typically involves features that can be divided into one of three categories:
- Framework Features Specific to ASP.NET. These are features that are key to ASP.NET development - new Web controls, for instance. When ASP.NET 2.0 was released, new ASP.NET-specific features included the GridView control and the declarative data binding controls (the SqlDataSource, ObjectDataSource, and so on).
- Framework Features Useful to ASP.NET Developers. This class of features includes those that aren't specific to ASP.NET - they might be used by WinForms developers, too - but are commonly used by developers in building ASP.NET applications. The .NET Framework 2.0 introduced Generics, anonymous types, and improved strongly-typed DataSets, none of which are ASP.NET-specific, but are commonly used by ASP.NET developers.
- Framework Features Not Used by ASP.NET Developers. The .NET Framework includes many classes that are seldom or
never used by ASP.NET developers, such as classes in the
Before we get started, I wnat to point you to a .NET Framework 3.5 poster of commonly used types and namespaces (hat tip Paul Andrew). This poster can be downloaded as a PDF or XPS. In addition to the many namespaces and classes in the .NET Framework, the poster makes two things very clear. First, it illustrates just how much of the .NET Framework is not related to ASP.NET. Second, it illustrates the additive behavior of new .NET Framework versions. The following graphic highlights the features in .NET 2.0 and the features added in .NET 3.0 and then in .NET 3.5:
For more background on how .NET 3.5 is mere additional assemblies and functionality added atop the existing .NET 2.0 base, refer to Daniel Moth's blog entry, .NET Framework 3.5. Also from Daniel's blog, the Visual Studio 2008 Stack helps paint a clear picture with regards to the changes in Visual Studio, the programming languages, the framework libraries, and the CLR over time:
A Look at the New ASP.NET-Specific Features
It seems like everytime I turn around a new version of some technology is coming out, or some new way of doing the same old thing is in the works and therefore demands my attention. It's easy to feel overwhelmed with the never ending onslaught of new technologies. Fortunately, ASP.NET 3.5 is a rather minor upgrade from ASP.NET 2.0; that is, there are not that many new ASP.NET-specific features in the .NET Framework 3.5.
There are three new features worth noting in ASP.NET 3.5:
- Integrated ASP.NET AJAX support,
- The ListView control, and
- The DataPager control
ASP.NET 2.0 introduced a number of new data Web controls, including the GridView, DetailsView, and FormView controls.
The GridView displays a list of records in a boxy, grid-like table. The DetailsView and FormView each display one record
at a time, the DetailsView in a grid-like output and the FormView in a more fluid layout using templates. The
is an update to the old DataList and Repeater controls, displaying mulitple records and providing functionality like the GridView,
but allowing for a more flexible layout through the use of templates. The
DataPager control operates
as a sort of free-standing paging interface. In short, it renders a paging user interface - next, previous, first, last
buttons, for instance - and is tied to a data Web control. The DataPager only works with those controls that implement the
interface, which (currently) includes only the ListView control.
For a step-by-step demo using the ListView and DataPager controls, check out Scott Guthrie's blog entry, The <asp:ListView> Control. Microsoft has also published videos showing how to use the ListView and DataPager controls.
An Overview of Framework Features Useful to ASP.NET Developers
The main framework feature in the .NET Framework version 3.5 is LINQ, which stands for Language Integrated Query. LINQ makes SQL-like syntax a first-class citizen in VB and C#, allowing developers to work with data using code that looks like:
LINQ simply defines a syntax for working with data. There are built-in Object Relational Mappers (ORMs) that will create the underlying framework to generate LINQ statements that operate against a database, XML, or an object layer. Scott Guthrie has a great multi-part tutorial series on using the LINQ to SQL ORM implementation.
Visual Studio 2008 provides full-IntelliSense support when using the LINQ syntax. The LINQ syntax is possible due to a number of new language features in C# and Visual Basic, including automatic properties, extension methods, and lambda expressions. (For more information on extension methods, see Extending Base Type Functionality with Extension Methods.) These features are a bit beyond the scope of this article, but will certainly be covered in future articles here on 4Guys.
New Visual Studio 2008 Features
Let's look at each of these new features individually.
In previous versions of Visual Studio, developers can choose to use the Designer or the Source view when editing the visual component of an ASP.NET page. The Designer provides a WYSIWYG display of the page, whereas the Source view displays the actual markup of the controls. Visual Studio 2008 offers a new Split screen feature, which shows the markup in one pane and the WYSIWYG display in another. When in Split mode, adding content to the Designer automatically updates the markup in the Source view. Unfortunately, the inverse is not true. If you enter new markup manually into the Source view, you either have to save the page or click a button to refresh the Designer view.
developers are provided with the same level and functionality of IntelliSense support as they are accustomed to when writing
files (i.e., script files referenced via syntax like
Finally, it's worth noting that Microsoft recently announced that they would be releasing the .NET Framework code the the public under the Microsoft Research License (MS-RL). What's especially cool is that you can point Visual Studio 2008 to a URL that contains the debugging symbols for the .NET Framework, at which point you can step into the .NET Framework code through the debugger. This should provide developers with a deeper understanding of what's happening underneath the covers of the framework.
At the time of this writing, it doesn't appear as if Microsoft has made these debugging symbols available at a public URL. Once the URLs are made public, however, developers can point Visual Studio to them with a few clicks of the mouse and start exploring the internals of the .NET Framework. For more information on this feature, see Scott Guthrie's blog post, Releasing the Source Code for the .NET Framework Libraries