Muutke küpsiste eelistusi

E-raamat: Design Patterns in .NET 6: Reusable Approaches in C# and F# for Object-Oriented Software Design

  • Formaat: EPUB+DRM
  • Ilmumisaeg: 29-Aug-2022
  • Kirjastus: APress
  • Keel: eng
  • ISBN-13: 9781484282458
  • Formaat - EPUB+DRM
  • Hind: 67,91 €*
  • * hind on lõplik, st. muud allahindlused enam ei rakendu
  • Lisa ostukorvi
  • Lisa soovinimekirja
  • See e-raamat on mõeldud ainult isiklikuks kasutamiseks. E-raamatuid ei saa tagastada.
  • Formaat: EPUB+DRM
  • Ilmumisaeg: 29-Aug-2022
  • Kirjastus: APress
  • Keel: eng
  • ISBN-13: 9781484282458

DRM piirangud

  • Kopeerimine (copy/paste):

    ei ole lubatud

  • Printimine:

    ei ole lubatud

  • Kasutamine:

    Digitaalõiguste kaitse (DRM)
    Kirjastus on väljastanud selle e-raamatu krüpteeritud kujul, mis tähendab, et selle lugemiseks peate installeerima spetsiaalse tarkvara. Samuti peate looma endale  Adobe ID Rohkem infot siin. E-raamatut saab lugeda 1 kasutaja ning alla laadida kuni 6'de seadmesse (kõik autoriseeritud sama Adobe ID-ga).

    Vajalik tarkvara
    Mobiilsetes seadmetes (telefon või tahvelarvuti) lugemiseks peate installeerima selle tasuta rakenduse: PocketBook Reader (iOS / Android)

    PC või Mac seadmes lugemiseks peate installima Adobe Digital Editionsi (Seeon tasuta rakendus spetsiaalselt e-raamatute lugemiseks. Seda ei tohi segamini ajada Adober Reader'iga, mis tõenäoliselt on juba teie arvutisse installeeritud )

    Seda e-raamatut ei saa lugeda Amazon Kindle's. 

Implement design patterns in .NET 6 using the latest versions of the C# and F# languages. This book provides a comprehensive overview of the field of design patterns as they are used in today’s developer toolbox. In addition to the functional builder, asynchronous factory method, generic value adapter, and composite proxies, this new edition introduces topics such as Decorator Cycle Policies Functional Commands, a Transformer variation of the Visitor pattern, and factories that can perform Object Tracking and Bulk Replacement.

Using the C# and F# programming languages, Design Patterns in .NET 6 explores the classic design pattern implementations and discusses the applicability and relevance of specific language features for implementing patterns. You will learn by example, reviewing scenarios where patterns are applicable. Former C# MVP and patterns expert Dmitri Nesteruk demonstrates possible implementations of patterns, discusses alternatives and pattern relationships, and illustrates the way that a dedicated refactoring tool (JetBrains Rider) can be used to implement design patterns with ease.

What You Will Learn
  • Become familiar with the latest pattern implementations available in C# 10 and F# 6
  • Know how to better reason about software architecture
  • Understand the process of refactoring code to patterns
  • Refer to researched and proven variations of patterns
  • Study complete, self-contained examples, including many that cover advanced scenarios
  • Use the latest versions of C# and Visual Studio/Rider/ReSharper

Who This Book Is For

Developers who have some experience in the C# language and want to expand their comprehension of the art of programming by leveraging design approaches to solve modern problems


Intermediate user level
About the Author xv
About the Technical Reviewer xvii
Introduction xix
Part I Introduction
1(34)
Chapter 1 The SOLID Design Principles
3(22)
Single Responsibility Principle
3(3)
Open-Closed Principle
6(7)
Liskov Substitution Principle
13(2)
Interface Segregation Principle
15(6)
Parameter Object
20(1)
Dependency Inversion Principle
21(4)
Chapter 2 The Functional Perspective
25(10)
Function Basics
25(2)
Functional Literals in C#
27(1)
Storing Functions in C#
28(2)
Functional Literals in F#
30(2)
Composition
32(1)
Functional-Related Language Features
33(2)
Part II Creational Patterns
35(96)
Chapter 3 Builder
37(36)
Scenario
37(3)
Simple Builder
40(1)
Fluent Builder
41(1)
Static Initialization
41(1)
Communicating Intent
42(2)
Nested Builder and Immutability
44(1)
Composite Builder
45(4)
Builder Marker Interfaces
49(2)
Stepwise Builder (Wizard)
51(5)
Builder Parameter
56(2)
Builder Extension with Recursive Generics
58(4)
Lazy Functional Builder
62(3)
Builder-Decorator
65(3)
Scoping Builder Method
68(1)
DSL Construction in F#
69(1)
Summary
70(3)
Chapter 4 Factories
73(20)
Scenario
73(2)
Factory Method
75(1)
Asynchronous Factory Method
76(1)
Factory
77(1)
Inner Factory
78(1)
Physical Separation
79(1)
Abstract Factory
79(4)
Delegate Factories in IoC
83(2)
Object Tracking and Bulk Replacements
85(5)
Object Tracking
85(2)
Bulk Modifications
87(3)
Functional Factory
90(1)
Summary
91(2)
Chapter 5 Prototype
93(20)
Deep vs. Shallow Copying
93(1)
ICIoneable Is Bad
94(2)
Deep Copying via Copy Construction
96(1)
Note on Record Classes
97(1)
Deep Copying with a Special Interface
97(5)
Deep Copying and Inheritance
98(4)
Deep Copying Guidelines
102(4)
Trivially Copyable Types
103(1)
Arrays
103(1)
Common Collection Types
104(1)
MemberwiseClone Is Not Terrible
105(1)
Summary
106(1)
Serialization
107(2)
Prototype Factory
109(1)
Source Generators
110(1)
Summary
111(2)
Chapter 6 Singleton
113(18)
Singleton by Convention
113(1)
Classic Implementation
114(3)
Lazy Loading and Thread Safety
115(1)
Reusable Base Class
116(1)
The Trouble with Singleton
117(4)
Per-Thread Singleton
121(1)
Ambient Context
122(5)
Uses in the NET Framework
126(1)
Singletons and Inversion of Control
127(1)
Monostate
128(1)
Multiton
129(1)
Summary
130(1)
Part III Structural Patterns
131(128)
Chapter 7 Adapter
133(26)
Scenario
133(2)
Adapter
135(1)
Adapter Temporaries
136(4)
The Problem with Hashing
140(2)
Property Adapter (Surrogate)
142(2)
Generic Value Adapter
144(8)
Adapter in Dependency Injection
152(3)
Bidirectional Adapter
155(1)
Adapters in the NET Framework
156(1)
Summary
157(2)
Chapter 8 Bridge
159(8)
Conventional Bridge
159(4)
Dynamic Prototyping Bridge
163(3)
Summary
166(1)
Chapter 9 Composite
167(12)
Grouping Graphic Objects
167(3)
Neural Networks
170(3)
Shrink Wrapping the Composite
173(2)
Composite Specification
175(3)
Summary
178(1)
Chapter 10 Decorator
179(26)
The Basics of Delegation
180(2)
Points and Lines
182(3)
Adapter-Decorator
185(1)
Simulating Multiple Inheritance
185(1)
Multiple Inheritance with Interfaces
186(3)
Multiple Inheritance with Default Interface Members
189(2)
Dynamic Decorator Composition
191(3)
Decorator Cycle Policies
194(6)
Static Decorator Composition
200(1)
Functional Decorator
201(1)
Summary
202(3)
Chapter 11 Facade
205(14)
Magic Squares
206(5)
Building a Trading Terminal
211(1)
An Advanced Terminal
212(2)
Where's the Fagade?
214(2)
IoC Modules
216(2)
Summary
218(1)
Chapter 12 Flyweight
219(8)
User Names
219(3)
Text Formatting
222(3)
Using Flyweights for Interop
225(1)
Summary
226(1)
Chapter 13 Proxy
227(24)
Protection Proxy
227(2)
Property Proxy
229(3)
Composite Proxy: SoA/AoS
232(3)
Composite Proxy with Array-Backed Properties
235(2)
Virtual Proxy
237(3)
Communication Proxy
240(2)
Dynamic Proxy for Logging
242(3)
Composite Proxy
245(3)
Summary
248(3)
Chapter 14 Value Object
251(8)
Two-Dimensional Point
252(1)
Percentage Value
253(2)
Units of Measure
255(2)
Summary
257(2)
Part IV Behavioral Patterns
259(198)
Chapter 15 Chain of Responsibility
261(12)
Scenario
261(1)
Method Chain
262(3)
Broker Chain
265(5)
Functional Chain of Responsibility
270(1)
Summary
271(2)
Chapter 16 Command
273(14)
Scenario
273(1)
Implementing the Command Pattern
274(2)
Undo Operations
276(3)
Composite Commands (aka Macros)
279(4)
Functional Command
283(2)
Queries and Command-Query Separation
285(1)
Summary
285(2)
Chapter 17 Interpreter
287(18)
Integer Parsing
288(1)
Numeric Expression Evaluator
289(7)
Lexing
290(2)
Parsing
292(4)
Using Lexer and Parser
296(1)
Interpretation in the Functional Paradigm
296(4)
Transpiler
300(2)
Summary
302(3)
Chapter 18 Iterator
305(16)
Array-Backed Properties
306(3)
Let's Make an Iterator
309(3)
Improved Iteration
312(2)
Iterator Specifics
314(1)
Iterator Adapter
315(2)
Composite Iteration
317(2)
Summary
319(2)
Chapter 19 Mediator
321(14)
Chat Room
321(5)
Mediator with Events
326(4)
Introduction to MediatR
330(2)
Service Bus as Mediator
332(1)
Summary
333(2)
Chapter 20 Memento
335(8)
Bank Account
335(2)
Undo and Redo
337(3)
Memento and Command
340(1)
Summary
341(2)
Chapter 21 Null Object
343(10)
Scenario
343(2)
Intrusive Approaches
345(2)
Nullable Virtual Proxy
346(1)
Null Object
347(1)
Null Object Singleton
348(1)
Dynamic Null Object
349(2)
Drawbacks
350(1)
Summary
351(2)
Chapter 22 Observer
353(30)
Events
353(2)
Weak Event Pattern
355(2)
Event Streams
357(4)
Property Observers
361(16)
Basic Change Notification
361(2)
Bidirectional Bindings
363(3)
Property Dependencies
366(6)
Views
372(2)
Case Study: Quadratic Equation Solver
374(2)
Circular Recalculation Limitations
376(1)
Observable Collections
377(1)
Observable LINQ
378(1)
Declarative Subscriptions in Autofac
378(4)
Summary
382(1)
Chapter 23 State
383(18)
State-Driven State Transitions
384(3)
Enum-Based State Machine
387(3)
Switch-Based State Machine
390(2)
Encoding Transitions with Switch Expressions
392(2)
State Machines with Stateless
394(4)
Types, Actions, and Ignoring Transitions
395(1)
Reentrancy Again
396(1)
Hierarchical States
397(1)
More Features
397(1)
Concurrent State Machines
398(1)
Implicit State Machines
399(1)
Summary
399(2)
Chapter 24 Strategy
401(10)
Dynamic Strategy
401(3)
Static Strategy
404(2)
Equality and Comparison Strategies
406(2)
Functional Strategy
408(1)
Declarative Strategies
409(1)
Summary
410(1)
Chapter 25 Template Method
411(6)
Game Simulation
411(2)
Template Method Mixin
413(2)
Functional Template Method
415(1)
Summary
416(1)
Chapter 26 Visitor
417(40)
Intrusive Visitor
418(1)
Reflective Visitor
419(9)
Extension Methods?
422(2)
Functional Reflective Visitor (C#)
424(2)
Functional Reflective Visitor (F#)
426(1)
Improvements
427(1)
What Is Dispatch?
428(2)
Dynamic Visitor
430(2)
Classic Visitor
432(7)
Abstract Classes and Virtual Methods
435(2)
Reducing Boilerplate
437(1)
Implementing an Additional Visitor
437(2)
Type Checks Are Unavoidable
439(2)
Acyclic Visitor
441(2)
Visitable Null Object
443(4)
Visitor Adapter
447(3)
Reductions and Transforms
450(4)
Functional Visitor in F#
454(1)
Summary
455(2)
Index 457
Dmitri Nesteruk is a quantitative analyst, developer, course instructor, book author, and occasional conference speaker. His interests lie in software development and integration practices in the areas of computation, quantitative finance, and algorithmic trading. His technological interests include C# and C++ programming as well as high-performance computing using technologies such as CUDA and FPGAs.