售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
.NET Design Patterns
.NET Design Patterns
Credits
Foreword
About the Authors
About the Reviewers
www.PacktPub.com
Why subscribe?
Customer Feedback
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. An Introduction to Patterns and Pattern Catalogs
OOP - A short history
Patterns and pattern movement
Key pattern catalogs
GoF patterns
POSA catalog
POEAA catalog
EIP catalog
J2EE design patterns catalog
DDD-based patterns
Arlow/Nuestadt patterns
Should we use all of these?
The C# language and the .NET platform
C# language and the singleton pattern
Summary
2. Why We Need Design Patterns?
Some principles of software development
Why are patterns required?
A quick foray into the .NET Reflection API
Personal income tax computation - A case study
Archetypes and business archetype patterns
Entity, value, and data transfer objects
A computation engine
The application to engine communication
The plugin system to make system extensible
Factory method pattern and plugins
Finalizing the solution
Design by contract and template method pattern
Using the Facade pattern to expose the computation API
Summary
3. A Logging Library
Requirements for the library
Solutions approach
Writing content to a media
Template method pattern and content writers
Writing a log entry to a file stream
Writing a log entry to a database
Writing a log entry to a network stream
Logging strategy atop the strategy pattern
The factory method pattern for instantiation
Writing a generic factory method implementation
Factory method, singleton, and prototype pattern for dynamic class loading
Refactoring the code with the generic factory method
A log server for network logging
A simple client program to test the library
Summary
4. Targeting Multiple Databases
Requirements for the library
Solutions approach
A quick primer on ADO.net
The abstract factory pattern and object instantiation
The SQL server implementation
The SQLite implementation
The Oracle and ODBC implementation
The adapter pattern powered API
The adapter class Implementation
The adapter configuration
The client program
Summary
5. Producing Tabular Reports
Requirements for the library
Solutions approach
iTextSharp for the PDF output
Composite and visitor pattern - A quick primer
The composite pattern and document composition
Visitor pattern for document traversal
PDFVisitor for PDF generation
HTMLVisitor for HTML generation
The client program
Summary
6. Plotting Mathematical Expressions
Requirements for the expressions library and app
Solutions approach
The graph plotter application
The observer pattern for UI events
The expression evaluator and interpreter pattern
The abstract syntax tree (AST)
The grammar of expressions
Lexical analysis
The parser module
The builder, facade, and expression APIs
Summary
7. Patterns in the .NET Base Class Library
Adapter pattern in the .NET BCL
Strategy pattern in the .NET BCL
Builder pattern in the .NET BCL
Decorator pattern in the .NET BCL
Chain of responsibility pattern in ASP.net
Bridge pattern in the .NET RCW
Factory pattern in the .NET BCL
Observer pattern in the WPF
Composite pattern in the .NET Framework
Facade pattern in the .NET BCL
Iterator pattern in the .NET BCL
Summary
8. Concurrent and Parallel Programming under .NET
Days of Free Lunch
Days of Sponsored Lunch
Concurrent versus parallel
Some common patterns of parallel programming
Embarrassingly or conveniently parallel
Problem statement
Solutions approach
Step 1
Step 2
Step 3
Fork/join or master/worker
Speculative execution
Producer/consumer
Summary
9. Functional Programming Techniques for Better State Management
Being functional
Referential transparency
First-class and higher-order functions
Function type
Lambda (λ) calculus
Anonymous functions
Closures
Currying and partial application
Currying
Partial application
Applying currying and partial application
Expression trees
Recursion
Sample programs
Spell checker
Subset generation
How does LINQ work?
Summary
10. Pattern Implementation Using Object/Functional Programming
A strategy pattern implementation using FP/OOP
Using FP constructs to make the code better
A fresh look at the iterator pattern using FP/OOP
MapReduce programming idiom
A new spin on the template method pattern using FP/OOP
Using FP for the template method pattern implementation
A quick note on the observer pattern
Does FP replace GoF patterns?
Summary
11. What is Reactive Programming?
Being reactive
Electronic spread sheets - A quintessential example
Reactive programming model
Functional reactive programming
Reactive programming principles
Rx from Microsoft
Key data structures of Rx
IEnumberable/IObservable duality
Converting entities to streams (IObservable<T>)
Converting events into stream
Reduction of streams (sequences)
Inspection of streams (sequences)
Aggregation of streams (sequences)
Transformation of streams (sequences)
Combining streams (sequences)
A philosophy for reactive programming
Summary
12. Reactive Programming Using .NET Rx Extensions
Streams as a way of life
Spell checker using events composition
MVVM on Rx
An asynchronous logger
Near real-time visualizer/dashboard
Summary
13. Reactive Programming Using RxJS
The JS world
Rx foundations
RxJS formalism
Observables and observers
Observables from arrays
Observables from events
Observables from callbacks
Observable pipeline
Subject et al.
Schedulers
RxJS samples
Real-time file watcher
Change galore
Summary
14. A Road Ahead
Polyglot programming and design
Polyglot programming with C/C++
The polyglot web programming
The JavaScript evolution
Dynamic/scripting languages
Emergence of functional programming
Mobile revolution
A quick note on polyglot persistence
How to become a polyglot programmer?
Domain-specific languages
Ontology
AntiPatterns
Summary
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜