riak-ripple / ripple

A rich Ruby modeling layer for Riak, Basho's distributed database
Other
618 stars 152 forks source link

Association refactor #284

Open seancribbs opened 12 years ago

seancribbs commented 12 years ago

There is a lot of technical debt in associations, resulting in a number of violations of SRP, unnecessary methods (see all the predicate methods in Association), and weird behaviors like #197. This refactor should:

1) Redefine and move behaviors into subclasses of Association. This will allow further and simpler specialization of association behavior. 2) Remove proxy classes for singular associations, which will resolve #197. Instead, Association subclasses will be called upon to define methods on the owner for getters/setters/builders/etc. 3) Reduce the confusion of responsibility in all of the One/Many/Linked/StoredKey modules for proxies. A simpler inheritance structure should be derived.

seancribbs commented 12 years ago

See also https://github.com/seancribbs/ripple/wiki/Associations-Refactor