This is an impedance mis-match between POJOs (what JPA expects) and the
richer fields that Mapper and Record have.
I'm working on an interface (
http://github.com/dpp/liftweb/blob/master/lift-util/src/main/scala/net/liftweb/util/ValueHolder.scala)
that should be a base trait on everything in Lift that's gettable or
gettable/settable.

Then you could write a trait that looks like:

trait MyThing {  def name: PSettableValueHolder[String]
*
*
* def getName(): String = name.is*
* def setName(in: String) = name.set(in)*
*
*
* ....*
}


Such a trait should be able to bridge a JPA implementation and a Lift mapper
implementation.

If you've got a better solution, please code it up and let's talk about it.


On Mon, Sep 21, 2009 at 9:31 AM, glenn <gl...@exmbly.com> wrote:

>
> Forgive me. I'm bringing up the subject of modularization in Lift
> under a new heading, but the last discussion was, sadly, all over the
> map and only served to emphasize the problem. So let me narrow it
> down, a bit, here, and ask:
>
> How is it possible to create two different snippet implementations, or
> two different models, one JPA and one not, or one using the mapper
> framework and another the record, and replace one with the other
> without having to recompile the application?
>
> We're not talking here about interface design - you still have to deal
> with boot.  And traits, as has been suggested by others...well, you'd
> better not expose them to the world outside your implementation, as
> any changes would require recompilation. In other words, you can't
> really use traits for your interface.
>
> To use Lift in the enterprise does require that teams be able to work
> independently, doesn't it.
>
> Glenn
>
>
>
> >
>


-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp

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

Reply via email to