.NET Framework 3.5 Enhancements

Many new classes and features are provided by the .NET Framework 3.5. This latest version layers on top of the prior version. The .NET Framework 2.0 (and SP1) added many new base classes, interfaces, generics, and more. The interim release (.NET Framework 3.0) that shipped with Windows Vista layered in support for Windows Presentation Foundation (WPF), Windows Communication Foundation (WCF), and Windows Workflow Foundation (WF). This latest version continues to build on that release. The 3.5 version the .NET Framework includes LINQ, a revision to ASP.NET, the Add-In Framework, SQL Synch Services, and more.

ASP.NET—The .NET Framework 3.5 includes many new enhancements for the ASP.NET web developers. The System.Web namespace that backs ASP.NET includes many new classes and controls. For example, the framework now directly supports AJAX programming with the ScriptManager and UpdatePanel controls. There is also a new control for displaying data called ListView, a data-source object called LinqDataSource for working with LINQ data, and a DataPager object for controlling how records are paged in your application.

LINQ—We’ve mentioned LINQ a few times already; it’s worth noting, however, that LINQ is built into the .NET Framework. This includes the System.Linq namespace that defines standard LINQ query operators and types. The System.Data.Linq namespace holds the connection between databases and the LINQ subsystem. There are more LINQ-related namespaces too. These include System.Data.Linq.Mapping for handling the O/R mapping between SQL and LINQ and System.Xml.Linq for working between XML and the LINQ subsystem. Of course, many of the controls in the framework have also been updated to work with LINQ.

Add-In Framework—The System.AddIn namespace is new to the .NET Framework 3.5. It provides classes and methods for developers looking to build applications that can be extended based on a common add-in framework. For example, the AddInStore class allows for the discovery and management of add-ins. The framework also provides versioning, isolation, activation, and sandboxing. If you are building a new application and hope to allow for add-ins, you want to dig in deeper on this namespace.

ClickOnce Improvements—ClickOnce application deployment continues to improve in this latest version of .NET. This includes the capability to deploy an application from multiple locations and third-party branding on your ClickOnce deployment dialogs.

Windows Communication Foundation (WCF)—The new System.ServiceModel encapsulates what is known as WCF. With it you can easily create service-based applications that work across multiple protocols, transports, and message types. WCF is a major component of .NET 3.5, “Embedding Workflow in Your Applications.” However, some highlights included in WCF are the following: expose and consume RSS and ATOM feeds with the System.ServiceModel.Syndication namespace; communicate with AJAX operations using the JavaScript Object Notation (JSON) data format built into WCF’s System.Runtime.Serialization.Json namespace; and use the WCF web programming model to create REST (representational state transfer) services to communicate directly across HTTP (without SOAP). In addition, WCF contains the new identity management system called CardSpace.

Windows Presentation Foundation (WPF)—WPF provides a new presentation technology for Windows applications. This technology is spread throughout the System.Windows namespace and includes support for creating Windows applications based on XAML, XBAP, vector graphics, and both 2D and 3D scenarios.

Windows Workflow Foundation (WF)—The System.Workflow namespace first introduced in .NET 3.0 has been extended (and integrated into Visual Studio) in the 3.5 release. WF allows you to create both sequential and state-driven workflows for your applications, host them, persist them, and more. WF is also now integrated with WCF. Therefore, you can easily expose and call a workflow as a WCF service.

Tracing and Diagnostics—The System.Diagnostics namespace contains the new EventSchemaTraceListener class to allow for cross-domain, cross-thread, crosscomputer, end-to-end, lock-free logging and tracing.

Pipe Streams—The new System.IO.Pipes namespace provides support for both named and anonymous pipe communication. With it, you can write code that communicates at the pipe level across processes and across computers. For example, the NamedPipeServerStream class can be used to allow read and write communication across a named pipe. The NamedPipeClientStream provides client support for communicating with pipe servers.

Threading Improvements—There is a new class called ReaderWriterLockSlim in the System.Threading namespace that provides better performance and reduced deadlock scenarios.

Time Zone Additions—There are two new types that help you work with applications that need to understand multiple time zones. These classes are System.DateTimeOffset and TimeZoneInfo. The DateTimeOffset structure represents an exact point in time. The offset indicates how the time differs from UTC (Universal Coordinated Time). You use this new class when you need precision and date/time arithmetic. The TimeZoneInfo class is a welcome enhancement that represents a date and time in a given time zone. You can use this class to reliably represent the same date and time in any other time zone. In addition, you can use the class to create custom time zones if needed.

Peer-to-Peer Networking Support—The .NET Framework finally has its own peer-to-peer networking support. This can be found in the System.Net.PeerToPeer namespace. With it, you can create an application that works without a server and instead communicates from one client (peer) to another (similar to Microsoft’s Groove application). Application scenarios supported by this new namespace include tracking where peers are (online or offline), what they might be doing, interacting (messaging) with peers, managing peer contacts, discovering new peers, and more.

Sync Services for ADO.NET—Shipping with Visual Studio 2008 is Microsoft’s Sync Services. With it you can build an application that works both online and offline. These types of applications are referred to as occasionally connected applications (OCA). You use Sync Services (and its related tools) to indicate which data should be available when a user is offline. When connected, the Sync Services works to synchronize user changes with database changes.

The Sync Services for ADO.NET is part of the Microsoft.Synchronization.Data namespace. Notice that this is not part of System and therefore not a principal part of the .NET Framework but an add-on library from Microsoft. The ADO.NET services are actually a part of what is called the Microsoft Sync Framework. This framework provides synchronization services for data (ADO.NET), file and folders (the File
System), and RSS/ATOM feeds (FeedSync).

Windows Vista Support—The Windows Forms engine has been updated to give your applications Vista support. This means that upgrading your applications will give them that Vista appearance. In addition, you now have access to the common dialogs (System.Windows.Forms.FileDialog) in Vista. For example, the OpenFileDialog and SaveFileDialog support the same interface you see in Windows Vista for opening and saving files.

.NET Compact Framework—A new version of the .NET Compact Framework also ships with 3.5. This framework is used on distributed, mobile devices such as SmartPhones and Windows Mobile/CE devices. This faster version of the framework provides support for WCF, LINQ, and improved debugging and diagnostics.

Source of Information : Sams Microsoft Visual Studio 2008 Unleashed

0 comments


Subscribe to Developer Techno ?
Enter your email address:

Delivered by FeedBurner