Chapter 7: Static Meets Dynamic Adding Caches to Reduce Costs
445513
Static content on a website is like a phone book, but imagine how difficult it would be to use your &#34;paper cache&#34; if the numbers inside the phone book constantly changed or if numbers differed based on who was looking them up. &nbsp;This is why caching dynamic content poses a more difficult problem than caching static content.
86929
In a new post to his Oracle blog today, Christopher Jones talks about a bug that's been found in the OCI8 extension involving statement caching and a fix he's presenting.   As part of some testing we were doing, we found that PHP's OCI8 extension had a bug in the way it used Oracle's statement caching. The fix is already in CVS and will be generally available in PHP 5.2.4. After a short period for you to send me comments, Antony Dovgal will also build a new PECL snapshot of OCI8.   He explains the issue, a problem attributed to the switching of a "hard pause" and "soft pause" when the script caching connects to the Oracle database server. This caching feature is enabled by adding an "oci8.statement_cache_size" value in your php.ini file (and has a default size of 20).    If you've been having issues with this request caching and want to get the fix right away, grab it from the CVS. Otherwise, keep an eye out for PHP 5.2.4 coming soon to correct the issue.
413172
Mike Lively is happy about one thing - that late static binding (definition) has been committed and will be included with PHP 5.3. Unfortunately, he has a downside too:   The good news is late static binding has been introduced into head and looks like it will be merged into 5.3 before it is released. The horrible news is I really don't think the patch went as far as it needs to.   He talks about the original intention of the functionality (flexible inheritance for static methods/properties/constants) and how it was implemented, but with one small issue - that "static will ALWAYS return the 'resolved' name of the class used to call the current function". He illustrates with a code example showing an extended class returning a static property.   He also mentions two suggestions to help fix this issue:   setting the behavior of parent:: such that it forwards the calling class through the next function call. introducing another scope [...] using a new keyword so parent:: could remain the same
569498
New dual-core processors will make conventional software licensing models obsolete. What's next?
143121
Forget bookmarks: Web content managers allow you to create your own personal, searchable cache of web pages.
323470
This month's edition of php|architect has been released - complete with the "return" of a sample article.
612223
Thin-client computing has been around for a decade, but the rising costs of updating software and installing security patches on networked personal computers is sparking renewed interest
319323
Feature Consolidation runs and runs
158198
Fall developers' conference describes faster CPUs for demanding tasks.
345138
Chapter 14: Kernel Debugging Techniques, reprinted with permission from Embedded Linux Primer: A Practical Real-World Approach By Christopher Hallinan, Published by Prentice Hall
146149
An introduction to using refactoring, unit testing and ZenTest on existing code.
171115
According to Gopal Vijayaraghavan, PHP developers "don't really understand PHP":   They know how to use PHP - but they hardly know how it works, mainly because it Just Works most of the time. But such willful ignorance (otherwise known as abstraction) often runs them aground on some issues when their code meets the stupidity that is APC.   To illustrate, he talks about how a simple bit of functionality in PHP, includes, really work. He describes how they're handled (evaluated at run time) and how the APC relates to this process.   He presents a dilemma where classes are created in two different ways (inside and outside included files) and a problem that could cause the APC caching to not cache a file at all after a certain point. He even gives an example of how, in "normal code" and a pretty basic development situation, this sort of thing could happen.
489518
On his blog today, Alex Netkachov has posted a suggestion of how to combat a common issue facing PHP scripts - their memory usage.   PHP has a build-in garbage collector so you do not need to track the links on the objects, allocate memory for objects and delete them when they are not longer necessary. Things seem so perfect that developers do not even know that their scripts allocate a lot of memory until their server stops processing requests because of the out of memory error.   His example is the processing of a parent/child relationship tree. If not managed correctly, the variables being used could get out of hand quite quickly. Alex recommends the use of a "destructor" at the end of each iteration to help destroy variables and values no longer needed.
229089
Placing your own code between a program and the  libraries it is linked against is easy when you use the LD_PRELOAD  environment variable.
235064
DevShed has posted the first part of a two part series today looking at the use of static members and methods in classes in your PHP5 scripts.    Static properties and methods can be quite useful in a range of situations, not merely for constructing a Singleton class. This article, the first in a two-part series, introduces the basic concepts of static properties and methods, using plenty of hands-on examples.   Hopefully, by the end of this series you should be equipped with a decent knowledge of how to include static members and methods within your PHP applications with minor difficulties.    They start with a simple example of using both in a class before moving on to using the Singleton pattern working up to making a Factory for creating static objects.
675185
In a new entry on his blog today, Marco Tabini introduces us to 5 PHP Performance Tips that we "probably don't want to hear".   I thought it might be interesting to write an article about the performance-enhancing tips you probably don't want to hear about - that is, those that are most likely to produce measurable (and durable) results but do require some effort on your part.   His list consists of:  You Don't Need To Plan Ahead In Order To Have A Plan Combat Database Abuse Do You Really Need A Database Anyway? Scale Horizontally Refactor To Scale Vertically  For each, he explains the title and gives a bit of validation to the point. There's some great mentions of tools that you can use to help accomplish them too - a profiler, the Lucene and Xapian full-text databases, and Lustre.
334117
Sean Coates has posted a new article today about one of the features that will be included in the next major release of PHP (5.3) - late static bindings.   Late Static Binding (LSB) is a topic that's been brought up numerous times in the past three years in various PHP development discussion circles (and we're finally getting it in PHP 5.3)Ã¢Â"but what does it really do, and why should you care? Here's a simple practical example of how it can greatly simplify your code's design.   He shows its usefulness in an example of how it works, letting classes/objects access static methods, constants and properties of inherited classes (besides their own). His example (using beer, of course) shows how an extended class (Ale) can reference the constant (NAME) in the parent class (Beer). Thanks to a new keyword in PHP 5.3 - "static::" - helps define the difference even clearer.   Check out the rest of the article for a more practical usage too.