Using LLBLGen as a service

Posts   
 
    
Insane
User
Posts: 10
Joined: 19-Sep-2006
# Posted on: 19-Sep-2006 16:29:19   

Hi,

I would like to use LLBLGen as a service, after wrapping it. My application(s) will reach this service remotely using Web Services or .NET Remoting.

I want my clients to be independent of LLBLGen architecture. I am thinking of using .NET structs instead of classes when passing data between service and applications.

It's ok for single row operations. I have tested the serialization / deserialization speed of structs, also its cheap to keep them in memory for caching.

What is the best practice of doing this type of application? Do I pass ILists or DataTables between service & applications?

What is the less memory / CPU consuming way to convert or serialize LLBLGen Entitites / Views to?

Jessynoo avatar
Jessynoo
Support Team
Posts: 296
Joined: 19-Aug-2004
# Posted on: 19-Sep-2006 16:53:32   

Hi,

Using llblgen with web services works well, but now if your client does not have the LLBLGen lib, you have to send generic data over the wire.

You can use projectors to transform your entity collection into/from pretty much what you wish.

datareader are light, but they don't xml serialize, do you have to go for Datatables or equivalently TypedLists.

Hope that helps

sparmar2000 avatar
Posts: 341
Joined: 30-Nov-2003
# Posted on: 19-Sep-2006 21:36:43   

Hello

An option you might want to consider is make use of DTO pattern. See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpcongeneratingstronglytypeddataset.asp

This has worked for me in the past.

Insane
User
Posts: 10
Joined: 19-Sep-2006
# Posted on: 20-Sep-2006 12:35:18   

Actually I need some performance so I have to use Remoting & Binary Formatter at the background.

I wish to use serialization at minimum because I need performance so typed datasets are huge for me.

Currently I am using IList to send data to client. But when returning from client I couldn't find a method to produce Entity from IList directly yet. I couldn't load items in IList to EntityCollection using the constructor overloads.

I don't wanna go loop and load all items in IList one by one into entities, set properties, update etc. so I am stuck atm.

I am reading projectors topic now.

Walaa avatar
Walaa
Support Team
Posts: 14946
Joined: 21-Aug-2005
# Posted on: 20-Sep-2006 15:56:49