Remoting application

Posts   
 
    
mihies avatar
mihies
User
Posts: 800
Joined: 29-Jan-2006
# Posted on: 30-Jan-2006 09:18:35   

Hey guys,

I am considering using this stuff for a new application which will be: - using remoting (probably WCF with HTTP - IIS on the server side) on internet - UI on the client side and remoting between UI and BL on the server

So far I am evaluating options and I see LLBLGenPro as an excellent product. Here are my initial thoughts: - of course I'll use adapter approach - I will lazy load from UI (manually) - I'll be using optimistic concurrency (through a trigger generated datetime)

On the client side I'll fetch all necessary data to edit an entity (i.e. order and its child and master tables) and let user edit/add/delete. Now, how would I send data back? I mean an order could have 100 items and only one of them is modified thus I need to send back only order and modified item, right. I know I could use UnitOfWork thing however it requires additional coding. Is there a way to (automatically) pass only changed data back and merge refetched data? Or I have to construct UOW manually and merge manually?

Any idea or comment is welcome.

sparmar2000 avatar
Posts: 341
Joined: 30-Nov-2003
# Posted on: 31-Jan-2006 09:26:17   

Hi There are 2 possible methods that you could use to address your situation.

I normally make heavy use MVC design pattern in my application, and therefore my client has the bare minimum functionality i.e. it loads, reads a dataset, and 'paints' the screen. The dataset contain a collection (datatable) that is 'customised' so that the UI has minimum logic (DB relationships, BL etc)...bit like a flatfile (could be XML file, but dataset is easy coding)

In this situation, my BL 'unloads' the data from LLBL entity/collection objects, into a dataset. This dataset is sent to the UI (clent), who modifies it. As part of midification, it sets the 'isDirty' flag that will enable the BL to 'pick' just the changed rows.

If however, thye BL sent a large amount of 'row' to the UI and there is significantly low amount of 'changed' by the client, then it is more efficient to just send the few row rather them the whole dataset with 'isDirty' flag set on the few records - makes it easier of the BL coding as well.

The other option (please note, I have personnaly not tried yet) is to send the LLBL entity. When that entity is changed, the isDirty flag will get set by LLBL runtime. The BL will just have to look for 'isDirty' records to do its job. In this situation, new record might to be treated a bit diffrent. Please read this thread for further info http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=2151&HighLight=1.

Hope this help. Keep us posted

mihies avatar
mihies
User
Posts: 800
Joined: 29-Jan-2006
# Posted on: 31-Jan-2006 14:46:07   

Hi,

Well, I know of a dataset approach (I have been using it before). However, it doesn't seem to me a perfect one since I wan't to use LLBLGen without DataSets (at least for editing) :-)

I'll certainly pick the second one (I hope I don't get burned - thus I am looking to as much feedback as possible). The issue is if there is a way to send back only modified data (either isDirty or new) automatically (like DataSet.GetChanges does). Anyway I'll start with a prototype and see how it goes.

Thanks for the comment,