Print Page | Close Window

Updating simple types dependant properties

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=2542
Printed Date: 13-Apr-2025 at 2:37am


Topic: Updating simple types dependant properties
Posted By: Darek
Subject: Updating simple types dependant properties
Date Posted: 04-Mar-2011 at 9:00am
I have an interesting puzzle and am considering using DevForce as a fis to a not-so-perfect work around to WCF RIA limitations, but let me explain the scenario first ...
 
I happen to read data from an "exact replica" of SaleForce database (SFDC). Needless to say, it is HUGE. Even a single record could take numerous kilobytes to transfer. On top of that, I do not want to update it directly, so I've created a few helper tables to store additional data. Now, based on information from both, I created a "SimplifiedRecord", where some fields come from SFDC and others from the standalone tables. The data is being provided to the Silverlight client as an IQueryable<SimplifiedRecord>. There is only one field (property) in that SimplifiedRecord that I would like to update from the client side. A simple Yes/no boolean flag. For now, that workaround I have, from the View I simply send and MVVMLight Message to the ViewModel, which in turns invokes an async method on the model, passing the record that needs updating. The DomainService takes care of the update on the database side, but the view does not get updated, until I refresh the ViewModel (obviously).
 
So, the question is, would DevForce provide me with some pixie dust to simplify this process?
 
Darek



Replies:
Posted By: ting
Date Posted: 04-Mar-2011 at 5:25pm
I don't know if it would work for this scenario, but you might be able to synthesize the record in the DevForce EntityServerQueryInterceptor and pull in selected data from the SFDC database at that time (this assumes the record already exists in the helper database). This could make the client agnostic to the storage implementation.

We don't have any magic pixie dust, but we'd be happy to put you in touch with an architect from our professional services team if you'd like to discuss implementation options.



Posted By: Darek
Date Posted: 04-Mar-2011 at 5:28pm

As a general question, if my entity has 10 fields, and I only bind 5 of them in my View, do I still pull all 10 of them?



Posted By: ting
Date Posted: 04-Mar-2011 at 6:05pm
In general, entities are transmitted fully intact with all their fields. We compress the data, so this is pretty efficient unless you have a large binary column (like an image). You can use projections, table splitting, or other techniques to avoid transmitting the column, but I would use that as the exception rather than the rule as each one has some tradeoffs.




Print Page | Close Window