What I had in mind when moving the labels outside of the DBIC code was
more along the line of easing the separation of work - ie let the
designer work on the labels etc and let the programmer deal with the
db. Even if this is one and the same person those two activities
require a bit of context shifting and it is easier to work when they
are separated.
--
Zbyszek
On 11/2/06, Aran Deltac <[EMAIL PROTECTED]> wrote:
On Thu, 02 Nov 2006 16:47:11 +0000, Dave Howorth <[EMAIL PROTECTED]> wrote:
> Brandon Black wrote:
>> I still think its a great place to put meta-info that goes beyond what
>> the DB traditionally knows.
>
> Putting extra information into a data structure 'owned' by another
> component can cause namespace collisions. Better to have a specific
> expansion hook like { private => { your => 'data', goes => 'here' } },
> IMHO.
>
>> Putting a "label => 'Street Address'" in the attributes of a column does
>> not violate any kind of separation.
>
> I think this particular example does cross a fundamental separation. I
> agree with Zbyszek: labels are part of the view/presentation, not the
> model. What if you also want your data to be used by Chinese users?
In that case your label would become something more generic like
"street_address" then when you pass the label through the presentation layer it
gets converted to the language text (with Locale::Maketext for example). Then, the label
is basically just saying what it _is_ without any direct visual styling.
I tend to agree that putting things like this in the metainfo is not a bad
place at all (aka, its a great place!). Everyone stores data in their DB that
directly and indirectly affects the presentation of their app, so whats wrong
with doing the same for meta data at the column level? Once you start putting
HTML and chat logs in the meta data I'd be concerned. KISS :)
Aran
> Cheers, Dave
>
> _______________________________________________
> List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
> Wiki: http://dbix-class.shadowcatsystems.co.uk/
> IRC: irc.perl.org#dbix-class
> SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
> Searchable Archive:
> http://www.mail-archive.com/[email protected]/
_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/
--
Zbigniew Lukasiak
http://brudnopis.blogspot.com/
_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/