Skip to content

Improved observer pattern documentation with use-case explanation#3452

Open
MADHURI-HS wants to merge 2 commits intoiluwatar:masterfrom
MADHURI-HS:improve-observer-readme
Open

Improved observer pattern documentation with use-case explanation#3452
MADHURI-HS wants to merge 2 commits intoiluwatar:masterfrom
MADHURI-HS:improve-observer-readme

Conversation

@MADHURI-HS
Copy link

Added a real-world explanation for when to use the Observer pattern.

This improves understanding by highlighting its use in event-driven systems where changes in one object need to be reflected in multiple dependent objects.

@github-actions
Copy link

github-actions bot commented Mar 24, 2026

PR Summary

Added a real-world explanation for when to apply the Observer pattern, highlighting its role in event-driven systems where a change in one object updates multiple dependents. Also included a database connection example in the Singleton pattern. Updated observer/README.md and singleton/README.md with new usage notes.

Changes

File Summary
observer/README.md Adds a real-world, event-driven use-case note to illustrate when to apply the Observer pattern; clarifies its benefits in reflecting changes across dependent objects.
singleton/README.md Adds a database connection management example to demonstrate a Singleton use-case for ensuring a single shared instance across the application.

autogenerated by presubmit.ai

Copy link

@github-actions github-actions bot left a comment

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 (2)
  • f2d8546: Improved observer pattern documentation with use case explaination
  • d2a8516: Added database connection example to Singleton pattern
Files Processed (2)
  • observer/README.md (1 hunk)
  • singleton/README.md (1 hunk)
Actionable Comments (0)
Skipped Comments (2)
  • observer/README.md [177-177]

    readability: "Observer: add real-world event-driven use-case"

  • singleton/README.md [81-81]

    readability: "Singleton: add database connection use-case"

@sonarqubecloud
Copy link

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