Question

I'm looking for a general approach for implementing synchronizing client-side row deletes in a grid in a single page app with the server back end.

I'm currently exploring the Knockout/breeze/durandal/Wep API eco system, and I like it a lot but no demo, tutorial or documentation mentions or suggests an implementation or preferred solution for syncing row delete's in batch. There are dozens of client side libraries, frameworks and GUI widgets and all of them stating vaguely '... and then you send it to the server'.

If I have simply not found the right documentation, would somebody kindly point me to this?

Am I supposed to implement all this stuff myself (seems a bit backward) or is this scenario already sufficiently covered with current frameworks and tools?

(And yes, I'm completely new to single page applications).

Thanks.

Was it helpful?

Solution

When you set a Breeze entity to a "deleted" state

myEntity.entityAspect.setDeleted()

Breeze automatically detaches it from any collections from which it is a member. At this point the entity will have an EntityState of "Deleted".

Later when the entity ( or entities) are saved via an EntityManager.saveChanges() call, these entities are then both deleted on the server and "detached" (removed from the EntityManager) on the client.

At this point the Entity will have an EntityState of "Detached" and should be garbage collected once you release any of your own references to it. ( Breeze no longer "knows" about it. )

Is there something in addition to this that you would expect?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top