Sync multiple views, editors and commit / undo

We are thinking of architecture to support multiple views and editors on the same object. A requirement is the ability to commit or undo changes made to an entire facility.

Our requirements are many objects edited simultaneously (up to 10,000 in multi selector mode) - simultaneous display of several views and editors; - changes in the editor on the object should reflect only in other views after successful fixing - objects in the editor should be transferred / canceled in general

We looked at several concepts, including the dynamic shell approach ( http://www.codeproject.com/KB/cs/dynamicobjectproxy.aspx#EditableProxy%28implementingIEditableObject%299 ), which we dropped due to - there is no Intellisense in dynamics - there is no time check dynamic compilation - accessing properties when iterating over them (for example, for a property grid) is very expensive

We implemented the prototype of the architect in the figure.

each editor gets its own clone of the source object. he can then work on it, validate it and pass it to the imodelrepository. the original object is updated, and a backendchanged event is dispatched for each clone. Mods for viewing other editors registered for update events now receive new clones to reflect the changes.

positive aspects: - imodelrepository only displays clones, direct editing of the original is prohibited - each editor can work on its own clone - there is a way to notify other clones and update their contents if one editor makes a change but negative aspects: - each editor / Viewer viewmodel should search a backendchanged object that is dispatched if the original objects are modified. then he needs to get a new clone and discard the old one - In addition, each editor / viewer should look for the event deleted by the object, if another editor deleted the object. then he needs to abandon his clone - it takes a lot of clones, which slows down the system, especially for a large number of edited objects at the same time

, viewmodels, , . . ( , editableproxy)

,

Synchronizing multiple views

+3
1
  • ,
    (*),
    , , VM.

  • ,
    ( ).
    T4s readonly VM , VM, .

(*), . , / , .
, recloning.

  • , VM ( T4, VM),
    , concurrency ( concurrency) .
    , , .
    , , (, OptimisticConcurrencyException EF), , (, , ).
0

All Articles