Essential ASP.NET 2.0, 2/e
暫譯: ASP.NET 2.0 精要(第二版)

Fritz Onion, Keith Brown

  • 出版商: Addison Wesley
  • 出版日期: 2006-11-01
  • 售價: $2,200
  • 貴賓價: 9.5$2,090
  • 語言: 英文
  • 頁數: 384
  • 裝訂: Paperback
  • ISBN: 0321237706
  • ISBN-13: 9780321237705
  • 相關分類: .NETASP.NET
  • 已過版

買這商品的人也買了...

相關主題

商品描述

Description

"No one knows ASP.NET like Fritz Onion. And no one knows .NET security like Keith Brown. Combine the two and what do you get? The most comprehensive and enlightening book on ASP.NET 2.0 industrywide. I'm sure you'll find the book you're holding was worth every penny."

--Aaron Skonnard, member of technical staff and cofounder, Pluralsight

"Essential ASP.NET 2.0 gets under the hood and dismantles the engine before your eyes. Fritz and Keith understand that we as developers need to understand how it works and this book does exactly that. Their explanation of the ASP.NET 2.0 page event sequence is worth the price of the book alone."

--Shawn Wildermuth, Microsoft MVP (C#), "The ADO Guy"

"Essential ASP.NET 2.0 is an incredibly useful must-read for any developer.Many books drag you through theory and mindless detail, but this one actually sets up the problems you may encounter with ASP.NET 2.0 and rolls out the alternatives."

--Patrick Hynds, Microsoft Regional Director and President, CriticalSites

"This book is essential for any ASP.NET developer moving from version 1.x to 2.0. Onion and Brown not only cover the new features, but provide a wealth of insight and detail about how to use them effectively."

--Ron Petrusha, author of Visual Basic 2005: The Complete Reference

"Drawing on their deep technical knowledge and real-world experience, Fritz and Keith take the reader into some of the less explored and much improved areas of ASP.NET such as diagnostics and state management and performance. Readers will turn to this book over and over again."

--John Timney, Microsoft MVP, Senior Web Services Consultant,British Telecom

"Fritz and Keith, both established developers and writers in our industry, have succeeded again--enlightening us on the latest advancements found in ASP.NET 2.0. If you're new to ASP.NET or a seasoned veteran, you'll benefit tremendously from their overview, analysis, and sample code."

--Joe "MSJoe" Flanigen

"This book seeks not only to explain how to effectively build Web sites with ASP.NET, it also gives the reader an idea of how the process works. This insight is essential to creating applications that work with the infrastructure rather than fighting it."

--Justin Burtch, Vice President, Newbrook Solutions

Essential ASP.NET 2.0 is the Microsoft developer's definitive reference for ASP.NET 2.0 programming. It covers all you need to know to build robust, well-designed Web applications with ASP.NET 2.0, Visual Studio 2005, and .NET 2.0. ASP.NET MVP Fritz Onion and Developer Security MVP Keith Brown draw on their unparalleled experience working with ASP.NET 2.0 and teaching it to professional developers. From data binding to security, UIs to performance, they demystify ASP.NET 2.0's most difficult areas, and introduce little-known techniques for leveraging it to the fullest.

The perfect companion to his previous classic, Essential ASP.NET with Examples in C#, Essential ASP.NET 2.0 offers hundreds of new C# examples that illuminate today's best Web development practices. (Both C# and VB 2005 versions of all code examples can be downloaded from the companion Web site.)

Topics explored in-depth include:

  • Application architecture
  • Code behind
  • Master pages
  • Themes and skins
  • Navigation controls
  • Data binding
  • State management
  • Security
  • Web Parts
  • Diagnostics
  • Performance optimization
  • Asynchronous tasks and pages

Simply put, if you want to design and build better ASP.NET 2.0 Web applications, Essential ASP.NET 2.0 delivers everything you need: insider's knowledge, proven best practices, and outstanding code samples.

 

Table of Contents

List of Figures xv

List of Tables xix

Foreword xxi

Preface xxiii

Acknowledgments xxix

About the Authors xxxi

Chapter 1 Architecture 1

Fundamentals 2

Dynamic Content 2

Server-Side Controls 5

Data Binding 8

Codebehind 9

Codebehind Basics 9

Codebehind 2.0 11

Page Lifecycle 15

Common Events 15

New Events 17

Implicit Event Subscription 18

Compilation 20

Compilation Directories 20

Site Compilation 24

Assembly Generation 26

Customizing Assembly Generation 28

Web Application Projects 28

Summary 30

Chapter 2 User Interface Elements 33

Page Templates 33

Master Pages 35

Implementation Details 37

Working with Master Pages 41

Details of Usage 45

Themes and Skins 48

Themes 49

Working with Themes 51

Fundamentals of Navigation Controls 54

Control Adapters 58

Building Control Adapters 58

Browser Recognition 64

CSS Friendly Adapters 66

Summary 66

Chapter 3 Data Binding 67

Declarative Data Binding 68

Data Binding 68

Data Source Controls 70

Storing Connection Strings 82

Data Source Parameters 83

New Data-Bound Controls 87

Data-Binding Evaluation Syntax 91

Declarative Data-Binding Techniques 91

Hierarchical Data Binding 96

Binding to Objects 102

Typed DataSets 112

Summary 112

Chapter 4 State Management 113

Cross-Page Posting 114

Fundamentals 114

Implementation 120

Caveats 121

Multi-Source Cross-Page Posting 124

Wizard and MultiView Controls 127

Same Page State Management 127

Wizard Control 128

MultiView and View Controls 131

Profile 133

Fundamentals 133

Migrating Anonymous Profile Data 137

Managing Profile Data 138

Storing Profile Data 138

Serialization 139

User-Defined Types as Profile Properties 142

Optimizing Profile 143

Going the Custom Route 147

Summary 149

Chapter 5 Security 151

How Much Security Do I Need? 151

Getting Started with Membership 153

Provider Architecture 158

MembershipProvider 160

The Login Control 162

User Account Lockout: Blessing or Curse? 164

Password Complexity Policy 166

Choosing a Password Format 167

Password Questions and Answers 169

Configuring a Membership Provider 170

Custom Providers 172

Using the Membership Class to Access Your Provider 173

SQL Database Permissions 175

The LoginView and Other Controls 177

The Role Manager 180

Configuring the Role Manager and Provider 181

Other Role Providers 183

A Word about Machine Keys 184

Cookieless Forms Authentication 185

SiteMapProvider Security Trimming 187

Configuration File Encryption 188

Summary 191

Chapter 6 Web Parts 193

Web Part Fundamentals 194

Portal Components 194

Building a Minimal Portal Page 195

Display Mode 201

Catalog Parts and Zones 204

Properties 206

Editor Parts and Zones 210

Verbs 211

Connections 214

Personalization Scope 218

Exporting and Importing Web Parts 220

Formatting Web Parts and Zones 225

User Controls as Web Parts 226

Personalization Data and Providers 231

Changing the Personalization Data Store 233

Creating Your Own Personalization Provider 235

Summary 239

Chapter 7 Diagnostics 241

Health Monitoring and Web Events 241

Web Event Hierarchy 242

Which Events Should I Monitor? 245

Built-in Providers 245

The E-Mail Providers 248

The SQL Provider 251

Buffering 252

Registering for Events 254

Throttling and Profiles 256

Mapping the Health Monitoring Configuration Section 258

Custom Web Events 258

Custom Providers 261

Tracing in ASP.NET 2.0 264

Programmatic Access to Trace Output 264

Integration with System.Diagnostics Tracing 266

Funneling Web Events to System.Diagnostics Trace Listeners 268

Event Tracing for Windows: Debugging Without a Debugger 269

Summary 277

Chapter 8 Performance 279

Caching 279

Data Source Caching 280

Cache Dependencies 284

Programmatic Fragment Caching 296

Post-Cache Substitution 298

Cache Profiles 300

General Performance Enhancements 302

Client Callbacks 302

Client Callback Framework 302

On-Demand TreeView Node Population 306

Atlas 307

Summary 308

Chapter 9 Asynchrony 309

The Need for Asynchrony 310

Exploiting Parallelism 310

Relaxing Thread-Pool Contention 316

Techniques for Issuing Asynchronous Tasks 317

Asynchronous Web Access 317

AsyncOperationManager and Asynchronous Web Service Calls 320

Asynchronous Tasks 321

Dependent Asynchronous Tasks 324

Asynchronous Pages 326

Async="true" 326

Relaxing Thread-Pool Pressure 328

AddOnPreRenderCompleteAsync 329

Thread-Relative Resources 330

Summary 330

Index 333

商品描述(中文翻譯)

**描述**

「沒有人比 Fritz Onion 更了解 ASP.NET。也沒有人比 Keith Brown 更了解 .NET 安全性。將兩者結合起來,你會得到什麼?這是業界最全面且啟發性的 ASP.NET 2.0 書籍。我相信你會發現你手中的這本書值得每一分錢。」
--Aaron Skonnard,Pluralsight 技術團隊成員及共同創辦人

「《Essential ASP.NET 2.0》深入探討並在你眼前拆解引擎。Fritz 和 Keith 理解我們作為開發者需要了解它的運作方式,而這本書正是這樣做的。他們對 ASP.NET 2.0 頁面事件序列的解釋就值得這本書的價格。」
--Shawn Wildermuth,Microsoft MVP (C#),'The ADO Guy'

「《Essential ASP.NET 2.0》對任何開發者來說都是一本極其有用的必讀書籍。許多書籍拖著你走過理論和無意義的細節,但這本書實際上設置了你可能在 ASP.NET 2.0 中遇到的問題,並提供了替代方案。」
--Patrick Hynds,Microsoft 區域總監及 CriticalSites 總裁

「這本書對任何從版本 1.x 遷移到 2.0 的 ASP.NET 開發者來說都是必不可少的。Onion 和 Brown 不僅涵蓋了新功能,還提供了大量的見解和細節,幫助你有效地使用它們。」
--Ron Petrusha,《Visual Basic 2005: The Complete Reference》作者

「Fritz 和 Keith 憑藉他們深厚的技術知識和實際經驗,帶領讀者進入 ASP.NET 中一些較少探索但大幅改進的領域,如診斷、狀態管理和性能。讀者會一次又一次地翻閱這本書。」
--John Timney,Microsoft MVP,高級網路服務顧問,British Telecom

「Fritz 和 Keith,作為我們行業中成熟的開發者和作家,再次成功了——讓我們了解 ASP.NET 2.0 中的最新進展。如果你是 ASP.NET 的新手或資深老手,你將從他們的概述、分析和範例代碼中獲益良多。」
--Joe 'MSJoe' Flanigen

「這本書不僅旨在解釋如何有效地使用 ASP.NET 建立網站,還讓讀者了解這個過程的運作方式。這種見解對於創建與基礎架構協同工作的應用程序至關重要,而不是與之對抗。」
--Justin Burtch,新布魯克解決方案副總裁

《Essential ASP.NET 2.0》是 Microsoft 開發者的 ASP.NET 2.0 編程權威參考。它涵蓋了你需要知道的所有內容,以使用 ASP.NET 2.0、Visual Studio 2005 和 .NET 2.0 建立穩健且設計良好的 Web 應用程序。ASP.NET MVP Fritz Onion 和開發者安全 MVP Keith Brown 憑藉他們在 ASP.NET 2.0 上的無與倫比的經驗,為專業開發者提供教學。從數據綁定到安全性,從用戶界面到性能,他們揭開了 ASP.NET 2.0 最困難的領域的神秘面紗,並介紹了不為人知的技術,以充分利用它。

這本書是他之前經典著作《Essential ASP.NET with Examples in C#》的完美伴侶,《Essential ASP.NET 2.0》提供了數百個新的 C# 範例,闡明了當今最佳的 Web 開發實踐。(所有代碼範例的 C# 和 VB 2005 版本均可從伴隨網站下載。)

深入探討的主題包括:
- 應用架構
- 後端程式碼
- 主頁面
- 主題和外觀
- 導航控制
- 數據綁定
- 狀態管理
- 安全性
- Web 部件
- 診斷
- 性能優化
- 非同步任務和頁面

簡而言之,如果你想設計和構建更好的 ASP.NET 2.0 Web 應用程序,《Essential ASP.NET 2.0》提供了你所需的一切:內部知識、經過驗證的最佳實踐和出色的代碼範例。

**目錄**

- 圖表清單 xv
- 表格清單 xix
- 前言 xxi
- 序言 xxiii
- 感謝 xxix
- 關於作者 xxxi
- 第 1 章 架構 1
- 基礎 2
- 動態內容 2
- 伺服器端控制 5
- 數據綁定 8
- 後端程式碼 9
- 後端程式碼基礎 9
- 後端程式碼 2.0 11
- 頁面生命週期 15
- 常見事件 15
- 新事件 17
- 隱式事件訂閱 18
- 編譯 20
- 編譯目錄 20
- 網站編譯 24
- 程式集生成 26
- 自訂程式集生成 28
- Web 應用程序專案 28
- 總結 30
- 第 2 章 使用者介面元素 33
- 頁面範本 33
- 主頁面 35
- 實作細節 37
- 使用主頁面 41
- 使用細節 45
- 主題和外觀 48
- 主題 49
- 使用主題 51
- 導航控制基礎 54
- 控制適配器 58
- 建立控制適配器 58
- 瀏覽器識別 64
- CSS 友好的適配器 66
- 總結 66
- 第 3 章 數據綁定 67
- 宣告式數據綁定 68
- 數據綁定 68
- 數據源控制 70
- 儲存連接字串 82
- 數據源參數 83
- 新的數據綁定控制 87
- 數據綁定評估語法 91
- 宣告式數據綁定技術 91
- 層次數據綁定 96
- 綁定到物件 102
- 類型化數據集 112
- 總結 112
- 第 4 章 狀態管理 113
- 跨頁面發送 114
- 基礎 114
- 實作 120
- 注意事項 121
- 多來源跨頁面發送 124
- 向導和多視圖控制 127
- 同頁面狀態管理 127
- 向導控制 128
- 多視圖和視圖控制 131
- 配置文件 133
- 基礎 133
- 遷移匿名配置文件數據 137
- 管理配置文件數據 138
- 儲存配置文件數據 138
- 序列化 139
- 用戶定義類型作為配置文件屬性 142
- 優化配置文件 143
- 自訂路徑 147
- 總結 149
- 第 5 章 安全性 151
- 我需要多少安全性? 151
- 開始使用會員 153
- 提供者架構 158
- MembershipProvider 160
- 登入控制 162
- 用戶帳戶鎖定:祝福還是詛咒? 164
- 密碼複雜性政策 166
- 選擇密碼格式 167
- 密碼問題和答案 169
- 配置會員提供者 170
- 自訂提供者 172
- 使用 Membership 類訪問你的提供者 173
- SQL 數據庫權限 175
- LoginView 和其他控制 177
- 角色管理器 180
- 配置角色管理器和提供者 181
- 其他角色提供者 183
- 關於機器密鑰的說明 184
- 無 Cookie 表單身份驗證 185
- SiteMapProvider 安全修剪 187
- 配置文件加密 188
- 總結 191
- 第 6 章 Web 部件 193
- Web 部件基礎 194