Guys please try running the application above, take a look on the code and have feedback. Is it a "sufficient" paradigm (from server side validation perspective), is it a simple enough approach from your perspective? ... of course it is just a draft.
Br's, Marius On Sep 21, 1:46 pm, Oliver Lambert <[EMAIL PROTECTED]> wrote: > On 21/09/2008, at 8:08 PM, Tim Perrett wrote: > > > > > Sounds good Marius - project wise though we need to address this IMHO; > > as we pick up more users of lift people will want this functionality > > for sure. > > Yes, or be forced to roll their own validation > > > > > I guess we really need to decide at what level we want to apply > > validation - Im not sure that having it tightly coupled to the > > persistence tier (a la rails) is a great idea. Just had a quick look > > at OVal.... i think a generic approach like that would be good as then > > your just dealing with a single methodology to spec validation > > criterion on any object. > > It would be nice to be able to mixin the same major validations (e.g > notNull, Range) > automatically to the client via prewriten javascript, as well as the > "bind" and > the persistence layer > > > Also, conceptually, a server side representation of a form seems to be > > a different notion to the bind() style we have with snippets. Im not > > sure how we could get it to work in a clean way - would it be an > > abstraction on top of bind() ? > > I like the idea of a server side representation of a form with > validation. > I think the "bind style" may change when a compiler plugin gets rid > of its redundancy > > > Anyway, great to noodle this as its certainly very important going > > forward > > > Cheers > > > Tim > > > On Sep 21, 7:44 am, Marius <[EMAIL PROTECTED]> wrote: > >> Right ... > > >> IMHO the key things that we need to have : > > >> 1. Typesafe validation (predicates as partial functions sounds very > >> good to me ;) ... ) > >> 2. Scala objects abstracting forms ... maybe in a way you similar > >> with > >> what presented here (also this has been mentioned in other posts) > >> 3. An easy way of obtaining markup from "Form" classes > >> 4. An easy way of processing the form (this is the easiest part as we > >> have all we need here) > > >> I'll also do some noodling on this and let's come with concrete > >> proposals. > > >> P.S. > >> Some ideas are currently > >> here:http://liftweb.net/index.php/Unified_Validation > > >> Br's, > >> Marius > > >> On Sep 20, 8:46 pm, Tim Perrett <[EMAIL PROTECTED]> wrote: > > >>> Guys, > > >>> Myself and Marius have just been talking over IM about generic > >>> ways to > >>> build validation into lift. > > >>> IMHO, right now it seems that there is not any cohesive way to > >>> validate user input (without a bunch of manual coding). One of the > >>> things we talked about is server-side form representation... I > >>> wonder > >>> if there is a way to abstract form building so that it was somehow > >>> generic and let you specify field content & type and also the > >>> validation that needs to be applied to that control. > > >>> This just pure spitballing, but what about something like: > > >>> class MyDemoFrom extends LiftForm { > >>> def someInput = TextInput(SHtml.text(<usual stuff>), Validatons({ > >>> // whatever validation here > >>> })) > > >>> } > > >>> Or whatever - I just want to try and talk through the idea rather > >>> than > >>> propose code at this stage. Even when we extract the validation > >>> stuff > >>> from mapper, we'll still need some way of implementing those > >>> validation constraints on controls wont we? > > >>> Interesting in what people think > > >>> Cheers > > >>> Tim --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
