Re: Architecture patterns in PHP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2008-12-30 at 12:15 -0500, Eric Butera wrote:
> On Tue, Dec 30, 2008 at 2:07 AM, Nathan Nobbe <quickshiftin@xxxxxxxxx> wrote:
> >> on 12/30/2008 01:13 AM Sancar Saran said the following:
> >> > and please read this why
> >> >
> >> > http://talks.php.net/show/drupal08/0
> > it also acts as a nice control mechanism to compare so many frameworks,
> > trivial php, and html.  really nice to see the numbers like that; so cake is
> > horrifically slow, solar & zend are pretty fast and code igniter is like
> > twice as fast as those.
> 
> One thing I'd like to point out is that hello world might show the
> overhead of putting something to screen, it doesn't touch the database
> or any of the harder parts of a "real" app like sessions & acls.
> Things quickly go downhill from there.
> 
> I saw these slides and started comparing my custom developed framework
> vs most of the standard picks out there.  At first I was really
> disappointed with myself after seeing my apache bench numbers suck.
> Turns out when you actually start building an app mine wasn't nearly
> as slow as I thought.  But on a simple hello world it fared pretty
> pathetically because it ran a lot of other routines that I always use
> in real apps, but not in hello world.

You have it exactly right. In a "hello world" situation where my
framework is leveraged properly, it beats the pants off plain PHP...
why? Because with my framework I generally compile to the actually
requested page, and hello world would result in static HTML content
only... of course, as you'll see in some of these "benchmarks" they
would encase the "hello world" output in a component, or module, or view
or what-have-ye which really makes the comparison a bit contrived. And
as Eric says, once you start loading in the database and all those other
libs you need anyways just to perform your business logic, you will
quite likely find that the difference between no framework and a good
framework are at best minimal for server performance, while the
framework approach provides ample benefits to architecural clarity and
modularity. Obviously though, some frameworks/environments are pigs at
the best of times... I'm looking at you Joomla :)

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux