Skip to main content

20 docs tagged with "php"

View all tags

A Practical Introduction to Laravel × DDD × Clean Architecture

No Laravel experience required. A 20-chapter guide for SPA developers (Vue/React) that explains Laravel as an API backend together with domain-driven design (DDD) and clean architecture, step by step. It covers the theory of value objects, entities, aggregates, and repositories, through to implementation patterns, transactions, testing, and authentication in a Laravel project.

Entities — Domain Objects with an Identifier and a Lifecycle

Explains the DDD entity (Entity) with implementation examples of Order / OrderLine. It covers identity judgment by identifier, the difference from value objects, entity ≠ table, the two factory methods create() / reconstruct(), and state transitions and the encapsulation of business rules using enums.

PHPクラス設計入門

PHP でクラス設計そのものを入門から実践まで学ぶ全14章のガイド。フレームワーク非依存の設計原則 (カプセル化・単一責任・継承とコンポジション・インターフェース・SOLID) から、Laravel でのモデル/サービスクラス設計まで一気通貫で扱います。

PHPのクラス基本文法

PHPにおけるクラスの基本文法。プロパティ・メソッド・コンストラクタ・可視性修飾子・readonly・コンストラクタプロモーション・enumを解説します。

凝集度・結合度とSOLID原則の総整理

第1部の集大成として、開放閉鎖・リスコフ置換・インターフェース分離の原則を補い、凝集度と結合度という物差しでこれまでの原則を振り返ります。

単一責任の原則

単一責任の原則とクラスを小さく保つ考え方。god classの兆候と、責務分割の実例を解説します。