Batched View Processing

here, view is an object corresponding to a particular card, which will render that card including template lookups (& Pattern Cards lookups)  and transclusions. 

 

 

transition                     state                 description

------------                   -------               -------------

init_from_args()           new                  view has card name & display arguments, but not card data

 

init_from_content()      in_process         view has content, & has created subviews for transclusions.

process_content()                                                                 

 

resolve_subviews()       complete          view has final content ready for delivery (to application or to containing view)

 

_________________________________

# processing algorithm pseudo code

 

@views.with_state('new').each { |view|  cache_request <<  view.card_and_pattern_chain  }

 

@views.with_state('new').each { |view| 

   view.process