News Feed
Jobs Feed
Sections

Recent Jobs

News Archive
feed this:

Arnold Daniels' Blog:
An alternative way of EAV modeling
July 31, 2008 @ 12:54:23

Arnold Daniels has posted some thoughts on a topics recently featured in a cover story by php|architect - EAV modeling.

I had seen this db structure in other project, but didn't know that it was called EAV. For those who don't read php|architect, EAV describes a method of saving a large set of attributes, only some of which apply to an individual entity. Normally you would create a table, with a row for each entity and save each attribute in a column. With EAV you save each attribute as a row.

He suggests two ways to do the modeling - the more "common" way and an alternative way that splits up the data types to make querying simpler (into scalars and arrays). A sample database structure and example query for it are included.

0 comments voice your opinion now!
eav modeling database attribute query common alternative method



Debuggable Blog:
Better array syntax for PHP Here's your chance to weigh in
June 10, 2008 @ 12:07:03

On the Debuggable blog, Nate Abele has posted a request for opinions on a topic that's been lighting up the PHP mailing lists (and other social media) lately - the alternative array syntax for PHP.

Well, there's a patch available, but 2/3 of the active PHP committers (who participated in the vote) voted against its inclusion. However, of the end-users participating in the discussion, 17 out of 20 voted in favor. Shortly before the voting was concluded, there was a call for some user-land input, so I decided to humbly submit my two pennies.

His comments support the idea, noting that arrays are "our bread and butter" for the language and should be updated to make them even easier to use (and more in line with the declarations of other variable types).

0 comments voice your opinion now!
array syntax declare update alternative opinion


C7Y:
Optimizing with APC
May 28, 2008 @ 12:58:07

Brian Shire has posted a new tutorial talking about some of the benefits of caching the functionality of your website (with things like APC, not file or database caching):

Opcode caches save energy, expenses, improve overall user experience on web sites, and it's often one of the simplest optimizations to implement. This article will explain the basics of installing, configuring, and tuning an opcode cache for PHP, the Alternative PHP Cache (APC).

The article focuses on how the APC works and how to get it up and working on your installation (as pulled from the pecl repositories). They look at some of the functions the extension's API includes (like ap_cache_info or ap_store for manual caching) as well as some more advanced topics like locking performance, working with TTL, cache priming and filtering.

0 comments voice your opinion now!
tutorial optimize apc alternative cache pecl extension


Ian Selby's Blog:
Put Your PHP App on Steroids - Optimizing with APC Cache
April 10, 2008 @ 17:32:55

In this new post to his blog, Ian Selby talks about a method to "pump up" your web site's performance to give the most to your visitors - the APC cache.

Nothing's cooler than writing a bad-ass site or application and watching it gain popularity and a significant user base. By the same token, nothing's more frustrating that watching your app fall on its face when its running under high load. [...] Before you say, "throw more / better hardware at that mo-fo", why not take a moment and learn about APC: Alternative PHP Cache...

He describes the caching software - what it is and how it can help you and your application - and includes examples using a CacheManger class to store and set values quickly and easily.

0 comments voice your opinion now!
performance apc cache example optimize alternative


Evert Pot's Blog:
PHP serializer in userland code
June 21, 2007 @ 09:43:00

In this new blog post today, Evert Pot shares some thoughts on a custom solution he was looking to create as an alternative for PHP's serialize function.

I wanted to build this as a helper class for a draft-PHP-RPC server. The reason I needed a custom one was because I wanted to make sure I would be able to spit out PHP4-compatible serialized data, and in the future, when its ported to PHP6, also PHP5-compatible data.

He came across several issues in the development process including the slowness of his method compared to serialize() and a lack of a way to tell if two variables reference the same data. If you'd like to check out what he has so far, he's 0 comments voice your opinion now!
serialize phprcp server data alternative serialize phprcp server data alternative


JSLabs Blog:
How to install Alternative PHP Cache
December 11, 2006 @ 07:23:00

On the JSLabs Blog today, there's a new tutorial walking you through the installation of the APC (Alternative PHP Cache) caching system for your PHP installation.

The Alternative PHP Cache (APC) is a free and open opcode cache for PHP. It was conceived of to provide a free, open, and robust framework for caching and optimizing PHP intermediate code.

The installation is pretty simple and, once you get things in place the configuration can start. The tutorial lists out several of the options you can use to customize your installation and a brief paragraph on what each of them do.

0 comments voice your opinion now!
apc alternative cache install option configuration apc alternative cache install option configuration


Mike Naberenzy's Blog:
__get() - an alternative to __autoload()
January 09, 2006 @ 06:47:02

Mike Naberezny has posted this new item on his blog today with a look at why __get() is a perfectly good alternative to __autoload() in a class structure.

__autoload() is a magic function introduced in PHP 5 that provides a mechanism for on-demand loading of classes. After its inclusion in PHP, many argued that using such a feature is too magical or not a good design practice. Putting the religious debates over the appropriateness of __autoload() aside, its implementation does have one significant drawback: it is a function declared in the global scope. Once a function is declared, it cannot be redeclared. This means __autoload() can't be used effectively in shared libraries, since any other code could have already declared it.

Similar lazy-load functionality can be achieved on the class level by using __get().

He gives a short code example where the __get() call mimics the functionality of __autoload(), but the resulting object created is public, not global...

0 comments voice your opinion now!
php __get __autoload alternative global versus public php __get __autoload alternative global versus public



Community Events











Don't see your event here?
Let us know!


conference ajax developer application job database framework book PHP5 zend releases mysql example cakephp zendframework code PEAR security package release

All content copyright, 2008 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework