LANGREITER.COM plain, simple | |||||||
START INDEX | |||||||
- "Compared to subclassing, delegation is usually a more elegant solution to extend or customize the behavior of a class." — (Delegation in this context means providing hooks for extension or adaption of behaviour.) - Notification provides for a central inter-object change notification facility (willRead, willChange). Important for faulting. - Faulting (delayed data fetching): Only fully initialize objects if needed (memory consumption, performance). - If behaviour needs to be added, subclass EOGenericRecord. For less magic subclass EOCustomObject. - EOGenericRecord stores attributes in an internal dictionary (flexibility). - "[A]lways program to the interface rather than to the implementation." - object.valueForKey("key"), object.valueForKeyPath("author.name"), object.takeValueForKey(value, "key") - Key-value-coding: indirect attribute access (softwiring) — "[C]onsistent way to access an object’s data, regardless if the object provides accessor methods or fields to its data" — fallback chain for read: getKeyname(), keyname(), _getKeyname(), _keyname(), keyname, _keyname, handleQueryWithUnboundKey("keyname"), fallback chain for write: setKeyname(value), _setKeyname(value), keyname, _keyname, handleTakeValueForUnboundKey(value, "keyname") - "As a cardinal rule, all enterprise objects reside in an editing context. This is necessary in order for enterprise objects to send and receive the notifications necessary for change tracking and other mechanisms within Enterprise Objects. So, for every enterprise object you create, you must immediately insert it into an editing context." - Default value setting hooks: set in awakeFromInsertion (new object), awakeFromFetch (Q: why not specify declaratively as part of the model?) - Validation hooks: validateClientUpdate, validateForDelete, validateForInsert, validateForSave, validateForUpdate — default implementations for Save, Insert, Update call validateValueForKey |
SEARCH
GET YOUR MOVE ON ALMOST ALL ABOUT YOU So log in, fella — or finally get your langreiter.com account. You always wanted one. Nearby in the temporal dimension: Nobody. ... and 249 of the anonymous kind. Click on for a moderate dose of lcom-talk. This will probably not work in Lynx and other browser exotica. BACKLINKS none RECENT EDITS (MORE) films-seen Blood Stone y!kes wet towel B Studio Pilcrow News Nastassja Kinski 2011-10-06-steve 2011-10-06 comment-2011-08-04-1 POWERED BY &c. GeoURL RSS 0.92 FRIENDLY SHOPS Uncut Games bei Gameware OFFEN! Offenlegung gem. §25 MedienG: Christian Langreiter, Langkampfen See also: Privacy policy. |