Application Layer ใน Clean Architecture: UseCase ที่ดีควรมีแค่นี้
Application Layer คือชั้น Orchestration ใน Clean Architecture — อธิบาย UseCase, Mapper และ Command/Query pattern พร้อมตัวอย่าง C# ที่แยก I/O ออกจาก Logic อย่างชัดเจน
27 บทความ
Application Layer คือชั้น Orchestration ใน Clean Architecture — อธิบาย UseCase, Mapper และ Command/Query pattern พร้อมตัวอย่าง C# ที่แยก I/O ออกจาก Logic อย่างชัดเจน
Core Layer คือ Domain Layer ใน Clean Architecture — อธิบายวิธีจัด project structure ด้วย Feature-first, UseCase-based Repository และ CQRS พร้อมตัวอย่าง C# ที่ใช้งานได้จริง
DataResponse<T> คือ HTTP Response Contract กลางของระบบ — แก้ปัญหา response format ต่างกันและ HTTP client field ต่างกัน ด้วย two-step unwrap พร้อม code จริงที่ใช้ได้ทั้ง backend และ frontend
implement InventoryRemoteAxiosClient และ InventoryRemoteFetchClient ด้วย DataResponse<T> pass-through — เห็นความต่าง error handling, timeout, streaming และ swap ที่ Composition Root บรรทัดเดียว
ออกแบบ share-client ใน Modular Monolith ด้วย axios + ServiceClient Interface จาก share-core — group ตาม Provider BC, ไม่มี transform, swap HTTP↔Internal ได้ที่ Composition Root โดย UseCase ไม่รู้เลย
เข้าใจ Clean Architecture และ Hexagonal Architecture ตั้งแต่ที่มา รู้ความต่าง รู้ว่าเลือกใช้เมื่อไร และเข้าใจว่า Tactical Design Building Blocks วางในโครงสร้าง Layer จริงยังไง
รู้จัก Entity, Value Object, Aggregate, Repository, Domain Service และ Application Service — หลักการสำหรับออกแบบ Domain Model ภายใน Bounded Context โดยไม่ผูกติดกับ Technology
เข้าใจ Domain, Bounded Context, Ubiquitous Language และ Context Mapping ผ่านมุมมองของ Dev, EM และ BA — ก่อนลงมือสร้างระบบที่ scale ได้จริง
เจาะลึก Unit Test Strategy ของ Data Layer — วิธี mock PrismaClient ด้วย dbclient.mock.ts, ออกแบบ Fixture แบบ state-based, mock level ต่อ component และ configure Jest สำหรับ share-data
เรียนรู้พื้นฐาน AI Agent ตั้งแต่ศูนย์ — LLM คืออะไร, Chatbot(Generative AI) ต่างจาก AI Agent ยังไง และ Tool Calling ทำงานอย่างไร อ่านแล้วเข้าใจได้เลยโดยไม่ต้องมีครู
เรียนรู้ว่า AI Agent ทำงานอย่างไร ตั้งแต่ Agent Loop, ส่วนประกอบ, Memory System ไปจนถึง Tool Design และ Safety Model — อ่านจบแล้วสร้าง Agent เองได้เลย
คู่มือครบจบสำหรับทีมที่ใช้ GitHub Copilot — ติดตั้ง .NET SDK, จัดการ version, ตั้งค่า extensions ฟรี และพัฒนา Backend ได้ประสบการณ์เทียบเท่า Visual Studio
เรียนรู้วิธีตั้งค่า Source Map สำหรับ TypeScript และ Node.js Production ครอบคลุม linked, inline, inlineSources และการแก้ปัญหา pnpm workspace symlink
คู่มือภาษาไทยใช้งาน GitHub Copilot Chat ใน VS Code ครอบคลุม Ask, Plan, Agent Mode, Context Window และ Prompt Engineering สำหรับ AI Coding
ก่อนโทษว่า Copilot ยังไม่เก่ง ลองเช็ก 5 จุดสำคัญในการตั้งค่า Custom Instructions, Prompts, Skills, MCP, Agents รวมถึง monorepo structure และการ delegate งานให้ subagent
เรียนรู้ 6 Phases สร้าง AI-Spec ที่ทำให้ AI Coding Agent implement feature แทน Dev ได้จริง พร้อมบทบาทของทุก Role ใน Product Delivery Team ที่ชัดเจนในแต่ละขั้นตอน
เจาะลึก sealed record, IReadOnlyList vs IImmutableList, Structural Sharing และ Value Object ใน DDD พร้อม Code ที่ใช้งานจริงใน Production ครบในที่เดียว
Spec การ map โครงสร้าง SDLC แบบ Agile เข้ากับโครงสร้างไฟล์ที่ AI Agent เข้าใจได้ ครอบคลุม Epic, Feature, Story, Task, Subtask และโครงสร้างโฟลเดอร์ plan/
อธิบายหลักการและเหตุผลของแต่ละส่วนใน PLAN.md เพื่อให้ทั้ง Human และ AI Agent เข้าใจตรงกัน ครอบคลุม Goal, Scope, Out of Scope, Stories และ Tasks
คู่มือติดตั้งและใช้งาน Playwright MCP เพื่อให้ AI Agent ตรวจสอบหน้า browser ได้โดยตรง รวมถึง screenshot, คลิก, ตรวจ console errors และ redirect
คู่มือครอบคลุม Tree Shaking, Code Splitting, Multi Entry Point, Source Map และ Declaration Files สำหรับการ bundle library ด้วย TypeScript/JavaScript ให้มีประสิทธิภาพสูงสุด
Test Matrix, Mock Strategy และ Fixture vs Seed Data ใน Modular Monolith — mental model เรื่อง testing ที่ทุก layer ของ series นี้ใช้ร่วมกัน
ออกแบบ Abstraction Layer ใน Modular Monolith ด้วย contract.type.ts, Repository Interface และ Pick<> inline — ไม่มี type ซ้ำซ้อน ใช้ได้จริงใน TypeScript + Nx
Data Layer testing strategy using Action-Based Structure. Unit tests only with Jest, mock PrismaClient, 1 test file per action.
การออกแบบ Data Layer โดยใช้ Action เป็นหลัก align กับ Abstraction Layer โดยแยก command/query และ Entry ทำหน้าที่เป็น Data Access Provider
หลักการออกแบบ Modular Monolith บน Nx Monorepo ด้วย Hexagonal Architecture, Clean Architecture, CQRS และ DDD เริ่มง่าย scale ได้โดยไม่ต้อง refactor ครั้งใหญ่
ออกแบบ Data Layer ด้วย Action-Based Structure — Entry, Task, flows, DAF และ data.logic ที่ implement repository pattern ใน TypeScript อย่างถูกต้อง