Archive for March, 2007
PHP Developer - March 30th, 2007
There’s an interesting new post over on the O’Reilly OnLamp.com website containing some statistics about their book sales for the past few years by language.
Recently there was a thread on the O’Reilly Radar started by Tim O’Reilly posting a chart that I put together from our book sales data. The chart showed comparative market share for most of the relevant programming languages. I have updated this in the chart below and have included 2005 data as well.
The chart shows the trends each of the languages’ sales has followed over the course of the past years. PHP’s on the last and seems to have held pretty steady in a time when very few seem to be trending upward.
Continue Reading ·
PHP Developer - March 30th, 2007
The roScripts website has a new tutorial that anyone just starting out to create a search engine with PHP and MySQL should get their hands…er eyes on. It steps through the creation of a simple PHP-based search engine, showing multiple methods to achieve the goal.
The right search engine on your website won’t bring you more traffic but it will help your visitors to better locate things so it will keep them on your pages. A good search engine implemented can increase your hits with almost 30% and this is tested. I’m not talking just to have a tutorial.
The different methods the show how to implement include:
- using a straight LIKE on each word entered
- paring down those results using ORs on other columns too
- implementing the Porter Stemmer algorithm
- finding matches that contain the term but not only one part of it
- Full-text searches
It’s a good overview of some of the basic steps to getting your own search up and running, but some of them, when applied to sites with larger amounts of data behind them, wouldn’t be useful at all (slowness mainly).
Continue Reading ·
PHP Developer - March 30th, 2007
The AnyExamples site has a new tutorial posted that looks the creation of a “multiple photo thumnail generator”.
Built-in PHP library gd does not have ready-to-use function for photo(jpeg) thumbnail generation. Although there are many such examples on the net, they are usually not suitable for effective generating series of thumbnails (240×240, 140×140, 80×80). This article provides php function thumbnail_generator and trivial image uploading script, which generates series of thumbnails.
They start with the creation of two functions, one to calculate the new thumbnail’s size and the other to work to create it. They explain it briefly then move on to a useful application - a file upload that automatically creates a thumbnail for an uploaded image.
Continue Reading ·
PHP Developer - March 30th, 2007
The phpaddiction website has posted the first part of a series today covering URL routing with PHP (commonly used by frameworks to route requests through a centralized location.
Most PHP frameworks use some variation of the front controller pattern to centralize common code and logic. There are advantages and disadvantages to this. I am going to ignore those for now. In fact the first part of this series will explore a simple procedural URL routing method that contains many of the disadvantages. In later articles we will build upon this basis and address the disadvantages.
He walks through the steps to get things set up - working with mod_rewrite, creating the “entry point” for your application, and finally, how to execute a command based on the request’s action.
Continue Reading ·
PHP Developer - March 30th, 2007
Sebastian Bergmann has a (very) quick post on his blog today:
PHPEdit, the IDE for PHP by WaterProof SARL, will soon add support for PHPUnit.
PHPEdit is a popular development environment for PHP with features including XDebug Integration, stynax highlighting, code beautifier, code hinting, and much more.
According to the wiki entry for PHPEdit, the support will start with version 2.12 of PHPEdit with features like indicators about the amount of test per class, file, and project, fast navigation between code and test, and the ability to execute tests from the IDE.
Continue Reading ·