architect 5-tier using llblgen

Posts   
 
    
bunzee
User
Posts: 84
Joined: 20-Mar-2007
# Posted on: 20-Mar-2007 16:38:33   

Hi,

I want to create an 5-tier web application using llblgen. Let's say I have an employer table. I like the idea of using EmployerManager and EmployerGuiHelper that HnD used. I, however, prefer to use adapter instead of the selfservicing template. I also prefer to use the VS designer and click/drag/drop instead of writing much code behind. I want the llblgen to be encapsulated from the GUI developer.

In asp.net, using ODS I can specify the select/update/delete/insert method to bind to. Using llblgendatasource it does not allow me to specify the individual select/update/delete/insert function to bind to (it uses dataaccessadapter, entitycollection, and entityfactory). Though I can specify the filter criteria using RelationPredicateBucket and code behind as in http://weblogs.asp.net/fbouma/archive/2006/06/09/LLBLGen-Pro-v2.0-with-ASP.NET-2.0.aspx but as mentioned above I don't want the GUI developer to have to learn llblgen.

So, here are my questions: 1) Is it possible for the GUI developer to use ODS and bind to llblgen functions to select/update/delete/insert record to persistence dbase using the adpater method (preferably with minimal code behind). 2) Is it possible for the GUI developer to use llblgendatasource and specify with select/update/delete/insert method of the entitycollection or dataaccessadapter to bind to?

Thanks a bunch,

BZ

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39749
Joined: 17-Aug-2003
# Posted on: 22-Mar-2007 10:46:19   

bunzee wrote:

Hi,

I want to create an 5-tier web application using llblgen. Let's say I have an employer table. I like the idea of using EmployerManager and EmployerGuiHelper that HnD used. I, however, prefer to use adapter instead of the selfservicing template. I also prefer to use the VS designer and click/drag/drop instead of writing much code behind. I want the llblgen to be encapsulated from the GUI developer.

In asp.net, using ODS I can specify the select/update/delete/insert method to bind to. Using llblgendatasource it does not allow me to specify the individual select/update/delete/insert function to bind to (it uses dataaccessadapter, entitycollection, and entityfactory). Though I can specify the filter criteria using RelationPredicateBucket and code behind as in http://weblogs.asp.net/fbouma/archive/2006/06/09/LLBLGen-Pro-v2.0-with-ASP.NET-2.0.aspx but as mentioned above I don't want the GUI developer to have to learn llblgen.

You can specify these methods for the llblgenprodatasource(2) controls as well: simply set LivePersistence to false, and bind a handler to the Perform* events.. this is illustrated in the HnD sourcecode as well (the ip ban management for example, also in other areas).

This means that with these handlers you can call BL methods and perform persistence operations or pull data from the db for example. So the UI developer doesn't have to learn llblgen pro, s/he does has to call BL methods and pass parameters passed into the handler via the event args.

So, here are my questions: 1) Is it possible for the GUI developer to use ODS and bind to llblgen functions to select/update/delete/insert record to persistence dbase using the adpater method (preferably with minimal code behind).

Not via ODS, forget that control. You can do this with LLBLGenProDataSource2 control, see above.

2) Is it possible for the GUI developer to use llblgendatasource and specify with select/update/delete/insert method of the entitycollection or dataaccessadapter to bind to?

Yes, see above.

LLBLGen Pro doesn't use update/insert methods, it uses save methods. All actions are tracked in a UnitOfWork object (for save/delete), and you simply pass that object on to a BL tier, which commits it there. Please check in the HnD sourcecode the file: GUI\Admin\ManageIPBans.aspx.cs for an example. It's Selfservicing, but for adapter it works the same. HnD is setup to be usable with adapter as well, as the whole webapp tier doesn't rely on selfservicing specific features and all persistence logic is done in BL classes.

Frans Bouma | Lead developer LLBLGen Pro