[Israel.pm] separate logic from the data storage

Eitan Schuler eitan.schuler at gmail.com
Tue Jun 20 06:13:23 PDT 2006


If you search for an orthogonal object-relational mapper you can use
Tangram. For demo see Tangram::Tour on cpan.
If you are looking for a tool that implements SQL abstraction only,
you can use Class::DBI or Alzabo.

Eitan

On 6/20/06, rami doqa <rod082 at yahoo.com> wrote:
> Hello Perl programmers, I need a help in how I can
> separate the Perl class from the data storage access
> ex:
> if I want to access the database (add new , update or
> delete customer records ) how can I implement this in
> the best OOP way. for example:
> if I have a Customer.pm class and I want to add new
> customer to the system , is this a good way :
> Customer->new('...customer info')
> and then access get and set methods.
> or I must use overloading : if a new customer then
> call the constructor with customer parameters , or if
> I want to access an existing customer then call the
> default constructor with empty parameters and just
> call the get methods.
>
> Is the access to the database and the queries and
> connection located inside the class methods and in the
> constructor?
>
> Regards,
> Dakka rami
>
>



More information about the Perl mailing list