| 37 | Refactoring of code written in previous tasks will be done like this: |
| 38 | * ListEntry will become an Immutable to prevent users from modifying the key or value of a ListEntry which has been added to a ProList (basically, just stick to the rule that our goal in Sophie is to deal with either Immutables or ProObjects) |
| 39 | * findAll() and findOne() methods of the ProList<E> interface will now return List<E> and E respectively, not List<ListEntry> and ListEntry. |
| 40 | * the internal indexing Map in BaseProList and the corresponding methods for manipulating it will be refactored in sync with the above two design changes |
| 41 | |
| 42 | Solving the notification issues will be accomplished with the introduction of Aspects: |
| 43 | * an Aspect is a Pro, so listeners can be attached and detached to/from it. Also, it has a ChangeManager which will keep track of its Changes. |
| 44 | * BaseProList will use Aspects internally to reduce the attached listeners and the registered reads. This way: |
| 45 | * lots of reads should be registered with the ProList itself but with an Aspect of the ProList, and so lots of listeners will be attached to the Aspects, instead of the ProList |
| 46 | * ProChanges will be fired from the Aspects ... |
| 47 | * the internal list which actually holds the elements in a ProList is the CacheList. Its access and mutator methods register reads to the whole ProList. Instead of doing this |
| 48 | |