.NET Design Patterns /

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...

Full description

Saved in:
Bibliographic Details
Main Authors: Pai, Praseed (Author), Xavier, Shine (Author)
Format: Electronic eBook
Language:English
Published: Birmingham, UK : Packt Publishing, 2016.
Subjects:
Online Access:CONNECT
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 developmentWhy 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 approachWriting 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 DatabasesRequirements 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 compositionVisitor 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.