C++ in Action: Industrial-strength Programming Techniques (Paperback)
暫譯: C++ 實戰:工業級程式設計技術 (平裝本)

Bartosz Milewski

  • 出版商: Addison Wesley
  • 出版日期: 2001-06-01
  • 定價: $1,560
  • 售價: 8.0$1,248
  • 語言: 英文
  • 頁數: 485
  • 裝訂: Paperback
  • ISBN: 0201699486
  • ISBN-13: 9780201699487
  • 相關分類: C++ 程式語言
  • 立即出貨(限量)

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

相關主題

商品描述


Description

C++: Proven techniques for building -- and maintaining -- industrial-strength Windows software.

  • Extensive coverage of resource management -- a crucial technique for building robust, maintainable systems.
  • Detailed coverage of large-scale software projects: strategies, techniques, management, planning, and project dynamics.
  • CD-ROM includes extensive C++ source code library.
C++ in Action introduces state-of-the-art C++ programming and problem-solving techniques for developing efficient, powerful, scalable software systems. Renowned software architect Bartosz Milewski starts from two key premises. First, programs aren't written for computers: they're written for other programmers who will have to integrate and maintain them. Second, software development languages aren't ends in themselves: they're tools to solve problems. Starting from these principles, Milewski presents a comprehensive guide to C++ software engineering for maximum performance, reliability, and maintainability. He shows how to use resource management and exception management together to build more reliable code. Next, he introduces new techniques that simplify Windows development despite the complexity of the Windows API and libraries. The book also includes detailed coverage of large-scale software and scalability, encompassing development strategies and tactics as well as management, planning, and project dynamics. An accompanying CD-ROM and a companion web site contain an extensive source code library.

Bartosz Milewski has been programming since 1986, and teaching C++ since 1994. He is President of Reliable Software, a firm specializing in creating high-quality productivity tools for programmers. Previously, he was architect and programming lead for Microsoft Index Server, a successful commercial application now integrated in Windows 2000. Milewski holds a Ph.D in theoretical physics.

Back to Top


Table Of Contents

Introduction.
Language.
Techniques.
Windows.
Scaling Up.
How to Use this Book.
Language.

Objects and Scopes.
Global scope.
Local Scope.
Embedded objects.
Inheritance.
Member functions and Interfaces.
Member function scope.
Types.
Summary.
Exercises.
Abstract Data Types.
Exercises.

Arrays and references.
References.
Operators.
Arithmetic.
Logic.
Bitwise Logic.
Stack-based calculator.
Functional Specification.
Design.
Stubbed Implementation.
Implementation.
Exercises.

Pointers.
Pointers.
Pointers vs. References.
Pointers vs. Arrays.
Assembly Digression.
Exercises.
Pointers and Dynamic Memory Allocation.
Dynamic Data Structures.
Dynamic Stack.
Linked List.
String Table.
String Buffer.
Table Lookup.
Hash Table.
Test Program.
Exercises.

Polymorphism.
The Meaning of is-a.
Implementation Digression.
The Overhead.
Parse Tree.
C Digression.
Exercises.

Small Software Project.
Software Project.
Specification.
Stubbed Implementation.
Expanding Stubs.
Scanner.
Symbol Table.
Store.
Function Table.
Nodes.
Parser.
Main.
Initialization of Aggregates.
Exercises.
Procedural Programming.
Operator Overloading.
Passing by Value.
Value Semantics.
Techniques.

The Cleanup.
Decoupling the Output.
Fighting Defensive Programming.
A Case of Paranoid Programming.
Fringes.
Improving Communication Between Classes.
Correcting Design Flaws.
Hiding Implementation Details.
Using Embedded Classes.
Combining Classes.
Combining Things using Namespaces.
Hiding Constants in Enumerations.
Hiding Constants in Local Variables.

Sharing.
Isolating Global Program Parameters.
Pushing the Envelope.
Templates.
Exercises.

Removing Limitations.
Dynamic Array.
Dynamic MultiNode.
Dynamic StringBuffer.
Dynamic SymbolTable.
Dynamic Store.
Standard Vector.

Resource Management.
Exceptions.
Stack Unwinding.
Resources.
Ownership of Resources.
Access to Resources.
Smart Pointers.
Ownership Transfer: First Attempt.
Ownership Transfer: Second Attempt.
Safe Containers.
Iterators.
Error Propagation.
Conversion to Resource Management.
Conclusion.

Making Use of the STL.
Reference Counting and Copy-On-Write.
End of Restrictions.
Getting Rid of C-Strings.
Exploring Streams.

Serialization and Deserialization.
The Calculator Object.
Command Parser.
Serialization and Deserialization.
In-Memory (De-) Serialization.
Multiple Inheritance.
Conclusion.

Overloading Operator new.
Class-specific new.
Caching.
Bulk Allocation.
Array new.
Global new.
Macros.
Tracing Memory Leaks.
Debug Output.
Placement new.
Windows.

Libraries.
Of Macros and Wizards.

Programming Paradigm.
Hello Windows!
Encapsulation.

Controlling Windows through C++.
Model-View-Controller.
Exception Specification.
Cleanup.

Painting.
Application Icon.
Window Painting and the View Object.
The Canvas.
The WM_PAINT Message.
The Model.
Capturing the Mouse.
Adding Colors and Frills.

Windows Application.
Porting the Calculator to Windows.
User Interface.
Child Windows.
Windows Controls.
Static Text.
Edit Control.
Window Subclassing.
Plugging in the Calculator.
List Box Control.
Model-View Feedback Loop.
Commands and Menus.
Dynamic Menus.
Dialogs.
Exercises.

Scaling Up.
About Software.
Complexity.
The Fractal Nature of Software.
The Living Project.
The Living Programmer.

Design Strategies.
Top-Down Object Oriented Design.
Model-View-Controller.
Documentation.
Requirement Specification.
Architecture Specification.

Team Work.
Productivity.
Team Strategies.

Implementation Strategies.
Global Decisions.
Top-Down Object Oriented Implementation.
Program Modifications.
Inheriting Legacy Code.
Multi-platform development.

Porting.
Creating an Abstraction Layer.
Porting the Calculator.
Eliminating Simple Windows Dependencies.
Non-trivial Windows Dependencies.
The Advantages of Porting.

Bibliography.
Appendices.
Exercise Solutions.
Transactions.
Transient Transactions.
Persistent Transactions.
The Three-File Scheme.
The Mapping-File Scheme. 0201699486T04062001



Back to Top

商品描述(中文翻譯)

描述

C++:建立和維護工業級 Windows 軟體的成熟技術。
- 廣泛涵蓋資源管理(resource management)——這是一項建立穩健、可維護系統的關鍵技術。
- 詳細介紹大型軟體專案:策略、技術、管理、規劃和專案動態。
- CD-ROM 包含廣泛的 C++ 原始碼庫。

《C++ in Action》介紹了最先進的 C++ 程式設計和問題解決技術,用於開發高效、強大、可擴展的軟體系統。著名的軟體架構師 Bartosz Milewski 從兩個關鍵前提開始。首先,程式不是為了電腦而寫的:它們是為了其他程式設計師而寫的,這些程式設計師必須整合和維護它們。其次,軟體開發語言不是目的本身:它們是解決問題的工具。基於這些原則,Milewski 提供了一本全面的 C++ 軟體工程指南,以實現最佳性能、可靠性和可維護性。他展示了如何將資源管理和例外管理結合起來,以建立更可靠的程式碼。接下來,他介紹了簡化 Windows 開發的新技術,儘管 Windows API 和庫的複雜性。這本書還詳細介紹了大型軟體和可擴展性,涵蓋開發策略和戰術,以及管理、規劃和專案動態。隨附的 CD-ROM 和伴隨網站包含廣泛的原始碼庫。

Bartosz Milewski 自 1986 年開始程式設計,自 1994 年開始教授 C++。他是 Reliable Software 的總裁,該公司專注於為程式設計師創建高品質的生產力工具。之前,他是 Microsoft Index Server 的架構師和程式設計負責人,這是一個成功的商業應用程式,現在已整合到 Windows 2000 中。Milewski 擁有理論物理學的博士學位。

目錄

引言。
- 語言。
- 技術。
- Windows。
- 擴展。
- 如何使用本書。
- 語言。

物件與範圍。
- 全域範圍。
- 區域範圍。
- 嵌入物件。
- 繼承。
- 成員函數與介面。
- 成員函數範圍。
- 類型。
- 總結。
- 練習。
- 抽象資料類型。
- 練習。

陣列與參考。
- 參考。
- 運算子。
- 算術。
- 邏輯。
- 位元邏輯。
- 基於堆疊的計算器。
- 功能規範。
- 設計。
- 假實作。
- 實作。
- 練習。

指標。
- 指標。
- 指標與參考。
- 指標與陣列。
- 組合語言的插曲。
- 練習。
- 指標與動態記憶體分配。
- 動態資料結構。
- 動態堆疊。
- 鏈結串列。
- 字串表。
- 字串緩衝區。
- 表查詢。
- 雜湊表。
- 測試程式。
- 練習。

多型。
- is-a 的意義。
- 實作插曲。
- 開銷。
- 解析樹。
- C 語言的插曲。
- 練習。

小型軟體專案。
- 軟體專案。
- 規範。
- 假實作。
- 擴展假實作。
- 掃描器。
- 符號表。
- 儲存。
- 函數表。
- 節點。
- 解析器。
- 主程式。
- 聚合物件的初始化。
- 練習。
- 程序式程式設計。
- 運算子重載。
- 值傳遞。
- 值語義。
- 技術。

清理。
- 解耦輸出。
- 對抗防禦性程式設計。
- 偏執程式設計的案例。
- 邊緣情況。
- 改善類別之間的溝通。
- 修正設計缺陷。
- 隱藏實作細節。
- 使用嵌入類別。
- 組合類別。
- 使用命名空間組合事物。
- 隱藏列舉中的常數。
- 隱藏區域變數中的常數。

共享。
- 隔離全域程式參數。
- 挑戰極限。
- 模板。
- 練習。

移除限制。
- 動態陣列。
- 動態多節點。
- 動態字串緩衝區。
- 動態符號表。
- 動態儲存。
- 標準向量。

資源管理。
- 例外。
- 堆疊展開。
- 資源。
- 資源的擁有權。
- 訪問資源。
- 智能指標。
- 擁有權轉移:第一次嘗試。
- 擁有權轉移:第二次嘗試。
- 安全容器。
- 迭代器。
- 錯誤傳播。
- 轉換為資源管理。
- 結論。

利用 STL。
- 參考計數與寫時複製。
- 限制的結束。
- 擺脫 C 字串。
- 探索串流。

序列化與反序列化。
- 計算器物件。
- 命令解析器。
- 序列化與反序列化。
- 內存中的(反)序列化。
- 多重繼承。
- 結論。

重載運算子 new。
- 類別特定的 new。
- 快取。
- 批量分配。
- 陣列 new。
- 全域 new。
- 宏。
- 追蹤記憶體洩漏。
- 除錯輸出。
- 放置 new。
- Windows。

函式庫。
- 宏與精靈。

程式設計範式。
- 你好,Windows!
- 封裝。

透過 C++ 控制 Windows。
- 模型-視圖-控制器。
- 例外規範。
- 清理。

繪圖。
- 應用程式圖示。
- 視窗繪圖與視圖物件。
- 畫布。
- WM_PAINT 訊息。
- 模型。
- 捕捉滑鼠。
- 添加顏色與裝飾。

Windows 應用程式。
- 將計算器移植到 Windows。
- 使用者介面。
- 子視窗。
- Windows 控制項。
- 靜態文字。
- 編輯控制項。
- 視窗子類化。
- 插入計算器。
- 列表框控制項。
- 模型-視圖反饋迴路。
- 命令與選單。
- 動態選單。
- 對話框。
- 練習。

擴展。
關於軟體。
- 複雜性。
- 軟體的分形特性。
- 活的專案。
- 活的程式設計師。

設計策略。
- 自上而下的物件導向設計。
- 模型-視圖-控制器。
- 文件。
- 需求規範。
- 架構規範。

團隊合作。
- 生產力。
- 團隊策略。

實作策略。
- 全域決策。
- 自上而下的物件導向實作。
- 程式修改。
- 繼承舊有程式碼。
- 多平台開發。

移植。
- 創建抽象層。
- 移植計算器。
- 消除簡單的 Windows 依賴。
- 非平凡的 Windows 依賴。
- 移植的優勢。

參考文獻。

附錄。

練習解答。
- 交易。
- 瞬時交易。
- 持久交易。
- 三檔案方案。
- 映射檔案方案。