.NET Design Patterns

Explore the world of .NET design patterns and bring the benefits that the right patterns can offer to your toolkit today
Preview in Mapt

.NET Design Patterns

Praseed Pai, Shine Xavier

1 customer reviews
Explore the world of .NET design patterns and bring the benefits that the right patterns can offer to your toolkit today

Quick links: > What will you learn?> Table of content> Product reviews

Mapt Subscription
FREE
$29.99/m after trial
eBook
$22.40
RRP $31.99
Save 29%
Print + eBook
$39.99
RRP $39.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$22.40
$39.99
$29.99 p/m after trial
RRP $31.99
RRP $39.99
Subscription
eBook
Print + eBook
Start 14 Day Trial

Frequently bought together


.NET Design Patterns Book Cover
.NET Design Patterns
$ 31.99
$ 22.40
Enterprise Application Architecture with .NET Core Book Cover
Enterprise Application Architecture with .NET Core
$ 39.99
$ 28.00
Buy 2 for $35.00
Save $36.98
Add to Cart

Book Details

ISBN 139781786466150
Paperback314 pages

Book Description

Knowing about design patterns enables developers to improve their code base, promoting code reuse and making their design more robust.

This book focuses on the practical aspects of programming in .NET. You will learn about some of the relevant design patterns (and their application) that are most widely used. We start with classic object-oriented programming (OOP) techniques, evaluate parallel programming and concurrency models, enhance implementations by mixing OOP and functional programming, and finally to the reactive programming model where functional programming and OOP are used in synergy to write better code.

Throughout this book, we'll show you how to deal with architecture/design techniques, GoF patterns, relevant patterns from other catalogs, functional programming, and reactive programming techniques.

After reading this book, you will be able to convincingly leverage these design patterns (factory pattern, builder pattern, prototype pattern, adapter pattern, facade pattern, decorator pattern, observer pattern and so on) for your programs. You will also be able to write fluid functional code in .NET that would leverage concurrency and parallelism!

Table of Contents

Chapter 1: An Introduction to Patterns and Pattern Catalogs
OOP - A short history
Patterns and pattern movement
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
Finalizing the solution
Summary
Chapter 3: A Logging Library
Requirements for the library
Solutions approach
Writing content to a media
The factory method pattern for instantiation
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
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
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
Speculative execution
Summary
Chapter 9: Functional Programming Techniques for Better State Management
Being functional
Referential transparency
First-class and higher-order functions
Lambda (λ) calculus
Recursion
Sample programs
How does LINQ work?
Summary
Chapter 10: Pattern Implementation Using Object/Functional Programming
A strategy pattern implementation using FP/OOP
A fresh look at the iterator pattern using FP/OOP
MapReduce programming idiom
A new spin on the template method pattern using FP/OOP
Summary
Chapter 11: What is Reactive Programming?
Being reactive
Electronic spread sheets - A quintessential example
Reactive programming model
Functional reactive programming
Rx from Microsoft
Converting entities to streams (IObservable<T>)
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
RxJS samples
Summary
Chapter 14: A Road Ahead
Polyglot programming and design
Domain-specific languages
Ontology
AntiPatterns
Summary

What You Will Learn

  • Put patterns and pattern catalogs into the right perspective
  • Apply patterns for software development under C#/.NET
  • Use GoF and other patterns in real-life development scenarios
  • Be able to enrich your design vocabulary and well articulate your design thoughts
  • Leverage object/functional programming by mixing OOP and FP
  • Understand the reactive programming model using Rx and RxJs
  • Writing compositional code using C# LINQ constructs
  • Be able to implement concurrent/parallel programming techniques using idioms under .NET
  • Avoiding pitfalls when creating compositional, readable, and maintainable code using imperative, functional, and reactive code.

Authors

Table of Contents

Chapter 1: An Introduction to Patterns and Pattern Catalogs
OOP - A short history
Patterns and pattern movement
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
Finalizing the solution
Summary
Chapter 3: A Logging Library
Requirements for the library
Solutions approach
Writing content to a media
The factory method pattern for instantiation
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
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
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
Speculative execution
Summary
Chapter 9: Functional Programming Techniques for Better State Management
Being functional
Referential transparency
First-class and higher-order functions
Lambda (λ) calculus
Recursion
Sample programs
How does LINQ work?
Summary
Chapter 10: Pattern Implementation Using Object/Functional Programming
A strategy pattern implementation using FP/OOP
A fresh look at the iterator pattern using FP/OOP
MapReduce programming idiom
A new spin on the template method pattern using FP/OOP
Summary
Chapter 11: What is Reactive Programming?
Being reactive
Electronic spread sheets - A quintessential example
Reactive programming model
Functional reactive programming
Rx from Microsoft
Converting entities to streams (IObservable<T>)
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
RxJS samples
Summary
Chapter 14: A Road Ahead
Polyglot programming and design
Domain-specific languages
Ontology
AntiPatterns
Summary

Book Details

ISBN 139781786466150
Paperback314 pages
Read More
From 1 reviews

Read More Reviews

Recommended for You

Enterprise Application Architecture with .NET Core Book Cover
Enterprise Application Architecture with .NET Core
$ 39.99
$ 28.00
C# 7 and .NET Core Cookbook Book Cover
C# 7 and .NET Core Cookbook
$ 39.99
$ 28.00
C# 7 and .NET Core: Modern Cross-Platform Development - Second Edition Book Cover
C# 7 and .NET Core: Modern Cross-Platform Development - Second Edition
$ 39.99
$ 28.00
C# Programming Cookbook Book Cover
C# Programming Cookbook
$ 39.99
$ 28.00
ASP.NET Core: Cloud-ready, Enterprise Web Application Development Book Cover
ASP.NET Core: Cloud-ready, Enterprise Web Application Development
$ 79.99
$ 56.00
Java 7 Concurrency Cookbook Book Cover
Java 7 Concurrency Cookbook
$ 29.99
$ 21.00