I am making some progress working with this, but without complete documentation, I am a little confused about a couple things:
Do changes get batched on the controller, like RIA Domain Services, or does each action (Put, get, post, delete) commit their changes individually? I am assuming this is the case, since they are all separate requests.
Within Upshot, is it keeping single entities (like a static) between different ViewModels? Or do I need to work to make them map between each? I assume they are unique by key and entityType.
The BigShelf application creates a number of ViewModels, and there has been quite a bit of modification between them, such that they are no longer individually usable, since they require other viewmodels in their constructors, etc. Is this the best practice
now? I think some alternative approaches, that would make more sense, and align better to Silverlight MVVM RIA Services would include:
Single View Model for the View with multiple RemoteDataSources defined.
Or Separate View Models using only ko Subscribe to keep viewmodels in sync, much like Messaging would do in SL RIA Services.
Would love to get some input / response from any MVP's or Microsoft people.
Do changes get batched on the controller, like RIA Domain Services, or does each action (Put, get, post, delete) commit their changes individually? I am assuming this is the case, since they are all separate requests.
Do changes get batched on the controller, like RIA Domain Services, or does each action (Put, get, post, delete) commit their changes individually? I am assuming this is the case, since they are all separate requests.
As Stijn already said it depends on the buffer settings. Would I would add on top of that is that the DataController Submit process is exactly the same as the DomainService Submit process. If you try to override the old DomainService methods like Submit,
PersistChanges, etc. you will find that they exist in the DataController. The code was pretty much cut and pasted from the DomainService to the DataController.
rposener
Within Upshot, is it keeping single entities (like a static) between different ViewModels? Or do I need to work to make them map between each? I assume they are unique by key and entityType.
By default, each Upshot instance has its own cache just like multiple instances of the DomainContext would not sure entity instances. So, to bring in the Silverlight connection, Upshot=DomainContext.
For the rest of your questions, there are some parts of Upshot/Knockout that I don't fully understand yet to is at the base of what you are asking. When they get their new Nuget package deployed and the demos get published there is supposed to be a better
example of modifying mulitple entities without saving immediatly. When those get published my questions will be answered then I should hopefully have a better answer for you.
Thanks Colin - that helps a lot. I am looking forward to your blogs on this. Your explainations really helped me get my arms around SL/RIA and I appreciate the continued efforts.
As Stijn already said it depends on the buffer settings. Would I would add on top of that is that the DataController Submit process is exactly the same as the DomainService Submit process. If you try to override the old DomainService methods like Submit, PersistChanges,
etc. you will find that they exist in the DataController. The code was pretty much cut and pasted from the DomainService to the DataControlle
What if however on the client entities of different types are "dirty". Is there a way to submit all of these entities in a single batch? From what I can tell the upshot datasource is per entity type and submit is called on the datasource. So if we have multiple
datasource objects each for a different entity type and we call submit on each, i believe each submit will be its own request. Is there a way to submit them all in one batch? Thank you
rposener
Member
17 Points
6 Posts
How is upshot & ApiController supposed to work?
Feb 29, 2012 04:43 PM|LINK
I am making some progress working with this, but without complete documentation, I am a little confused about a couple things:
Would love to get some input / response from any MVP's or Microsoft people.
Thanks,
Ryan
StijnLiesenb...
Member
28 Points
12 Posts
Re: How is upshot & ApiController supposed to work?
Feb 29, 2012 09:56 PM|LINK
You can choose to save your changes to your online upshotcontext immediatelly (default). Or in bulk. Check the video of steve sanderson on SPA http://channel9.msdn.com/Events/TechDays/Techdays-2012-the-Netherlands/2159 at about 30:00
It is the "buffersettings" attribute on the HtmlHelper of the UpshotContext that adjusts this default behavior.
Stijn Liesenborghs
MCPD
Please "Mark As Answered" if it helped you
ColinBlair
Member
146 Points
36 Posts
Re: How is upshot & ApiController supposed to work?
Feb 29, 2012 10:58 PM|LINK
As Stijn already said it depends on the buffer settings. Would I would add on top of that is that the DataController Submit process is exactly the same as the DomainService Submit process. If you try to override the old DomainService methods like Submit, PersistChanges, etc. you will find that they exist in the DataController. The code was pretty much cut and pasted from the DomainService to the DataController.
By default, each Upshot instance has its own cache just like multiple instances of the DomainContext would not sure entity instances. So, to bring in the Silverlight connection, Upshot=DomainContext.
For the rest of your questions, there are some parts of Upshot/Knockout that I don't fully understand yet to is at the base of what you are asking. When they get their new Nuget package deployed and the demos get published there is supposed to be a better example of modifying mulitple entities without saving immediatly. When those get published my questions will be answered then I should hopefully have a better answer for you.
Upshot Blog
ColinBlair on Twitter
MVVM and RIA Services
rposener
Member
17 Points
6 Posts
Re: How is upshot & ApiController supposed to work?
Mar 01, 2012 02:28 PM|LINK
Thanks Colin - that helps a lot. I am looking forward to your blogs on this. Your explainations really helped me get my arms around SL/RIA and I appreciate the continued efforts.
GA30
Member
4 Points
17 Posts
Re: How is upshot & ApiController supposed to work?
Jun 28, 2012 02:00 PM|LINK
Hi Colin,
Regarding:
What if however on the client entities of different types are "dirty". Is there a way to submit all of these entities in a single batch? From what I can tell the upshot datasource is per entity type and submit is called on the datasource. So if we have multiple datasource objects each for a different entity type and we call submit on each, i believe each submit will be its own request. Is there a way to submit them all in one batch? Thank you