![]() |
|
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||
Published: Wednesday, November 21, 2007 By Scott Mitchell
Introduction Visual Studio 2008 is the recommended tool for developing ASP.NET applications. Unlike previous versions of Visual Studio, which were targeted to a specific framework version (i.e., Visual Studio .NET 2003 targeted ASP.NET 1.1 and Visual Studio 2005 targeted ASP.NET 2.0), Visual Studio 2008 is multi-targeted, meaning that you choose from a drop-down list whether to have Visual Studio 2008 build applications against the ASP.NET 2.0, 3.0, or 3.5 frameworks. Visual Studio 2008 also includes an improved Designer experience, JavaScript debugging and IntelliSense features, and the ability to view and even step into the core .NET Framework code during debugging. 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
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 There are three new features worth noting in ASP.NET 3.5:
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
ListView control
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
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
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.
With Microsoft's increasing commitment to AJAX, it comes as no surprise that Visual Studio 2008 offers much better JavaScript
support. The design- and debug-time experiences have been greatly improved. When writing JavaScript through the Source view,
developers are provided with the same level and functionality of IntelliSense support as they are accustomed to when writing
server-side code. This includes IntelliSense support for both in-line JavaScript and for script referenced through external JavaScript
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
Conclusion
Happy Programming!
Further Reading:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||