کتاب کدنویسی تمیز با C# – نسخه دوم اثر Jason Alls

عنوان:

Clean Code with C# - Second Edition

نویسنده:

Jason Alls

انتشارات:

Packt Publishing

تاریخ انتشار:

2023

حجم:

7.8MB

دانلود

معرفی کتاب:" کدنویسی تمیز با #C – نسخه دوم "

مهارت‌های برنامه‌نویسی خود را با بررسی کد، پیاده‌سازی TDD و BDD، و طراحی API ارتقا دهید تا با مشکلاتی مانند ناکارآمدی، تکرار و سایر چالش‌های ناشی از کد ضعیف مقابله کنید.

نکات کلیدی

  • نوشتن کدی که به‌طور یکپارچه با سایر سیستم‌ها ادغام شود
  • درک اصول و استانداردهای کدنویسی برای ارتقاء کیفیت
  • یادگیری نحوه اجتناب از خطاهای رایج در هم‌زمانی و Threading
  • نسخه چاپی یا کیندل شامل PDF رایگان نیز هست

توضیحات کتاب

C# که در گذشته بیشتر با توسعه دسکتاپ و بازی‌ها شناخته می‌شد، اکنون در وب، کلاد و موبایل نیز پررنگ است. با وجود قدرت این زبان، بسیاری از توسعه‌دهندگان با مشکلاتی چون پیچیدگی، ضعف نگهداری و عملکرد روبرو هستند.

کتاب #Clean Code in C با تأکید بر اصول کدنویسی تمیز، تست‌نویسی، ساختاردهی حرفه‌ای، طراحی API و ابزارهای Refactor به شما کمک می‌کند تا نرم‌افزارهایی مقیاس‌پذیر، قابل توسعه و خوانا تولید کنید.

آنچه خواهید آموخت

  • نوشتن کد قابل تغییر، منعطف و تمیز
  • پیاده‌سازی TDD با مثال اپلیکیشن کنسولی
  • ساخت استثناهای سفارشی با پیام‌های معنادار
  • شناسایی و بازسازی کدهای بی‌کیفیت
  • Refactor و بهینه‌سازی با ابزارهای تجزیه و تحلیل کد
  • استفاده از برنامه‌نویسی تابعی برای کاهش خطا
  • ساخت برنامه‌های چندسکویی با MAUI
  • توسعه میکروسرویس‌های کلاد-فرندلی با C#

مخاطبان این کتاب

این کتاب برای توسعه‌دهندگان حرفه‌ای C#، مهندسان نرم‌افزار ارشد، معماران نرم‌افزار و رهبران تیم‌هایی طراحی شده که خواهان بهبود کیفیت، مقیاس‌پذیری و ساختار کد در پروژه‌های واقعی هستند. دانش قبلی C# برای استفاده مفید از این کتاب الزامی است.

فهرست مطالب

  • Cover
  • Title page
  • Copyright and credits
  • Contributors
  • Table of Contents
  • Preface
  • Chapter 1: 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
  • Chapter 2: Code Review – Process and Importance
  • A brief introduction to GitHub
  • 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
  • Summary
  • Questions
  • Further reading
  • Chapter 3: Classes, Objects, and Data Structures
  • Technical requirements
  • Organizing classes
  • A class should have only one responsibility
  • Class organization
  • Commenting for documentation generation
  • Cohesion and coupling
  • Designing 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
  • The SOLID software methodology
  • Summary
  • Questions
  • Further reading
  • Chapter 4: Writing Clean Functions
  • Technical requirements
  • Understanding the difference between OOP and FP
  • Unclean methods and how they affect software
  • FP and clean methods
  • FP examples
  • Keeping methods small
  • Indenting code
  • Breaking out of loops
  • Avoiding duplication
  • Avoiding multiple parameters
  • Implementing the SRP
  • Handling exceptions in FP
  • Adding comments for readability
  • Variable declaration and memory management
  • Applying security in methods, especially in APIs
  • Summary
  • Questions
  • Further reading
  • Chapter 5: Exception Handling
  • Technical requirements
  • Overview of exception handling in C#
  • Clean code exception-handling principles
  • Best practices for handling exceptions
  • Handling the TPL AggregateException exception
  • Creating custom exceptions and when to use them
  • Avoiding common mistakes in exception handling
  • Testing exception handling
  • An employee management example of mocking and unit testing with correct exception handling
  • Summary
  • Questions
  • Further reading
  • Chapter 6: Unit Testing
  • Technical requirements
  • Understanding unit testing
  • Writing testable code
  • TDD
  • Choosing a testing framework
  • Writing effective unit tests
  • Integrating tests into the CI/CD pipeline
  • Problem tests
  • Summary
  • Questions
  • Further reading
  • Chapter 7: Designing and Developing APIs
  • Technical requirements
  • What is an API?
  • API development in C#
  • Web API security with OWASP
  • Summary
  • Questions
  • Further reading
  • Chapter 8: Addressing Cross-Cutting Concerns
  • A definition of cross-cutting concerns
  • Importance and impact on software development
  • Common examples of cross-cutting concerns
  • Summary
  • Questions
  • Further reading
  • Chapter 9: AOP with PostSharp
  • Technical requirements
  • AOP
  • How AOP works with PostSharp
  • Project – Cross-cutting concerns reusable library
  • PostSharp and build pipeline considerations
  • Dynamic AOP with Castle.DynamicProxy
  • Summary
  • Questions
  • Further reading
  • Chapter 10: Using Tools to Improve Code Quality
  • Technical requirements
  • Code analysis
  • Using quick actions
  • Using the JetBrains dotTrace profiler
  • Using JetBrains ReSharper
  • Using Telerik JustDecompile
  • CI with GitHub Actions and CodeQL
  • Summary
  • Questions
  • Further reading
  • Chapter 11: Refactoring C# Code
  • Technical requirements
  • Application-level code smells
  • Class-level code smells
  • Method-level smells
  • Summary
  • Questions
  • Further reading
  • Chapter 12: Functional Programming
  • Technical requirements
  • Imperative vs functional programming
  • Overview of functional programming in C#
  • First-class functions and Lambda expressions
  • Higher-order functions
  • Immutability and pure functions
  • Functional composition
  • Option types and the Maybe monad
  • Functional error handling
  • Functional data transformation and pipelines
  • Lazy evaluation
  • Pattern matching
  • Currying and partial application
  • Concurrency with FP
  • Recursion
  • Summary
  • Questions
  • Further reading
  • Chapter 13: Cross-Platform Application Development with MAUI
  • Technical requirements
  • Project overview
  • Creating the project
  • Summary
  • Questions
  • Further reading
  • Chapter 14: Microservices
  • What are microservices?
  • Design process for microservices
  • ALM of microservices
  • Microservice architecture patterns
  • Service registration and discovery
  • Containerization and orchestration
  • Serverless
  • API gateways
  • Event-driven communication
  • Service resilience and fault tolerance
  • Monitoring and observability
  • Security
  • CI/CD
  • Microservice testing
  • Scaling microservices
  • Versioning and compatibility
  • Best practices and anti-patterns
  • Case studies
  • Summary
  • Questions
  • Further reading
  • Assessments
  • Index
  • Other Books You May Enjoy

مشخصات

نام کتاب

Clean Code with C# - Second Edition

نویسنده

Jason Alls

انتشارات

Packt Publishing

تاریخ انتشار

2023

ISBN

9781837635191

تعداد صفحات

492

زبان

انگلیسی

فرمت

pdf

حجم

7.8MB

موضوع

clean architecture