I'm definitely not skilled enough in Scala to be anything more than a 
drag at this point, but I hope you're going to post this stuff to the 
list as you go along. I'll do my best to learn it, and maybe my ignorant 
questions will spark a few ideas in more learned heads.

I'm sure you already thought of this, but it would be nice to be able to 
put the constraints in once and have the code generate both validation 
in the persistence layer and client-side JavaScript validation code in 
the forms, so the latter degrades gracefully to the former.

Also, I note that JPA appears to allow validation to be inserted via 
annotation. That seems like a very nice way to do things -- just 
annotate the field when it's created to indicate the limitations on it.

My 0.5 cents.

Chas.

David Pollak wrote:
> Folks,
> 
> For those who want to help, but are not yet Lift committers, please 
> contact me off-list and let's chat about you contributing to this project.
> 
> If you're a committer, please look at the the wip-record2-dpp branch.  
> What I've been doing to start is to try to decompose the Mapper and 
> Mapped* classes in Lift into composable traits in the net.liftweb.record 
> package.  Once we have a reasonable set of components we could compose 
> together, then we can start filling in the pieces.
> 
> So... step 1, finish the decomposition of the Mapped* stuff into the 
> Record stuff.  Clean up the stuff that doesn't make sense (e.g., 
> getSingleton -> meta... although this is on Mapper, but you get the 
> idea).  How do we convert the field to/from String, XML, HTML Form, 
> etc.?  What are the validation rules?  What are the access control rules 
> (yes, this is already built into Lift's Mapper stuff)?
> 
> Step 2, decompose the Mapper and MetaMapper stuff in the same way... 
> what's necesssary to map to/from XML, HTML forms, different storage 
> mechanisms etc.
> 
> Step 3, fill in the core functionality... copy and paste whatever 
> valuable code there is from Mapper (note than only about 20% of mapper 
> is JDBC related).
> 
> Step 4, build an abstraction layer for JPA so you can compose a JPA 
> persisted Record just by mixing in the JPA adaptor... and the same for 
> the JDBC adaptor, etc.
> 
> Step 5, write a translation guide from Mapper -> Record
> 
> Questions?
> 
> Thanks,
> 
> David
> 
> PS -- on the validation front, currently, Mapper fields have a 
> List[Function[T, List[ValidationIssue]]] that is the access to the 
> server-side validation rules.  There exist a bunch of functions on 
> MappedString, etc. to do common validations (min len, max len, regex, 
> etc.)  In order to get client-side validation, we can have a subclass of 
> Function that implements jsValidation: JsExp  That will be the cue to 
> include the client-side validation in the form as it's being composed.  
> Cool, huh?
> 
> On Mon, Sep 22, 2008 at 10:42 AM, Alex Cruise <[EMAIL PROTECTED] 
> <mailto:[EMAIL PROTECTED]>> wrote:
> 
> 
>     David Pollak wrote:
>      > I think the stuff that marius has done is interesting, but it is at
>      > odds with the long promised record/field stuff.
>      >
>      > This morning, I figured out how to ask the right questions in
>     order to
>      > manage the record/field project. If I can get one or two
>     volunteers, I
>      > think we can get the project done in a few weeks.
>      >
>      > Volunteers?
>      >
>     I would love to get involved in this, as it's one of my recurring pet
>     projects.  Unfortunately, like most of us, I don't have a lot of spare
>     time and my days are pretty much spoken for.  Maybe one way to start
>     would be for me to spew some of the design ideas I've had in this
>     department over the past year or so, and see if they resonate?
> 
>     -0xe1a
> 
> 
> 
> 
> 
> -- 
> Lift, the simply functional web framework http://liftweb.net
> Collaborative Task Management http://much4.us
> 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 [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