java-design-patterns icon indicating copy to clipboard operation
java-design-patterns copied to clipboard

Context Object pattern

Open ekostadinov opened this issue 10 years ago • 9 comments

This pattern helps avoid using protocol-specific system information outside of its relevant context. It forces only the relevant APIs to be exposed and decouples the components and services from the protocol specifics of system information. We use it to encapsulate state in a protocol-independent way to be shared throughout the application.

ekostadinov avatar Aug 31 '15 15:08 ekostadinov

Do you have a reference book or link describing the pattern?

iluwatar avatar Aug 31 '15 15:08 iluwatar

This is the official description of the pattern

ekostadinov avatar Aug 31 '15 15:08 ekostadinov

The Context Object Simply hides implementation details from clients in a particular context and their invocation in a protocol specific system

geniusgeek avatar Sep 01 '15 08:09 geniusgeek

Well, Singleton simply ensures that a single instance will exists.

ekostadinov avatar Sep 01 '15 09:09 ekostadinov

https://www.dre.vanderbilt.edu/~schmidt/PDF/Context-Object-Pattern.pdf

iluwatar avatar Dec 23 '15 17:12 iluwatar

a.k.a. Ambient Context, Scope

https://aabs.wordpress.com/2007/12/31/the-ambient-context-design-pattern-in-net/

npathai avatar Feb 12 '16 11:02 npathai

Can I take on this issue?

Chak-C avatar Oct 20 '22 11:10 Chak-C

Ok @Chak-C

iluwatar avatar Oct 22 '22 06:10 iluwatar

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Nov 28 '22 14:11 stale[bot]