Re: Architecture patterns in PHP
| From: | Nathan Nobbe | Date: | Tue, 30 Dec 2008 18:27:19 +0000 |
| Subject: | Re: Architecture patterns in PHP | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-285241@lists.php.net to get a copy of this message | ||
On Tue, Dec 30, 2008 at 11:24 AM, Eric Butera <eric.butera@gmail.com> wrote:
> On Tue, Dec 30, 2008 at 1:07 PM, Robert Cummings <robert@interjinn.com>
> wrote:
> > On Tue, 2008-12-30 at 12:53 -0500, Eric Butera wrote:
> >> On Tue, Dec 30, 2008 at 12:42 PM, Nathan Nobbe
> >>
> >> I was following the blog tutorial on cake and here's what I got from
> >> hitting the post/index page:
> >>
> >> 081230 12:51:55 316 Connect root@localhost on
> >> 316 Init DB cake
> >> 316 Query SHOW TABLES FROM
> >>
cake
> >> 316 Query DESCRIBE posts
> >> 316 Query SELECT
> >> Post.id, Y^2—–\
^`öß¾\
> >> ‡Post.title,
> >> Post.body,
> >> Post.created,
> >> Post.modified FROM ’cl
> >> ‚X˜”ÔòÎ,µposts AS
> >> Post WHERE 1 = 1
> >> 316 Quit
> >
> > A good framework will allow you to replace the introspection step with a
> > static definition of the database table, thus easily bypassing the extra
> > queries. Although, I can't fathom why they've requested all the tables.
> >
> > Cheers,
> > Rob.
> > --
> > http://www.interjinn.com
> > Application and Templating Framework for PHP
> >
>
> To be fair cake did "cache" the show tables/describe magically for a
> few seconds if I sat there refreshing the page. :)
>
> I always generate my Gateways & VO's from table definitions &
> hand-code any non-crud statements. I've never really dealt with this
> stuff before but it is a little disheartening. I would rather take
> the 5 minutes re-generating a few files for an updated table versus
> infinite amounts of computer power wasted trying to just make it work.
>
which bodes really well for something like symphony, but im not sure how
bulky the orm abstraction layer is. that could end up ruining it in the
end..
-nathan