iluwatar / iluwatar/java-design-patterns

Binding Properties pattern

Open
#67 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

  • #1776 by @Apeiria01 — closed without merging
epic: pattern info: help wanted type: feature
Dominant language
Java
Stars
94.7k
Forks
27.4k
Avg merge
3d 4h
Merged PRs (30d)
10

Description

Description

The Binding Properties design pattern is used to synchronize state between different components or objects in a system, ensuring that changes in one part are automatically reflected in another. This pattern is particularly useful in scenarios involving UI components and their underlying data models, where maintaining consistent state across various elements is crucial.

Main Elements of Binding Properties Pattern:

  1. Observable Property: A property whose changes can be observed by other objects.
  2. Observer: An object that subscribes to changes in the observable property and updates itself accordingly.
  3. Binding Mechanism: The infrastructure that connects the observable properties with their observers, facilitating the automatic update process.
  4. Two-Way Binding: An optional feature where changes in either the observable property or the observer can propagate in both directions.
References
  1. Java Design Patterns Project Contribution Guidelines
  2. Binding Properties Design Pattern - Wikipedia
  3. Binding Properties in WikiWikiWeb
Acceptance Criteria
  1. Implementation of Observable Property: Create a class representing an observable property that allows observers to register and unregister, and notifies them of changes.
  2. Observer Interface: Define an interface for observers that requires an update method, which will be called when the observable property changes.
  3. Binding Mechanism: Develop the infrastructure to link observable properties with their observers, supporting at least one-way binding. Optionally, implement two-way binding functionality.

Please ensure that the implementation adheres to the project contribution guidelines and includes appropriate documentation and test cases.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the Java Design Patterns contribution guidelines and the referenced Binding Properties material. Implement the observable property, observer interface, and one-way binding behavior described in the acceptance criteria, then add the requested documentation and test cases; two-way binding is optional.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.