applying-solid-principles
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSOLID原則とクリーンコード - ファイル内容
SOLID Principles and Clean Code - Document Content
このドキュメントは、すべてのコード実装で必須となるSOLID原則とクリーンコード実践ガイドです。
This document is a guide to SOLID principles and clean code practices essential for all code implementations.
主要な構成要素
Key Components
このスキルは4つの詳細ドキュメントで構成されています:
-
SOLID原則の詳細 - 5つの設計原則(単一責任、開放閉鎖、リスコフの置換、インターフェース分離、依存関係逆転)の解説と比較例
-
クリーンコードの基礎 - 日常的な実装における命名規則、関数設計、ネスト削減、マジックナンバー排除の基本
-
品質チェックリスト - 設計原則の遵守確認、コードスメル検出、リファクタリング判断基準
-
クイックリファレンス - 迅速な参照用に1行要約、一般的な誤りと修正方法、コードレビューポイント
This skill consists of 4 detailed documents:
-
Detailed SOLID Principles - Explanations and comparative examples of the 5 design principles (Single Responsibility, Open/Closed, Liskov Substitution, Interface Segregation, Dependency Inversion)
-
Basics of Clean Code - Fundamentals of naming conventions, function design, reducing nesting, and eliminating magic numbers in daily implementations
-
Quality Checklist - Verification of compliance with design principles, code smell detection, and refactoring decision criteria
-
Quick Reference - One-line summaries for quick reference, common errors and fixes, and code review points
5つのSOLID原則
The 5 SOLID Principles
ドキュメントでは、「変更する理由は1つだけ」という単一責任から始まり、拡張性と保守性を支えるパターンについて体系的に説明しています。
The document systematically explains patterns that support extensibility and maintainability, starting with the Single Responsibility Principle ("There should be only one reason to change").
関連する補足原則
Related Supplementary Principles
記載されているDRY、YAGNI、KISSといった追加原則も、設計の実効性を高めるための枠組みを提供しています。
Additional principles such as DRY, YAGNI, and KISS are also included, providing frameworks to enhance design effectiveness.