Changes between Version 6 and Version 7 of GROUP_MEM_RESOURCES_MODEL_R0


Ignore:
Timestamp:
08/03/09 12:14:34 (16 years ago)
Author:
mira
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GROUP_MEM_RESOURCES_MODEL_R0

    v6 v7  
    3232== ResourceModel == 
    3333 
    34 The model will be constructed by nodes that can either have value or children but not both. Once created the value of the node could not be changed. Every value node will hold the value of specific property that could be accessed only by the right key. The children nodes will hold maps of names and corresponding nodes so basically it is an immutable tree structure.[[BR]] [[BR]] 
    35 The path in this tree structure will be going through nodes that correspond to parts of the keys id and getting a keys value is just finding the right value node and getting its value. For example if you are looking for the value of the border color of page A you should look in the tree nodes as follows : root(“”)->children->PageA->border->color. All nodes except the last one are children nodes and the last node will be value node with the ImmColor as its value.  [[BR]] [[BR]] 
    36 Since all nodes have only final values the modifications on it will return new instances of the model with all modifications applied.  Furthermore it will be too heavy to apply every change on its own and copy the model every time so the modify method will take as argument a Map of keys to be changed and their new values.[[BR]] [[BR]] 
     34The model will be constructed by immutable nodes that can either have value or children, but not both. Every 'value' node will hold the value of specific property that can be accessed by specific key. The 'children' nodes will hold maps of names and corresponding nodes so basically it is an immutable tree structure.[[BR]] [[BR]] 
     35The path in this tree structure will be going through nodes that correspond to parts of the keys id and getting a keys value is just finding the right value node and getting its value. For example if you are looking for the value of the border color of 'page A' you should look in the tree nodes as follows : root(“”)->children->PageA->border->color. All nodes except the last one are children nodes and the last node will be value node with the ImmColor as its value.  [[BR]] [[BR]] 
     36Since all nodes have only final values the modifications on this model will return new instances of the model with all modifications applied.  Furthermore it will be too heavy to apply every change on its own and copy the model for every alteration so the modify method should take as argument a Map of keys to be changed and their new values.[[BR]] [[BR]] 
    3737The model will need only correct changes so the ModelChangers should take care of producing some times more than one write so that would be easier for developers to write AutoActions. [[BR]] [[BR]] 
    3838 
     
    4141The mem and file accesses would have basically the same logic except that file accesses should present additional logic for persistence. For this abstracts common parent classes should be created: [[BR]] [[BR]] 
    4242 
    43 '''LocalRootAccess''' – keeps an list of all created accesses and when  asked to open looks in it for one at the given location. Provides abstract method createTop () to be implemented of the concrete Mem and File RootAccesses.  [[BR]] [[BR]] 
     43'''LocalRootAccess''' – Keeps an list of all created accesses and when asked to open() an top access, looks in it for already created one to the given location (ref). Provides abstract method createTop() to be implemented of the concrete Mem and File RootAccesses.  [[BR]] [[BR]] 
    4444 
    45 '''LocalTopAccess''' – Provide abstract methods createInner() to be implemented by the concrete Mem and File TopAccesses.  It does not memorize the created and creates new ones every time when opening an ref but since the inner accesses don`t have model.  [[BR]] [[BR]] 
     45'''LocalTopAccess''' – Provide abstract methods createInner() to be implemented by the concrete Mem and File TopAccesses.  It does not memorize the created accesses because they don`t have a state. When asked for an inner access it creates a new one that delegates to it.  [[BR]] [[BR]] 
    4646 
    4747'''LocalInnerAccess''' – Delegating logic to its top access.  [[BR]] [[BR]] 
    4848There are tests for most of the functionality – [4717] 
    49  
    5049 
    5150= Implementation =