Add Business Logic Patterns documentation and TypeScript examples (11.2.3) #822
+19,953
−16
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implements comprehensive documentation for Business Logic Patterns section covering Transaction Script, Domain Model, and Service Layer patterns with working TypeScript examples and interactive quiz.
Documentation
docs/11-application-development/11.2.3-business-logic-patterns.md(22KB)TypeScript Examples
Four complete projects demonstrating pattern application:
Each example includes:
npm startExample comparing approaches:
Interactive Quiz
10 questions testing pattern selection decisions and trade-off understanding following quizdown format at
src/quizzes/chapter-11/11.2.3/business-logic-patterns-quiz.js.Front-matter
Standard bootcamp metadata configured:
Original prompt
This section details on the original issue you should resolve
<issue_title>Task 2.0: Business Logic Patterns Documentation and Examples (11.2.3)</issue_title>
<issue_description>## 🎯 Task Overview
Task ID: 2.0
Parent Spec:
docs/specs/01-spec-design-patterns-section/01-spec-design-patterns-section.mdDepends On: Task 1.0 (conceptually independent, but sequential for consistency)
Status: Ready for Implementation
Estimated Time: 1-2 hours
This task implements comprehensive documentation for Business Logic Patterns (11.2.3), including Transaction Script, Domain Model, and Service Layer patterns with working TypeScript examples and an interactive quiz.
📋 Specification Context
Project Overview
This specification defines the remaining Design Patterns subsections for Chapter 11 (Application Development) of the DevOps Bootcamp. This task focuses on patterns for organizing business logic, helping students understand trade-offs between simplicity and complexity management.
User Story
US-3: Organizing Business Logic
As a developer facing design decisions, I want to understand when to use Transaction Script versus Domain Model patterns so that I can choose the appropriate approach for my application's complexity.
Functional Requirements
✅ Acceptance Criteria (Proof Artifacts)
The following artifacts must exist and be verified for task completion:
docs/11-application-development/11.2.3-business-logic-patterns.mdexists with complete content including front-matter, pattern explanations, comparative analysis, and exercisesexamples/ch11/business-patterns/transaction-script/contains working TypeScript implementation with README showing procedural organizationexamples/ch11/business-patterns/domain-model/contains working TypeScript implementation with README showing OOP encapsulationexamples/ch11/business-patterns/comparison/contains same business problem solved with both patterns, with README explaining trade-offsexamples/ch11/business-patterns/service-layer/contains working TypeScript implementation with README demonstrating orchestrationsrc/quizzes/chapter-11/11.2.3/business-logic-patterns-quiz.jsexists with decision-making questions following quizdown formatnpm testpasses in all example directoriesnpm start📝 Sub-tasks
Documentation Tasks
docs/11-application-development/11.2.3-business-logic-patterns.mdwith front-matter (category: Application Development, technologies: TypeScript/Design Patterns, estReadingMinutes: 30, exercise definition)Code Examp...
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.