OOP: Building Reusable Components with Microsoft Visual Basic .NET
暫譯: 物件導向程式設計:使用 Microsoft Visual Basic .NET 建立可重用元件
Kenneth L Spencer, Ken Spencer, Tom Eberhard, John Alexander
- 出版商: MicroSoft
- 出版日期: 2002-11-09
- 售價: $1,950
- 貴賓價: 9.5 折 $1,853
- 語言: 英文
- 頁數: 528
- 裝訂: Paperback
- ISBN: 0735613796
- ISBN-13: 9780735613799
-
相關分類:
Visual Basic
已絕版
買這商品的人也買了...
-
System Software: An Introduction to Systems Programming, 3/e (Paperback)$7,470$7,097 -
$2,176Refactoring: Improving the Design of Existing Code (Hardcover) -
MCSE: Windows 2000 Directory Services Design Study Guide$1,840$1,748 -
Data Mining: Concepts and Techniques$2,530$2,404 -
C++ Primer, 3/e 中文版$980$774 -
Introduction to Algorithms, 2/e (Hardcover)$990$970 -
Beginning Perl for Bioinformatics (Paperback)$1,330$1,260 -
深入研究 Servlets 與 JavaServer Pages (Core Servlets and JavaServer Pages)(JSP)$650$553 -
Computer Networking: A Top-Down Approach Featuring the Internet, 2/e (精裝)$1,090$1,068 -
JavaScript 範例活用辭典$450$351 -
Programming the Microsoft Windows Driver Model, 2/e (Paperback)$2,270$2,157 -
Macromedia Flash Communication Server MX$1,620$1,539 -
PHP & MySQL 完全架站攻略第二版$620$527 -
Hacking Exposed: Network Security Secrets & Solutions, 4/e$1,840$1,748 -
JBuilder 實用技術手冊$600$474 -
Java 完美經典優質學習篇$750$638 -
Dreamweaver MX for JSP 夢幻咖啡香$620$527 -
ASP.NET 程式設計徹底研究$590$466 -
Building Embedded Linux Systems$1,650$1,568 -
Windows Server 2003 網路與 IIS 架站指南$680$537 -
數位邏輯設計 (Digital Design, 3/e)$580$568 -
電腦網路 (Computer Networks, 4/e)$800$760 -
鳥哥的 Linux 私房菜─基礎學習篇增訂版$560$476 -
Fundamentals of Database Systems, 4/e (IE)$1,090$1,068 -
osCommerce 購物網站架設實戰$550$468
相關主題
商品描述
Description:
Discover how to design and build powerful, component-based applications quickly with Visual Basic .NET!
The Microsoft® .NET Framework collection of classes
and technologies dramatically shortens development cycles and reduces
development costs. Find out how to take advantage of this new development
environment with this hands-on primer about writing Visual Basic® .NET
components using the principles of object-oriented programming. It’s full of
proven, real-world strategies that’ll help you get more out of your scarce
coding resources. You’ll discover how to design and build powerful applications
of almost any size quickly from reusable, shared components that you can create
with Visual Basic .NET—or adapt from the samples included with the book. You’ll
learn about the latest changes to the language and the features that .NET brings
to the development process. You’ll also learn how to construct a rich,
object-oriented architecture for creating complex business applications from
reusable components. Topics covered include:
• Introduction to
object-oriented development
• Architecture and Microsoft .NET
• Exception
handling in the .NET Framework
• Implementing the various layers of an
application: data access, security, generic Web client handlers, menu handlers,
business rules, and facade
• Creating the user interface template
•
Building information pages and XML Web services
• Using remoting for
communication
• Wiring the application together
Table of Contents:
| Acknowledgments | xv |
| Introduction | xvii |
| 1 Introduction to Object-Oriented Development | 1 |
| The .NET Framework | 2 |
| Visual Studio .NET Support for Components | 6 |
| General Language Changes in Visual Basic .NET | 8 |
| Data Type Changes | 8 |
| Arrays | 9 |
| String Handling | 10 |
| Structured Exception Handling | 12 |
| Components, Classes, and Objects | 13 |
| Components and Classes | 14 |
| Class and Module Files | 16 |
| Instantiating and Using Classes | 17 |
| Structures | 19 |
| Property Procedures | 20 |
| Working with Methods | 21 |
| Overloading Properties and Methods | 22 |
| Overriding Existing Methods | 23 |
| Events | 24 |
| Interfaces and Implements | 25 |
| Shared Members | 26 |
| Namespaces | 26 |
| Inheritance | 28 |
| Deploying .NET Applications | 29 |
| 2 Architectural Options with .NET | 33 |
| Choosing the Right Architecture | 34 |
| Brief History of Software Architecture | 35 |
| One-Tier Architecture | 35 |
| Two-Tier Architecture | 36 |
| Three-Tier Architecture | 39 |
| Flexible n-Tier Architecture | 43 |
| Solutions Using the .NET Framework | 50 |
| User Interfaces | 51 |
| Facade Functions | 53 |
| Business Layer | 53 |
| Data Access Layer | 54 |
| Data Layer | 54 |
| Analysis and Design | 54 |
| 3 Exception Handling in the .NET Framework | 59 |
| The Exceptional News on .NET | 60 |
| What Is Structured Exception Handling? | 61 |
| Structured Exception Handling | 62 |
| Object-Oriented Exception Handling | 62 |
| The Syntax of the Try Statement | 63 |
| Defining Exception-Handling Objects | 66 |
| Guidelines for Defining Custom Exception Classes | 66 |
| Defining a Custom Base Class for Exceptions | 68 |
| Event Logging | 75 |
| Exception-Handling Objects and Remoting | 78 |
| Creating an Application Exception Class Hierarchy | 80 |
| 4 Implementing the Data Access Layer | 83 |
| The Power of ADO.NET | 84 |
| Performance | 84 |
| Scalability | 84 |
| XML Equals Interoperability | 85 |
| Ease of Use | 85 |
| Components of ADO.NET | 85 |
| Connection Object | 87 |
| Command Object | 88 |
| DataReader Object | 91 |
| DataSet Object | 93 |
| The ADO.NET Data Access Object | 95 |
| Why Have a Data Access Object? | 95 |
| What Will the Data Access Object Do? | 96 |
| Our Approach to Database Access and Usage | 97 |
| Implementing the Data Access Object | 97 |
| The Data Access Object as a Component | 97 |
| Private Variables and Objects | 100 |
| Constructors | 100 |
| Properties | 101 |
| The First Method: Running an SQL Statement and Returning a DataSet | 102 |
| Exception Handling | 103 |
| Logging Exceptions | 103 |
| What Else? | 104 |
| The Complete Code for the runSQLDataSet Method | 107 |
| Using the Data Access Object | 118 |
| Additional Questions About Data Access | 119 |
| How Do We Handle Transactions? | 119 |
| What About Data Concurrency? | 119 |
| What About Connection Pooling? | 119 |
| Can We Use Performance Counters? | 120 |
| 5 Implementing the Security Layer | 121 |
| Overview of Relevant .NET Security Features | 122 |
| Application Security Needs | 123 |
| Forms Authentication Services | 124 |
| Creating the Forms Authentication Architecture for an Application | 125 |
| Configuring the Application | 126 |
| Creating the Credentials Store | 128 |
| Creating the Login Form | 129 |
| Authorization Features | 134 |
| Authorization Types in the .NET Framework | 135 |
| Working with Role-Based Authorization | 135 |
| URL Authorization | 138 |
| The Security Layer | 138 |
| Creating the SecurIt Component | 140 |
| Creating the Secure ASP.NET Header | 148 |
| Using the SecurIt Layer | 153 |
| 6 Implementing Generic Web Client Handlers | 157 |
| User Interface Options with ASP.NET | 158 |
| The Past | 158 |
| The Present | 159 |
| The Future | 161 |
| Choosing Between User Controls and Custom Server Controls | 161 |
| Building User Controls | 163 |
| The Basics of User Controls | 164 |
| Properties of User Controls | 167 |
| Methods of User Controls | 171 |
| Event Bubbling in User Controls | 173 |
| Dynamically Loaded User Controls | 175 |
| Building Custom Server Controls | 178 |
| The Basics of Full Custom Server Controls | 179 |
| Enhanced or Derived Custom Server Controls | 185 |
| Enhanced ASP.NET DropDownList Server Control | 185 |
| Highlighting the Selected Textbox Server Control | 188 |
| Composite Server Controls | 192 |
| Composite ASP.NET MyLabelTextBox Server Controls | 193 |
| Enhanced Composite ASP.NET MyLabelTextBox Server Controls | 201 |
| Events and Custom Server Controls | 205 |
| Using Windows Forms Controls | 206 |
| 7 Implementing the Menu Handlers | 211 |
| A Bit of Menu Strategy | 212 |
| Our Approach to Designing Effective Menus | 214 |
| Creating Menu and Navigation Bar Objects | 218 |
| .NET Technology Used | 218 |
| Designing the Control | 223 |
| The MenuData Component | 224 |
| The Main Menu Custom User Control | 229 |
| The Navigation Bar Custom User Control | 231 |
| Other Options for User Controls | 236 |
| A Visual Basic .NET Windows Forms Example | 238 |
| 8 Implementing the Business Layer | 243 |
| Why Do We Need a Business Layer? | 243 |
| Designing Generic Business Objects | 244 |
| Determining Business Rules | 246 |
| Interacting with the Security Layer | 247 |
| Interacting with the Data Access Layer | 248 |
| Building and Determining Queries Based on Business Rules | 248 |
| Get-Related Stored Procedures | 255 |
| Insert-Related Stored Procedures | 257 |
| Update-Related Stored Procedures | 259 |
| Object-Oriented Features of Visual Basic .NET | 261 |
| Constructors Revisited | 261 |
| Overloading | 263 |
| Overloaded Constructors | 264 |
| Inheritance in HRnet | 265 |
| 9 Implementing Facade Layers | 271 |
| Advantages of Facade Layers and Applications | 272 |
| Designing the Facade Layers | 273 |
| Building the Facade Objects | 275 |
| The EmployeeHRObject Facade Class | 281 |
| EmployeeCSObject Facade Class | 283 |
| 10 Creating the User Interface Template | 287 |
| HRnet Sample Application Specifications | 288 |
| HRnet Application Architecture | 288 |
| HRnet Application Functionality | 289 |
| Creating the HRnet Web Template | 294 |
| The Web Template Layout | 294 |
| The Web Template Files | 295 |
| Starting the HRnet Application | 299 |
| The HRnet Home Page | 301 |
| Web Page Templates: The Other Option | 304 |
| Additional Functionality | 310 |
| Creating the HRnet Windows Forms Template | 311 |
| The Base Forms | 312 |
| The Final Data Entry Form | 315 |
| Calling Code from Web Pages and Windows Forms | 315 |
| 11 Building Information Pages | 317 |
| A Bit of User Interface Strategy | 318 |
| Web-Based vs. Windows-Based Data Presentation Forms | 320 |
| Data Presentation Forms | 321 |
| ASP.NET DataGrid Control for List Forms | 321 |
| Customizing the Default ASP.NET DataGrid Control | 325 |
| Adding Functionality to a Custom DataGrid Control | 328 |
| Adding Better Graphics | 332 |
| Changing the Footer | 333 |
| Adding the GoTo Function | 337 |
| Adding Sorting Capabilities | 342 |
| Adding Final Enhancements | 346 |
| Showing Detail Information | 350 |
| A One-Page Grid and Detail Form | 351 |
| Grid and Detail Forms Separated | 356 |
| Enhancing the Page Grid and Detail Form | 359 |
| State Handling in the Detail Custom Server Control | 363 |
| Scalability and Performance | 367 |
| 12 Implementing the Business Layer: XML Web Services | 373 |
| Implementing XML Web Services | 374 |
| Consuming XML Web Services | 376 |
| Under the Proxy's Hood | 378 |
| Using Publicly Available Services | 378 |
| The WeatherInfo Web Control | 383 |
| SOAP: Your XML Web Service's New Best Friend | 385 |
| Currently Supported Protocols | 385 |
| SOAP Document Structure | 386 |
| Calling from the Client | 389 |
| 13 Using Remoting for Communication | 391 |
| Starting Out | 391 |
| Creating the Server | 393 |
| Building Your First Remoting Client | 395 |
| Building the Remote Host | 400 |
| Windows Hoster | 400 |
| Windows Service Hoster | 401 |
| Remoting the Business Objects | 405 |
| Security Layer | 406 |
| Business Layer | 407 |
| Remoting Deployment | 409 |
| Creating the Client | 410 |
| 14 Wiring the Application Together | 417 |
| Steps for Wiring the Application | 418 |
| Step 1: Menu Structure and Templates | 419 |
| Step 2: Security | 421 |
| Step 3: The Home Page | 429 |
| Step 4: Information and Data Pages | 437 |
| An HRnet Windows Form: Titles | 454 |
| Titles: DataGrid and Detail in One Windows Form | 454 |
| Deploying an Application | 459 |
| Deploy with XCOPY | 460 |
| Deploy Global Files | 460 |
| Deploy by Creating a Windows Installer Package | 463 |
| Assemblies and Versioning | 465 |
| INDEX | 469 |
商品描述(中文翻譯)
描述:
快速學習如何使用 Visual Basic .NET 設計和構建強大的基於組件的應用程式!
Microsoft® .NET Framework 的類別和技術集合顯著縮短了開發週期並降低了開發成本。透過這本實用的入門書,了解如何利用這個新的開發環境,使用物件導向程式設計的原則來編寫 Visual Basic® .NET 組件。書中充滿了經過驗證的實用策略,幫助您更有效地利用有限的編碼資源。您將學會如何快速設計和構建幾乎任何規模的強大應用程式,這些應用程式可以從您使用 Visual Basic .NET 創建的可重用共享組件中獲得,或從書中提供的範例中進行調整。您將了解語言的最新變更以及 .NET 為開發過程帶來的特性。您還將學會如何構建一個豐富的物件導向架構,以便從可重用組件中創建複雜的商業應用程式。涵蓋的主題包括:
• 物件導向開發簡介
• 架構與 Microsoft .NET
• .NET Framework 中的例外處理
• 實現應用程式的各個層次:數據訪問、安全性、通用 Web 客戶端處理程序、菜單處理程序、商業規則和外觀
• 創建用戶界面模板
• 構建信息頁面和 XML Web 服務
• 使用遠程通信
• 將應用程式連接在一起
目錄:
致謝 xv
簡介 xvii
1 物件導向開發簡介 1
.NET Framework 2
Visual Studio .NET 對組件的支持 6
Visual Basic .NET 中的一般語言變更 8
數據類型變更 8
陣列 9
字串處理 10
結構化例外處理 12
組件、類別和物件 13
組件和類別 14
類別和模組檔案 16
實例化和使用類別 17
結構 19
屬性程序 20
使用方法 21
屬性和方法的重載 22
覆寫現有方法 23
事件 24
介面和實現 25
共享成員 26
命名空間 26
繼承 28
部署 .NET 應用程式 29
2 .NET 的架構選項 33
選擇正確的架構 34
軟體架構簡史 35
單層架構 35
雙層架構 36
三層架構 39
靈活的 n 層架構 43
使用 .NET Framework 的解決方案 50
用戶界面 51
外觀功能 53
商業層 53
數據訪問層 54
數據層 54
分析與設計 54
3 .NET Framework 中的例外處理 59
.NET 的例外新聞 60
什麼是結構化例外處理? 61
結構化例外處理 62
物件導向例外處理 62
Try 語句的語法 63
定義例外處理物件 66
定義自訂例外類別的指導方針 66
定義自訂
