[Dbix-class] Column Metadata

John Napiorkowski jjn1056 at yahoo.com
Thu Nov 2 16:29:08 GMT 2006



--- Zbigniew Lukasiak <zzbbyy at gmail.com> wrote:

> Hi,
> 
> In InstantCRUD I've migrated from putting the labels
> (and other
> visuals) into the DBIC structures.  It just felt not
> really clean
> having the presentation parts in the database layer.
> 

Yeah, I guess this is something that really belongs in
an interface class.

I'm just trying to figure out the best way to clearly
package up this set of componants and classes I wrote
for publishing DBIx via the ATOM API.  Right now a
have a mess of classes for doing this.  I think it's
something other people could benefit from, but right
now each table end up having a relatively custom class
for publishing it.  I need to figure out the best
place to put the needed metadata so that my base
classes can figure out what to do.

Actually what I'd really like is to be able to round
trip this in DBIx, basically create a driver for a
ATOM API catalog and access it similarly to tables,
but that's a long way off.

In the Java world I know they typically use a beans
inbetween the physical model and the user
presentation.  I know people do somethings like this
but we don't really have any standards for it.

Basically I need a good way to mark which fields in
the model coorespond to the standard atom tags, such
as title, etc, and what is the serialization model for
the content.  

--john

> --
> Zbyszek
> 
> On 11/2/06, John Napiorkowski <jjn1056 at yahoo.com>
> wrote:
> > Hi,
> >
> > Right now if I stuff extra things into the column
> > metadata info like so:
> >
> > __PACKAGE__->add_columns(
> >   "thumbnail_path",
> >   {
> >         data_type => "VARCHAR",
> >         default_value => "",
> >         is_nullable => 0,
> >         size => 255,
> >         label => "Thumbnail Path",
> >         field_type=>"Textfield",
> >  },
> >
> > I can retrieve that via the result_source column
> info
> > method.  My question is do people think me putting
> my
> > metadata here is a bad idea, in the sense that in
> some
> > future revision of DBIx the metadata will have
> some
> > sort of enforcement and won't support my arbitrary
> key
> > values anymore?
> >
> > Thanks!
> >
> >
> > John
> >
> >
> >
> >
>
____________________________________________________________________________________
> > Want to start your own business? Learn how on
> Yahoo! Small Business
> > (http://smallbusiness.yahoo.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/dbix-class@lists.rawmode.org/
> >
> 
> 
> -- 
> 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/dbix-class@lists.rawmode.org/
> 



 
__________________________________________________________________________________________
Check out the New Yahoo! Mail - Fire up a more powerful email and get things done faster. 
(http://advision.webevents.yahoo.com/mailbeta) 




More information about the Dbix-class mailing list