Changes between Version 20 and Version 21 of PRO_LIB_CORE_TUTORIAL
- Timestamp:
- 10/03/08 21:13:31 (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
PRO_LIB_CORE_TUTORIAL
v20 v21 1 1 [[BackLinksMenu]] 2 2 [[TOC]] 3 4 = Properties Idea = 3 = Properties Library Tutorial = 4 5 == Properties Idea == 5 6 Properties give solution to the sequence of problems: 6 7 * Initialization order problems … … 10 11 * Optimization (central point) 11 12 * Safety (detect errors) 12 = Properties Heirarchy=13 == Properties Heirarchy == 13 14 * !ProObject - Object with properties. All objects needing property support should implement this interface. 14 15 * !ProBean - Each bean is associated one to one with a !ProObject. … … 32 33 [[BR]] 33 34 [[BR]] 34 == List properties hierarchy==35 === List properties hierarchy === 35 36 [[Image(source:/trunk/sophie2-platform/modules/org.sophie2.core/doc/ProList.png)]] 36 37 [[BR]] 37 38 [[BR]] 38 39 [[BR]] 39 == Binding hierarchy==40 === Binding hierarchy === 40 41 * It is the existing bindings hierarchy but bindings are '''deprecated'''. 41 42 [[Image(source:/trunk/sophie2-platform/modules/org.sophie2.core/doc/Deprecated.png)]] 42 = Properties Kinds=43 == Properties Kinds == 43 44 * Property 44 45 * !ObjectProperty - A property which holds a reference to a single object. … … 52 53 * !ChildrenProperty - Property which manages list of children for a child/parent relation. 53 54 54 = Code Examples with different Properties Kinds =55 == How to make==55 == Code Examples with different Properties Kinds == 56 === How to make === 56 57 * !FinalProperty 57 58 {{{ … … 125 126 }}} 126 127 127 === Methods To Use===128 ==== Methods To Use ==== 128 129 These are methods of the !ProBean class. 129 130 * Creates a read-write value prop by given property class. … … 205 206 }}} 206 207 207 == Bad Code Examples==208 === Bad Code Examples === 208 209 209 210 * Resource Property is a better choice. … … 229 230 }}} 230 231 231 = Demo=232 == Demo == 232 233 * Tutorial unit test demonstrating the usage of !AutoProperty 233 234 [[Include(source:/trunk/sophie2-platform/modules/org.sophie2.core/src/test/java/org/sophie2/core/prolib/tutorial/AutoPropertyDemo.java)]] 234 235 235 = How to apply properties to Sophie 2.0=236 == How to apply properties to Sophie 2.0 == 236 237 * To get rid of the fields, except for immutable classes, and public static final things. 237 238 * Note that final instance fields are not so safe, because they are initialized after the super constructors. … … 241 242 * To be careful of cyclic dependencies (like a = b + 1, b = a + 1). No library can solve them. 242 243 243 = Comments=244 == Comments ==