Nesteruk | Design Patterns in .NET | E-Book | www.sack.de
E-Book

E-Book, Englisch, 359 Seiten

Nesteruk Design Patterns in .NET

Reusable Approaches in C# and F# for Object-Oriented Software Design
1. ed
ISBN: 978-1-4842-4366-4
Verlag: Apress
Format: PDF
Kopierschutz: 1 - PDF Watermark

Reusable Approaches in C# and F# for Object-Oriented Software Design

E-Book, Englisch, 359 Seiten

ISBN: 978-1-4842-4366-4
Verlag: Apress
Format: PDF
Kopierschutz: 1 - PDF Watermark



Implement design patterns in .NET 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.
Using the C# programming language, Design Patterns in .NET explores the classic design pattern implementation and discusses the applicability and relevance of specific language features for the purpose of implementing patterns. You will learn by example, reviewing scenarios where patterns are applicable. MVP and patterns expert Dmitri Nesteruk demonstrates possible implementations of patterns, discusses alternatives and pattern inter-relationships, and illustrates the way that a dedicated refactoring tool (ReSharper) can be used to implement design patterns with ease.
What You'll Learn
  • Know the latest pattern implementations available in C# and F#
  • Refer to researched and proven variations of patterns
  • Study complete, self-contained examples including many that cover advanced scenarios
  • Use the latest implementations of C# and Visual Studio/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 solving modern problems


Nesteruk Design Patterns in .NET jetzt bestellen!

Autoren/Hrsg.


Weitere Infos & Material


1;Table of Contents;4
2;About the Author;12
3;Introduction;13
4;Part I: Introduction;16
4.1;Chapter 1: The SOLID Design Principles;17
4.1.1;Single Responsibility Principle;17
4.1.2;Open-Closed Principle;20
4.1.3;Liskov Substitution Principle;28
4.1.4;Interface Segregation Principle;31
4.1.5;Dependency Inversion Principle;36
4.2;Chapter 2: The Functional Perspective;40
4.2.1;Function Basics;40
4.2.2;Functional Literals in C#;43
4.2.3;Storing Functions in C#;43
4.2.4;Functional Literals in F#;46
4.2.5;Composition;48
4.2.6;Functional-Related Language Features;49
5;Part II: Creational Patterns;51
5.1;Chapter 3: Builder;53
5.1.1;Scenario;53
5.1.2;Simple Builder;56
5.1.3;Fluent Builder;57
5.1.4;Communicating Intent;58
5.1.5;Composite Builder;60
5.1.6;Builder Parameter;64
5.1.7;Fluent Interface Inheritance;67
5.1.8;DSL Construction in F#;71
5.1.9;Summary;73
5.2;Chapter 4: Factories;74
5.2.1;Scenario;74
5.2.2;Factory Method;76
5.2.3;Factory;78
5.2.4;Inner Factory;78
5.2.4.1;Logical Separation;80
5.2.5;Abstract Factory;80
5.2.6;Functional Factory;83
5.2.7;Summary;85
5.3;Chapter 5: Prototype;87
5.3.1;Deep vs. Shallow Copying;87
5.3.2;ICloneable Is Bad;88
5.3.3;Deep Copying with a Special Interface;90
5.3.4;Deep Copying Objects;91
5.3.5;Duplication via Copy Construction;93
5.3.6;Serialization;94
5.3.7;Prototype Factory;96
5.3.8;Summary;98
5.4;Chapter 6: Singleton;100
5.4.1;Singleton by Convention;101
5.4.2;Classic Implementation;102
5.4.2.1;Lazy Loading;103
5.4.3;The Trouble with Singleton;104
5.4.4;Singletons and Inversion of Control;109
5.4.5;Monostate;110
5.4.6;Summary;111
6;Part III: Structural Patterns;112
6.1;Chapter 7: Adapter;114
6.1.1;Scenario;114
6.1.2;Adapter;116
6.1.3;Adapter Temporaries;118
6.1.4;The Problem with Hashing;122
6.1.5;Property Adapter (Surrogate);125
6.1.6;Adapters in the .NET Framework;127
6.1.7;Summary;128
6.2;Chapter 8: Bridge;130
6.2.1;Conventional Bridge;130
6.2.2;Dynamic Prototyping Bridge;134
6.2.3;Summary;138
6.3;Chapter 9: Composite;139
6.3.1;Grouping Graphic Objects;139
6.3.2;Neural Networks;142
6.3.3;Shrink Wrapping the Composite;146
6.3.4;Summary;148
6.4;Chapter 10: Decorator;149
6.4.1;Custom String Builder;149
6.4.2;Adapter-Decorator;152
6.4.3;Multiple Inheritance;153
6.4.4;Dynamic Decorator Composition;157
6.4.5;Static Decorator;161
6.4.6;Functional Decorator;163
6.4.7;Summary;164
6.5;Chapter 11: Façade;166
6.5.1;Building a Trading Terminal;168
6.5.2;An Advanced Terminal;169
6.5.3;Where’s the Façade?;172
6.5.4;Summary;174
6.6;Chapter 12: Flyweight;175
6.6.1;Usernames;175
6.6.2;Text Formatting;178
6.6.3;Summary;182
6.7;Chapter 13: Proxy;183
6.7.1;Protection Proxy;183
6.7.2;Property Proxy;186
6.7.3;Virtual Proxy;189
6.7.4;Communication Proxy;192
6.7.5;Summary;195
7;Part IV: Behavioral Patterns;196
7.1;Chapter 14: Chain of Responsibility;197
7.1.1;Scenario;197
7.1.2;Method Chain;198
7.1.3;Broker Chain;202
7.1.4;Summary;207
7.2;Chapter 15: Command;208
7.2.1;Scenario;208
7.2.2;Implementing the Command Pattern;209
7.2.3;Undo Operations;211
7.2.4;Composite Commands;215
7.2.5;Functional Command;219
7.2.6;Queries and Command Query Separation;221
7.2.7;Summary;222
7.3;Chapter 16: Interpreter;223
7.3.1;Numeric Expression Evaluator;224
7.3.1.1;Lexing;225
7.3.1.2;Parsing;228
7.3.1.3;Using Lexer and Parser;232
7.3.2;Interpretation in the Functional Paradigm;232
7.3.3;Summary;237
7.4;Chapter 17: Iterator;239
7.4.1;Array-Backed Properties;240
7.4.2;Let’s Make an Iterator;243
7.4.3;Improved Iteration;247
7.4.4;Summary;249
7.5;Chapter 18: Mediator;250
7.5.1;Chat Room;250
7.5.2;Mediator with Events;255
7.5.3;Summary;260
7.6;Chapter 19: Memento;261
7.6.1;Bank Account;261
7.6.2;Undo and Redo;263
7.6.3;Summary;267
7.7;Chapter 20: Null Object;268
7.7.1;Scenario;268
7.7.2;Intrusive Approach;270
7.7.3;Null Object;270
7.7.4;Design Improvements;271
7.7.5;Null Object Virtual Proxy;272
7.7.6;Dynamic Null Object;273
7.7.7;Summary;275
7.8;Chapter 21: Observer;277
7.8.1;Weak Event Pattern;279
7.8.2;Property Observers;282
7.8.3;Dependency Problems;284
7.8.4;Event Streams;290
7.8.5;Observable Collections;295
7.8.6;Declarative Subscriptions;296
7.8.7;Summary;298
7.9;Chapter 22: State;299
7.9.1;State-Driven State Transitions;300
7.9.2;Handmade State Machine;303
7.9.3;State Machines with Stateless;307
7.9.3.1;Types, Actions, and Ignoring Transitions;307
7.9.3.2;Reentrancy Again;309
7.9.3.3;Hierarchical States;310
7.9.3.4;More Features;310
7.9.4;Summary;312
7.10;Chapter 23: Strategy;313
7.10.1;Dynamic Strategy;314
7.10.2;Static Strategy;317
7.10.3;Functional Strategy;319
7.10.4;Summary;320
7.11;Chapter 24: Template Method;321
7.11.1;Game Simulation;321
7.11.2;Functional Template Method;324
7.11.3;Summary;326
7.12;Chapter 25: Visitor;327
7.12.1;Intrusive Visitor;328
7.12.2;Reflective Printer;330
7.12.2.1;Functional Reflective Visitor;332
7.12.3;Improvements;333
7.12.4;What Is Dispatch?;334
7.12.5;Dynamic Visitor;336
7.12.6;Classic Visitor;338
7.12.6.1;Implementing an Additional Visitor;341
7.12.7;Acyclic Visitor;343
7.12.8;Functional Visitor;346
7.12.9;Summary;347
8;Index;348



Ihre Fragen, Wünsche oder Anmerkungen
Vorname*
Nachname*
Ihre E-Mail-Adresse*
Kundennr.
Ihre Nachricht*
Lediglich mit * gekennzeichnete Felder sind Pflichtfelder.
Wenn Sie die im Kontaktformular eingegebenen Daten durch Klick auf den nachfolgenden Button übersenden, erklären Sie sich damit einverstanden, dass wir Ihr Angaben für die Beantwortung Ihrer Anfrage verwenden. Selbstverständlich werden Ihre Daten vertraulich behandelt und nicht an Dritte weitergegeben. Sie können der Verwendung Ihrer Daten jederzeit widersprechen. Das Datenhandling bei Sack Fachmedien erklären wir Ihnen in unserer Datenschutzerklärung.