LLBLGen Pro & InRule

Posts   
 
    
Caybrew
User
Posts: 3
Joined: 13-Mar-2009
# Posted on: 13-Mar-2009 22:33:22   

Hi,

Since I'm new to LLBLGen I have many questions. One of it is the compatibility with InRule.com BRE components (Business Rules Engine). They claim it works with LLBLGen Pro but state:

One technical requirement is that DataContract serialization needs to be used

If I look in the manual it seems like DataContract is not advised to use and in some cases can' t be used. What's your feedback on this? TIA!

Michael

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 14-Mar-2009 03:51:44   

Hi Michael,

I haven't used BRE components but if you are using WCF you perfectly could use DataContract with DTOs. I quote the manual:

In .NET 3.0 and up, you don't need schema importers anymore, as the preferred technique to use is Windows Communication Foundation (WCF). WCF takes care of a lot of plumbing and configuration so it's easier to write service oriented software. To be able to send entities from service to client and back using WCF, you have to define a ServiceContract. This ServiceContract defines the types involved in the service. It's recommended to define an interface onto which the ServiceContract is defined. Both client and service now know which types are involved in the service and no stub classes are created anymore nor necessary. If you want to have a fixed DataContract instead, you shouldn't use Entity classes but you should send Data Transfer Objects (DTO)'s which are more or less dumb buckets with data back and forth. The reason is that a DataContract can't change however an entity might change over time, which then would violate the DataContract. LLBLGen Pro's powerful projection framework can help you with projecting fetched data onto DTO classes to send them over the wire.

Would be helpful if you perform some tests to see how it works with BRE components.

David Elizondo | LLBLGen Support Team
Caybrew
User
Posts: 3
Joined: 13-Mar-2009
# Posted on: 14-Mar-2009 14:49:11   

Hi David,

Thanks for the advise. I'll look into it!

Michael