[Dbix-class] Providing unified interface through DBIx::Class

Andreas Pronakis andr3as at yahoo.com
Tue Jul 15 13:59:23 BST 2008


This question might sound a bit silly as I'm sure that DBIx::Class has the DBI part at the front for a reason, however I thought I'd ask anyway.

While evaluating DBIx::Class a question was raised by a colleague: "Can we use DBIx::Class to connect to data servers other than a Database e.g. to a service proving data through a port in an X delimited or XML (or …) format?".  Since I am fairly new to DBIC I thought I'd post the question here.

The aim is to provide a uniformed Interface to developers for accessing data, irrespective of the type of backend he has to talk to, to get the data, all the developer needs to know is that they will get a resultset that they can use the same way as resultset retrieved using a DB.

So they can still call:
my $obj = $schema->resultset('CustomResultSet::Object')->find('my_id');
or use search() (obviously without any joins or other DB related \%attrs but we could provide our own custom ones).

Is this possible/worth exploring?

Does anyone know which parts of DBIC would/potentially need to be sub-classed to achieve this?

Has anyone attempted something like this before? If so how did they go about it and what was the outcome?



Thank you in advance
Andreas



      



More information about the DBIx-Class mailing list