NYCPHP Meetup

NYPHP.org

[nycphp-talk] PHP Dataset Equiv

Mark Armendariz nyphp at enobrev.com
Sun Aug 15 14:10:03 EDT 2004


Start reading up on DAO (Data Access Objects) and Data Objects.  These
patterns are somewhat similar to what you're looking for.  I've attempted
building a hugely robust DAO system that completely replicates a database
(including field types, lengths, defaults, etc), which even goes to the
lengths of automagically validating and/or formatting the data whenever
insert/updated, grabbing the default data when selecting for a form, and
allowing you create fields of 'special' data types (i.e. email: VARCHAR 120,
with email regex attached).  At the end of the day, I just like SQL better.
Although I do use DAO for larger projects to maintain organization, SQL is
so powerful and customizable , and tends to be far more efficient in
comparison to the overhead using objects for data access can carry. And I've
years of experience with complex SQL, which makes it tons faster for me at
dev time.
 
Good Luck!


  _____  

From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On
Behalf Of Joseph Crawford Jr.
Sent: Saturday, August 14, 2004 11:07 PM
To: NYPHP Talk
Subject: [nycphp-talk] PHP Dataset Equiv


Anyone here ever seen a class that can resemble a dataset?
 
here is what i would like to do, create a class that will take and SQL
query/command and execute it but also get all the table info such as row
name and value and store it in the object, i can then be disconnected from
the DB, add/edit/delete from the dataset and then run an update command to
update the actual database, i think having things like this would make the
site a bit faster as i wouldnt have so many db connections for each user
session.
 
I have found WebPanels (http://tanus.dotgeek.org) but that seems a bit more
complex in the OOP area for me.
 
 
Joe Crawford Jr.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20040815/37da1ea4/attachment.html>


More information about the talk mailing list