Version 2 (modified by Tanya, 17 years ago) (diff) |
---|
Properties Idea
Properties give solution to the sequence of problems:
- Initialization order problems
- Dependency/updating
- Undo/Redo
- Save/Load
- Optimization (central point)
- Safety (detect errors)
Properties Kinds
- Property
- ObjectProperty
- FinalProperty
- AutoProperty
- ResourceProperty
- ValueProperty
- ParentProperty
- UndoProperty - holds an undo manager. If the bean does not have such property, the properties try to locate UndoManager up (to parent).
- ListProperty
- ChildrenProperty
- ObjectProperty
How to apply properties to Sophie 2.0
- To get rid of the fields, except for immutable classes, and public static final things.
- Note that final instance fields are not so safe, because they are initialized after the super constructors.
- To convert mutable classes to ProObjects
- To gather more requirements to the properties library and apply them
- To keep the properties library with high quality, because everything else will depend on it.
- To be careful of cyclic dependencies (like a = b + 1, b = a + 1). No library can solve them.