Hello, on 12/30/2008 05:07 AM Nathan Nobbe said the following: >>>> How do you structure your web applications? I am thinking in terms of >>>> separating presentation and logic. How is that done in PHP? And how >>>> many architecture patterns are there? >>> >>> Well, >>> >>> I use, way of Rasmus (I give that name) >>> >>> and please read this why >>> >>> http://talks.php.net/show/drupal08/0 >> After you watch that presentation, the conclusion that you reach is if >> you want to develop a site that only shows a page saying "Hello world!" >> you should not use an MVC framework because it adds to much performance >> overhead! ;-) >> > > 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. I am not sure if that conclusion is correct. Were the benchmarks done using a PHP cache extension? If not, the results may just show that Cake includes more code probably because it is more mature than others that are younger. What happens is that PHP code is compiled in zend opcode before executing. The more code split in include files you load, more time it spends loading the code before executing. When you use a PHP cache extension, the compile phase is skipped and replaced by loading compiled PHP code from cache. So most of the time is taken actually by executing the code. Therefore using the PHP cache extension may give more useful results to compare framework execution overhead. > i also like how rasmus shows several advanced optimization techniques, via > strace and gdb. ive not used the 'included' extension, ill probly check it > out. you know some of us yougin's never really got too much pratical > exposure to tools like that =/ im still ramping up on these low level > utilities myself. Those may not be the best tools to tell you what PHP code is taking more time to execute, as they only show system calls. There are PHP profiler extension that give you a better vision of the actual PHP code that may be slowing down things. strace is more useful for PHP core developers as it tells which system calls are more expensive and could be worth some optimization. -- Regards, Manuel Lemos Find and post PHP jobs http://www.phpclasses.org/jobs/ PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php