On Sun, Nov 29, 2009 at 3:57 PM, Timothy Perrett <timo...@getintheloop.eu>wrote:
> David, > > So I took a close look at the lift-wizard code with a view to do what > we discussed on the committers call. From that, I have the following > feedback and questions: > > - Wizard.scala, L192... You have hardcoded html tables; IMHO, these > need to go, ASAP! The code looks through a list of places for the template and only returns the hard-coded XML if *a template is not found anywhere else*. The template is automatically included in the archetype. But, I am absolutely unwilling to have wizard code that "doesn't work" because the developer didn't include a template. One way or another, a graceful degradation will happen. This will not change. > Id suggest replacing them with a CSS div from > blueprint or similar. I do however see that you can override this > using wizard-all.html in templates-hidden... pretty cool, but not > obvious - shall i document this more in the comments? > Feel free to document the process for selecting a template as well as the bind points in the template. > > - There is a lot of code in Wizard.scala; it would be easier to > navigate if it were broken into different files - the whole thing > needs a lot more commenting. Im happy to add this if you want...? > It's possible to move StringField and IntField to another file. The rest of the stuff is part of the single Wizard trait and it's be difficult/impossible to break this into multiple files without losing protection scopes. > > - Mapper appears to be a hard dependency It's not a hard dependency. You are not *required* to use a JDBC transaction. > if you want a persistable > wizard as it relies on the mapper transaction block... It is possible to do the common use case of explicitly using DB's transations. While DB is part of mapper, it's conceptually a vendor of JDBC connections and is used by the JDBC stuff in Record as well. Wizard stuff is run within the scope of an HTTP request and any transaction stuff you have as part of that HTTP request will surround the execution of the Wizard's finish block. > could this be > made more generic so the persistence mech could be JPA etc? Is it > possible to do a Mapper transaction using the JTA module? > > - In order to load the wizard dynamically from some serialised form > (xml, json or whatever) would I be right in saying that its a matter > of creating a subtype that overrides the following declarations: > + Wizard.screens > + Wizard#Screen.screenFields > + Wizard#Screen#Field.validate > Yep. > > What do you 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 lift...@googlegroups.com. > To unsubscribe from this group, send email to > liftweb+unsubscr...@googlegroups.com<liftweb%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/liftweb?hl=en. > > > -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics -- You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to lift...@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.