Active recording / 3-tier architecture

I would like to split my application into three layers in order to use the service layer. I would also like to use the same domain model at both the UI and business layers because I have control over both ends.

It makes sense, but I would also like to use Castles Active Record for the data access layer. Because of this, I can no longer reference my domain model in my UI, because myActive Record objects like "Customer and Order" now contain logic that binds the database directly, rather than through the service layer.

What's the best way to do this? Is there an easy way to decouple Active Record classes from repository classes and dumb data transfer objects?

0


source to share


1 answer


You should use ActiveRecordMediator<T>

insteadActiveRecordBase<T>



http://castleproject.org/activerecord/documentation/trunk/advanced/mediator.html

+2


source







All Articles