Still not entirely sure how I'm going to abstract some of the
functionality for other models, but I'm aware of the need for multiple
tables.
I've put together a prototype of this now, currently looking at moving
all DB related logic to the Site_Gateway, so that the Site objects
only contain arrays of raw data, not rows. Reason being some objects
will be created from selects on joined tables, so the single row idea
doesn't really work. Also, I might want to do a single query for a
whole load of data (spanning multiple joined tables) and then create
individual objects. For example, perform a query for a site and all
it's pages, then create a single Site object which will contain
multiple Page objects.
没有评论:
发表评论