1
jmass
Data Abstraction
  • 2004/2/22 14:54

  • jmass

  • Friend of XOOPS

  • Posts: 524

  • Since: 2003/12/18


Hello!

I am working on a Help Desk Ticketing system. I have my code seperated as follows:

------------------------
hd_ticket.php, hd_view_ticket: contain code to create objects, get and assign vars for appropriate smarty templates.

hd_ticket_do.php : processes the submissions and redirects to appropriate next page.

class/class.hd.ticket.php : Contains the ticket, ticket update, and ticket view classes.
------------------------

The question I have is regarding the class.hd.ticket.php. It contain all of the SQL query statements.

Should they be there? In Java I would have an EJB that would contain all of the data connectivity. This would enable me to change out back ends (even move away from an SQL Database) without disturbing my class files. This may be overkill for a simple ticketing system, but brings real vaule in a larger scale application.

I notice that the Xoop core does abstract the DAO. xoopsDB is a good example of this.

My questions are:
> If I decided to further abstract the Data Object, where would such a class/object go? Within the module? in the /kernel? elsewhere?

> Is anyone esle doing this? If so, can I look at an example? If not, why not? Is there really a big enough return on investment of time?

Thanks,

JMass

Login

Who's Online

925 user(s) are online (58 user(s) are browsing Support Forums)


Members: 0


Guests: 925


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits