更新时间:2021-06-18 18:28:37
封面
版权信息
献辞
About Packt
Why subscribe?
Contributors
Preface
Coding Standards and Principles in C#
Technical requirements
Good code versus bad code
The need for coding standards principles and methodologies
Summary
Questions
Further reading
Code Review – Process and Importance
The code review process
Preparing code for review
Leading a code review
Knowing what to review
Knowing when to send code for review
Providing and responding to review feedback
Classes Objects and Data Structures
Organizing classes
A class should have only one responsibility
Commenting for documentation generation
Cohesion and coupling
Design for change
The Law of Demeter
Immutable objects and data structures
Objects should hide data and expose methods
Data structures should expose data and have no methods
Writing Clean Functions
Understanding functional programming
Keeping methods small
Avoiding duplication
Avoiding multiple parameters
Exception Handling
Checked and unchecked exceptions
Avoiding NullPointerExceptions
Business rule exceptions
Exceptions should provide meaningful information
Building your own custom exceptions
Unit Testing
Technical Requirements
Understanding the reasons for a good test
Understanding the testing tools
TDD methodology practice – fail pass and refactor
Removing redundant tests comments and dead code
End-to-End System Testing
E2E testing
Factories
Dependency injection
Modularization
Threading and Concurrency
Understanding the thread life cycle
Adding thread parameters
Using a thread pool
Using a mutex with synchronous threads
Working with parallel threads using semaphores
Limiting the number of processors and threads in the thread pool
Preventing deadlocks
Preventing race conditions
Understanding static constructors and methods
Mutability immutability and thread safety
Synchronized method dependencies
Using the Interlocked class
General recommendations
Designing and Developing APIs
What is an API?
API proxies
API design guidelines
API design using RAML
Securing APIs with API Keys and Azure Key Vault