On Feb 15, 2010, at 1:56 PM, Marius wrote:
> The author says something like "The moment you define a domain
> abstraction as being statically dependent on a persistence
> implementation, you lose the ability to reuse it in other contexts.".
> I disagree completly. I can think of a couple of options:
> 
> Option 1
> class Person extends CouchRecord[Person] with PersonView {
>  //..
> }
> 
> in my UI layer I can have:
> 
> def render (person: PersonView): NodeSeq = ...

This is a pretty slick approach (and I'm ashamed I didn't think of it, since 
it's a not uncommon pattern in Haskell ;-), though it'd need a little bit extra 
to share validations and so on between the multiple implementations of 
PersonView. In this case, I think I'd name my actual record classes to reflect 
which domain their bound to.

-Ross

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.

Reply via email to