.NET design patterns explore the world of .NET design patterns and bring the benefits that the right patterns can offer to your toolkit today
Explore the world of .NET design patterns and bring the benefits that the right patterns can offer to your toolkit today About This Book This book is based on the latest version of .NET, .NET Core 1.0. The code is explained piece by piece and the application of the pattern is also showcased. This fa...
Other Authors: | , |
---|---|
Format: | eBook |
Language: | Inglés |
Published: |
Birmingham :
Packt
2017.
|
Edition: | 1st edition |
Subjects: | |
See on Biblioteca Universitat Ramon Llull: | https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009630088206719 |
Table of Contents:
- Cover
- Copyright
- Credits
- Foreword
- About the Authors
- About the Reviewers
- www.PacktPub.com
- Customer Feedback
- Table of Contents
- Preface
- Chapter 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
- Chapter 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
- Chapter 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
- Chapter 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
- Chapter 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
- Chapter 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
- Chapter 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
- Chapter 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
- Chapter 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
- Chapter 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
- Chapter 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
- Chapter 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
- Chapter 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
- Chapter 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
- Index.