Preface


I REMEMBER SITTING IN A ROOM on the Microsoft campus in August of 2003 listening to Scott Guthrie and others from the ASP.NET team present the wide array of new features coming in ASP.NET 2.0. They astounded us with one demo after another of features that greatly simplified Web development, and in such a pluggable and extensible fashion so that changes could be made at any level as needed during the development process. As with its predecessor, I knew that this release was going to change the way developers built Web applications, and it would be compelling enough to bring many more developers to the ASP.NET platform.

Over the subsequent two years I carefully tracked the Beta releases of ASP.NET 2.0, wrote many articles on the upcoming features, and gave numerous conference talks around the world. In early 2005 I finished writing Pluralsight's Applied ASP.NET 2.0 course, and spent the next year and a half teaching the course, as well as speaking, blogging, and writing about ASP.NET 2.0 in many different forums. This book is the culmination of those activities, and I hope it helps you in your path to understanding ASP.NET 2.0.

Sample Code, Web Site, Feedback

All of the code samples in this book are drawn from working samples available for display and download at http://pluralsight.com/essentialasp.net2/. The site also contains examples written in VB.NET and a listing of all links and references mentioned in the book. Any errata found after publication will be posted on this site, as well as a supplemental set of more extended examples of the concepts presented in this book for your reference. The authors welcome your comments, errata, and feedback via the forms available on the Web site.

Volume 2, Not Second Edition

This book is fundamentally a companion book to my first book on ASP.NET, Essential ASP.NET with Examples in C#, and is not a second edition. You will notice little to no overlap between the two books, and, in fact, I strongly encourage you to become comfortable with much of the contents of the first book before jumping into this one. Almost all of the topics presented in the first book are still completely relevant today in the ASP.NET 2.0 release. There are, however, a few topics that can be bypassed in the first book as they have been replaced and/or modified with the ASP.NET 2.0 release. The following is a reader's guide to Essential ASP.NET with Examples in C# with the intent of preparing you to read this new book.

Chapter 1Architecture

The discussion of codebehind should be read only lightly, as it has changed in 2.0, although the ASP.NET 1.1 model of codebehind is still supported.

Chapter 2WebForms

The discussion of codebehind and server-side control integration can be skipped, as this has changed in ASP.NET 2.0. The last section on building WebForms with Visual Studio can be skipped.

Chapter 3Configuration

All of this chapter is still completely relevant. Do note that every use of ConfigurationSettings should now be ConfigurationManager in ASP.NET 2.0.

Chapter 4HTTP Pipeline

The discussion of asynchronous handlers can be skipped in anticipation of the entire chapter dedicated to asynchrony (Chapter 9) in this new book.

Chapter 5Diagnostics and Error Handling

All of this chapter is still completely relevant in ASP.NET 2.0.

Chapter 6Validation

All of this chapter is still completely relevant in ASP.NET 2.0. Be aware that client-side validation now works cross-browser (not just in Internet Explorer as it did in ASP.NET 1.1). Also, there is a new ValidationGroup property you can associate with validation controls and buttons that generate postbacks to selectively fire subsets of validation controls.

Chapter 7Data Binding

Skip over the discussion of the DataGrid control, as it has been replaced by the GridView control in ASP.NET 2.0. In the template discussion, replace every occurrence of DataBinder.Eval(Container.DataItem, ...) with Eval(...), which is the new expression in ASP.NET 2.0.

Chapter 8Custom Controls

All of this chapter is still completely relevant in ASP.NET 2.0. Whenever you see references to RegisterClientScriptBlock, replace it with ClientScript.RegisterClientScriptBlock for ASP.NET 2.0. In the discussion of data-bound and composite controls, be aware that there are two new control base classes in ASP.NET 2.0, DataBoundControl and CompositeControl, which should be used as base classes when creating these types of controls. There are also many new designer integration features in ASP.NET 2.0.

Chapter 9Caching

All of this chapter is still completely relevant in ASP.NET 2.0.

Chapter 10State Management

All of this chapter is still completely relevant in ASP.NET 2.0.

Chapter 11Security

All of this chapter is still completely relevant in ASP.NET 2.0. Be aware that many of the features discussed in the forms authentication section are much easier to build in ASP.NET 2.0 because of the membership feature. Understanding the details of how Forms authentication works is still critical to using membership properly, however, and thus this discussion is a good precursor to the discussion about security in Chapter 5 of this new book.

Organization of This Book

Chapter 1, Architecture, covers the changes in the architecture of ASP.NET with this release, including a new codebehind mechanism, new Page events, new specially named compilation directories, a new compiler utility, and Web Application Projects.

Chapter 2, User Interface Elements, looks at the three primary new user interface elements of ASP.NET 2.0: master pages, themes and skins, and navigation controls. This chapter also looks at the new control adapter architecture as a means of altering standard control rendering in a browser-contingent way.

Chapter 3, Data Binding, describes the new declarative data source model introduced with ASP.NET 2.0. It starts with a discussion of the fundamentals of declarative data sources and moves through many different usages, including SQL, stored procedures, and objects.

Chapter 4, State Management, describes three new state-related features of ASP.NET 2.0, including cross-page posting, profile, and the Multi-View, View, and Wizard controls.

Chapter 5, Security, covers the new security features in ASP.NET 2.0 with a special focus on the provider model. It includes lots of practical advice on choosing and configuring Membership and Role providers. It also covers the new login controls and other new features, such as cookieless forms authentication and configuration file encryption.

Chapter 6, Web Parts, describes the collection of components and controls introduced in ASP.NET 2.0 for constructing customizable portal sites. These components manage the details of storing user customization data, providing the interface for customization, and managing the Web Parts you define as components for users to work with.

Chapter 7, Diagnostics, explores management, instrumentation, and diagnostics in ASP.NET 2.0, focusing on the new health monitoring system. The key abstraction here is the Web event, and this chapter introduces the built-in events and providers as well as helps you build your own. At the end of the chapter is an introduction to ASP.NET 2.0 support for Event Tracing for Windows (ETW), showing how you can diagnose problems in a running ASP.NET application without having to attach a debugger.

Chapter 8, Performance, covers the new performance-related features of ASP.NET 2.0, including many new caching features as well as a client-callback architecture. Among the new caching features covered are data source caching, SQL cache dependencies, post-cache substitution, and configuration file settings for cache control.

Chapter 9, Asynchrony, looks at the new Async="true" attribute on the @Page directive in ASP.NET 2.0, and how it can be used to improve the responsiveness of pages in your site as well as increase the overall scalability of the application. Several ways of introducing asynchrony into your pages are covered, including implicitly using the AsyncOperationManager, explicitly using asynchronous tasks, and at a lower level by using the Page class's AddOnPreRenderCompleteAsync method.




Essential ASP. NET 2.0
Essential ASP.NET 2.0
ISBN: 0321237706
EAN: 2147483647
Year: 2006
Pages: 104

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net