Re: [RDBO] form validation and RDBO

2007-10-23 Thread John Siracusa
On 10/23/07, Bill Moseley <[EMAIL PROTECTED]> wrote: >> We have quite the existing translation system here at work (all our >> business is overseas and we do 16 different languages), and using >> English as the key is pretty much a non-starter in our system. (It >> also makes it a bit harder to ch

Re: [RDBO] form validation and RDBO

2007-10-23 Thread Bill Moseley
On Tue, Oct 23, 2007 at 02:30:01PM -0400, John Siracusa wrote: > > Do you to be able to display the error message along with the field's > > lable? For example: > > Was that supposed to say, "do you want to be able to"? That will work. It was suppose to bee "Do you mean to be able to" display t

Re: [RDBO] form validation and RDBO

2007-10-23 Thread John Siracusa
On 10/23/07, Christopher H. Laco <[EMAIL PROTECTED]> wrote: > Personally, I always use keys, and consider _AUTO and the exposure > ERR_WRONG_PASSWORD an all out failure. I've always wanted to have a test > module that scoured source for keys and ensured they were in all l18n files. My solution is

Re: [RDBO] form validation and RDBO

2007-10-23 Thread Christopher H. Laco
Bill Moseley wrote: > On Tue, Oct 23, 2007 at 02:12:08PM -0400, Christopher H. Laco wrote: >> Bill Moseley wrote: >> [snip] >>> Yep, although I prefer to use English as the key to the language files >>> instead of an ID. Easier to understand when looking at specific >>> validation code. I can als

Re: [RDBO] form validation and RDBO

2007-10-23 Thread John Siracusa
On 10/23/07, Bill Moseley <[EMAIL PROTECTED]> wrote: > On Tue, Oct 23, 2007 at 01:27:17PM -0400, John Siracusa wrote: >> OTOH, the server often needs the labels in order to construct good error >> messages. An alternative is to pass error codes to the templates, but IME >> that tends to result in

Re: [RDBO] form validation and RDBO

2007-10-23 Thread Bill Moseley
On Tue, Oct 23, 2007 at 02:12:08PM -0400, Christopher H. Laco wrote: > Bill Moseley wrote: > [snip] > > Yep, although I prefer to use English as the key to the language files > > instead of an ID. Easier to understand when looking at specific > > validation code. I can also fall back to using the

Re: [RDBO] form validation and RDBO

2007-10-23 Thread Christopher H. Laco
Bill Moseley wrote: [snip] > Yep, although I prefer to use English as the key to the language files > instead of an ID. Easier to understand when looking at specific > validation code. I can also fall back to using the ID (the English > error message) if the lookup fails in the language file. >

Re: [RDBO] form validation and RDBO

2007-10-23 Thread Bill Moseley
On Tue, Oct 23, 2007 at 01:27:17PM -0400, John Siracusa wrote: > OTOH, the server often needs the labels in order to construct good > error messages. An alternative is to pass error codes to the > templates, but IME that tends to result in templates with a lot of > code dedicated to figuring out w

Re: [RDBO] Rose::DBx::TestDB

2007-10-23 Thread John Siracusa
On 10/23/07, Peter Karman <[EMAIL PROTECTED]> wrote: > ** NOTE ** I know that there is an issue with some versions of DBD::SQLite. I > cribbed the standard RDBO test code for evaluating the sqlite version. For the > purposes of the module however, I didn't deem it a serious enough issue to > croak

Re: [RDBO] form validation and RDBO

2007-10-23 Thread John Siracusa
On 10/23/07, Peter Karman <[EMAIL PROTECTED]> wrote: >> I keep the labels in the html templates. I started using YAML files >> to define the fields and labels, but then I ended up with more places >> to define things than I felt was reasonable. > > Yes, that (labels in HTML) is what I do currently

Re: [RDBO] form validation and RDBO

2007-10-23 Thread Christopher H. Laco
Peter Karman wrote: > > On 10/23/2007 11:29 AM, Bill Moseley wrote: > >>> lib/My/Thing.pm >>> lib/My/Thing/Form.pm >> Is that one form for each table kind of mapping? >> >> I might have multiple forms for each table (or groups to tables) and >> they are more related to the specific request (upd

[RDBO] Rose::DBx::TestDB

2007-10-23 Thread Peter Karman
I uploaded Rose::DBx::TestDB to the CPAN a few days ago. It's intended to make it easy to write tests that use RDBO. The SYNOPSIS: use Rose::DBx::TestDB; my $db = Rose::DBx::TestDB‐>new; # do something with $db exit; # END block will automatically clean u

Re: [RDBO] form validation and RDBO

2007-10-23 Thread Peter Karman
On 10/23/2007 11:29 AM, Bill Moseley wrote: >> lib/My/Thing.pm >> lib/My/Thing/Form.pm > > Is that one form for each table kind of mapping? > > I might have multiple forms for each table (or groups to tables) and > they are more related to the specific request (update user profile vs. > upda

Re: [RDBO] form validation and RDBO

2007-10-23 Thread Bill Moseley
Sorry, I have not been following this thread very much, so may be way off base. On Tue, Oct 23, 2007 at 09:48:41AM -0500, Peter Karman wrote: > Slightly different conventions. Rose::DBx::Garden puts a Form.pm class in next > to the RDBO class, so you'd get something like: > > lib/My/Thing.pm >

Re: [RDBO] form validation and RDBO

2007-10-23 Thread Peter Karman
On 10/23/2007 11:14 AM, Peter Karman wrote: > Yes, I see your point. It jives with my experience as well. I am taking the > "derive form validation from db metadata as a starting point" approach. > > When I wrote about trying to tie the 2 together more closely, [snip] I should clarify: there

Re: [RDBO] form validation and RDBO

2007-10-23 Thread Peter Karman
On 10/23/2007 10:08 AM, John Siracusa wrote: > Again, in every large web app I've created, each database table has > several forms that write into it--sometimes only writing partial > values. The HTML form layer is usually the most restrictive, the ORM > less so, and the db itself is the most p

Re: [RDBO] form validation and RDBO

2007-10-23 Thread adam . prime
Quoting Peter Karman <[EMAIL PROTECTED]>: > Adam, > > Glad you are working on this too. Perhaps we can join forces. > Certainly. I've only really started using Rose about a month ago, so i'm not sure how much use i'll be, but you never know ;) > I started something similar here: > > http://www

Re: [RDBO] form validation and RDBO

2007-10-23 Thread John Siracusa
On 10/23/07, Peter Karman <[EMAIL PROTECTED]> wrote: > The other thing I haven't yet got to (but was hoping to work on today) is some > ways to tie the validation pieces of RHTML and RDBO together so that the > validation code can be defined in one place. As Cees noted earlier in this > same thread

Re: [RDBO] form validation and RDBO

2007-10-23 Thread Peter Karman
On 10/22/2007 11:29 PM, [EMAIL PROTECTED] wrote: > I've been fooling around with this idea for the last couple of days > and I was wondering if I could get some feedback from the list. Adam, Glad you are working on this too. Perhaps we can join forces. I started something similar here: htt