万本电子书0元读

万本电子书0元读

顶部广告

.NET Design Patterns电子书

售       价:¥

8人正在读 | 0人评论 9.8

作       者:Praseed Pai

出  版  社:Packt Publishing

出版时间:2017-01-01

字       数:142.1万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
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 fast-paced guide shows you how to implement the patterns into your existing applications Who This Book Is For This book is for those with familiarity with .NET development who would like to take their skills to the next level and be in the driver's seat when it comes to modern development techniques. Basic object-oriented C# programming experience and an elementary familiarity with the .NET framework library is required. 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. In Detail 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! Style and approach This tutorial-based book takes a step-by-step approach. It covers the major patterns and explains them in a detailed manned along with code examples.
目录展开

.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

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部