LLBLGen and the new MS web client software factory

Posts   
 
    
avdean_
User
Posts: 5
Joined: 18-Dec-2006
# Posted on: 18-Dec-2006 16:15:21   

Hi all,

just starting to evaluate LLBLGen and will be looking at middle tier stuff first, but would like to ask a question regarding UI binding.

The MS practises and patterns team will soon be releasing a new application block called the Web client software factory. The current implementation of this framework includes a replacement of the standard MS objectDataSource control, I believe this is due to the View Presentation pattern causing problems, see MS documentation below:

Following is from the Web Client Software Factory (WCSF) chm file under the "How To: Databindings" section.

_The new data source control included in the Web Client Software Factory was conceived with the idea of having a data-binding mechanism that could easily integrate with the M-V-P-C pattern. To achieve this, the data source control was designed in such a way that delegates the responsibility of retrieving, updating, inserting and deleting data to other objects. This data source control could be thought of as a container of objects that must be populated programmatically and that fires events to notify changes to the contained objects. _

Okay, here's the question - will the LLBLGenProDataSource(2) data sources have a problem working under the MS View Presenter pattern using the WCSF?

Thanks in advance

Kris
User
Posts: 79
Joined: 27-Oct-2005
# Posted on: 18-Dec-2006 18:58:02   

Hi avdean, you might read these messages on this subject: http://www.llblgen.com/tinyforum/GotoMessage.aspx?MessageID=38921&ThreadID=5696

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 19-Dec-2006 08:47:29   

will the LLBLGenProDataSource(2) data sources have a problem working under the MS View Presenter pattern using the WCSF?

I don't think so, as you can set LivePersistence = false and control the DB actions yourself.

If LivePersistence is set to false, fetching data and saving data isn't performed by the LLBLGenProDataSource2 control but an event is raised instead (see below, Intercepting activity) which passes an event arguments object which contains the parameters for the fetch or save and allows own code to perform the fetch or save. In any case, the changed event is raised so the bound control(s) can refetch the data from the LLBLGenProDataSource2 control. LivePersistence causes 3 events to be raised: PerformSelect. This event is raised when the LLBLGenProDataSource2 control needs to retrieve data from the database. PerformGetDbCount. This event is raised when the LLBLGenProDataSource2 control needs to retrieve the number of items in the complete resultset. This event is raised when server side paging is enabled and the total number of items in the resultset is required by the bound control(s). PerformWork. This event is raised when ExecuteInsert/Update/Delete is called on the LLBLGenProDataSource2 control by a bound control. Typically this is done after an entity is edited in a GridView or FormView control for example, or a new entity is added through a bound control. The work is tracked in a UnitOfWork2 object which is available to you in the event arguments.