Skip to content

Docs/strategy#3530

Open
shabinfrancis wants to merge 3 commits into
iluwatar:masterfrom
shabinfrancis:docs/strategy
Open

Docs/strategy#3530
shabinfrancis wants to merge 3 commits into
iluwatar:masterfrom
shabinfrancis:docs/strategy

Conversation

@shabinfrancis

Copy link
Copy Markdown

What does this PR do?

  • Improves and refines the Strategy Pattern documentation for better readability.
  • Adds guidance on when the Strategy Pattern should not be used.
  • Adds additional real-world applications of the Strategy Pattern.

@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown

PR Summary

Improvements to Strategy Pattern documentation, added usage guidance, and expanded real-world applications; also includes related updates to Factory Method and Singleton README files.

Changes

File Summary
factory-method/README.md Enhanced the Real-world example by introducing a messaging-app scenario where the Factory Method delegates instantiation to the correct notification service (Email, SMS, Push Notifications), illustrating how the method selects and creates the appropriate client.
singleton/README.md Added a new section 'Singleton Implementation Comparison (for eager and lazy initialization)' that contrasts eager initialization with thread-safe lazy initialization across object creation timing, thread safety, synchronization, memory usage, performance, and complexity.
strategy/README.md Expanded Strategy README with guidance and applications: refined phrasing, added 'When not to use' and 'Real-World Applications' sections, updated real-world example wording (e.g., shortest-route, fastest-route, scenic-route), clarified the DragonSlayingStrategy example, and introduced new example sections.

autogenerated by presubmit.ai

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Review Summary

Commits Considered (3)
  • a527378: docs(strategy): improve documentation and add usage guidance
  • 690b4b8: docs: add comparison table for singleton implementations
  • 47a97fb: Add notification service example to Factory Method README
Files Processed (3)
  • factory-method/README.md (1 hunk)
  • singleton/README.md (1 hunk)
  • strategy/README.md (3 hunks)
Actionable Comments (0)
Skipped Comments (6)
  • factory-method/README.md [35-36]

    readability: "Clarify Factory Method README example"

  • singleton/README.md [40-49]

    readability: "Document nuances of lazy initialization"

  • strategy/README.md [27-27]

    readability: "Real-world example wording consistency"

  • strategy/README.md [31-31]

    readability: "Clarify runtime algorithm switching line"

  • strategy/README.md [45-45]

    readability: "Flowchart example caption consistency"

  • strategy/README.md [191-210]

    enhancement: "When not to use / Real-World Applications guidance"

@codecov

codecov Bot commented Jun 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (master@d4a0ece). Learn more about missing BASE report.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #3530   +/-   ##
=========================================
  Coverage          ?   83.23%           
  Complexity        ?     4026           
=========================================
  Files             ?     1060           
  Lines             ?    14246           
  Branches          ?      686           
=========================================
  Hits              ?    11858           
  Misses            ?     2101           
  Partials          ?      287           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant