LivePipe Blog: Complex Sorting with PHP
547078
On the LivePipe blog today, there's a quick new article demonstrating a sorting method that can be used for more than just simple datasources:   Most often when I need to sort complex data sets, I'm using some sort of SQL backend. Today I needed to do complex sorting of Reflection objects for some auto generating documentation I'm working on for the upcoming Picora release. [...] In the usort() examples, I had always been under the assumption that the return values had to be 0, 1 or -1. Today I learned that is not true at all, and you can come up with your own scoring system with any range, negative or positive.   He illustrates the point with a simple example showing the sorting of the documentation for Picora. In his protected function, scoreFromMethod, he defines the return array with several values instead of just the one.
242658
Popular posts from PHPDeveloper.org for the past week:Sebastian Bergmann's Blog: Support for the Cancel Case Workflow PatternCommunity News: The PDO v2 ProposalSite News: Popular Posts for the Week of 01.25.2008ProPHP Podcast: PHP Newscast for 2008/01/24Developer Tutorials Blog: Why you should be using YAML for configJob Posting: InvestorGuide.com Seeks Web Developer (Fairfax, VA)Pierre-Alain Joye's Blog: Debugging symfony (or any php script) with vim and XdebugCIO.com: You Used PHP to Write WHAT?!Demian Turner's Blog: Seagull 0.6.4 Release (fixes Security Isse from 0.6.3)Developer Tutorials Blog: PHP Qualifications: The Good, The Bad and The Ugly
561879
PHPClasses.org has reviewed a new book today - "Professional Search Engine Optimization with PHP" from Wrox Publishing by Jaimie Sirovich and Cristian Darie.    This is a topic about which there is a lot to say, starting from the Google page rank algorithm, and what to do, as well what you should not do, to have your sites optimized to attract as many visitors as possible using search engine sites.   That is precisely the main topic of the book "Professional Search Engine Optimization with PHP". Despite the title mentions PHP, most of the knowledge presented in this book applies to all kinds of sites, independently if they are served by PHP code or not.    Manuel notes that the "PHP part" mostly has to do with the creation of dynamic sites and working with current PHP applications (like WordPress) to make them more search engine friendly.   Overall, this is an excellent book search engine optimization - SEO. It is very complete. [...] Whether or not you are familiar with the subject, if you are looking for good a book to learn all you need to know about SEO, this may be an excellent choice.
726766
DevShed has posted the third part of their series looking at accessing the Yahoo! web services via PHP5 scripts. This time it's a focus on using the image search capabilities.   In this third chapter of the series, I'm going to continue exploring in detail other helpful web services offered by Yahoo!, such as those focusing on searching images and videos. Also, I will demonstrate how they can be queried directly from a basic PHP 5 application and process the corresponding search results by utilizing the same group of array handling functions that you saw in the previous article of the series.   Just like in previous articles of the series, they make a simple class that connect to the Yahoo! web services and request search details back about their queries (like "Madonna").
751529
Michael Kimsal has come up with the start of a series to introduce PHP developers to the world of Grails (the Java framework).   The comparisons I plan to make will be mostly to PHP, cause that's what I'm most familiar with, though there may be some other comparisons from time to time.  This is a work in progress, but I'd be very interested in feedback from anyone out there interested in this aea - Grails, Groovy, PHP, why another language/platform/framework, etc.   The first two installments have been posted - part one and part two - with an introduction to what Grails is and a brief dip into some "Hello world" sort of code to give you an idea of the structure.
674304
Mike Wallner has thrown together some stats for the latest edition of the pecl/http package to test its response performance.   The results surprised me, because it clearly shows that the performance drop for starting the PHP engine and doing the neccessary negotiation to provide caching is not that bad.   There's a chart of the results as well as a full PDF with all of the stats the graph maps out. He includes the legend to make the graph easier to understand.
743840
Chris Shiflett has posted his own recap of the (just passed) php|works conference up in Toronto over on his blog.   I've been traveling non-stop since php|works, so I haven't had a chance to reflect on the conference, what I learned, who I met, and things like that. (Zak has been doing a good job of this lately, and I'd like to follow his lead.) I've probably forgotten more than I remember, but this is my recap.   Included in the things he mentions are:  The people he was able to meet (like Joshua Eichorn and Sebastian Bergmann) The talks he gave ("Truth about XSS" and "Agile PHP Testing") His interview with Cal Evans of the Zend Developer Zone The PHP 5 Certification and Wez Furlong's "Not PDO" talk
636915
Popular posts from PHPDeveloper.org for the past week:RefreshinglyBlue Blog: PHP vs Ruby - Practical Language DifferencesAndreas Gohr's Blog: Determine StumbleUpon RankingsPHP.net: PHP 5.2.4 ReleasedThe Bakery: Five New Posts - Custom Views, CSS, ViewInFile, ActsAs and Email ValidationPHPBuilder.com: File uploads made easyStefan Mischook's Blog: Turning on display_errors in WAMP - Video Tutorialphp|architect: Pro::PHP Podcast - Newscast for August 2007MT-Soft Blog: Creating a secure PHP production environment from Source CodeCommunity News: Andi Gutmans to Present at AjaxWorld 2007HowTo Forge: How To Set Up A Facebook RSS Feed Reader
632338
Here's what was popular in the PHP community one year ago today:PHPBuilder.com: Using Ajax with PHP to Create an Interactive Web PageJSLabs Blog:  Top 5 PHP ToolsLorenzo Alberton's Blog: Navigation Through Paragraphs in an ArticleChristopher Jones' Blog: Review: Easy Oracle PHPStoyan Stefanov's Blog: The PEAR bookScott Mattocks' Blog: Crisscott OnForce Client DesktopDevShed: Developing a Form Director ClassDevShed: Creating a Simple Threaded Discussion ForumLeendert Brouwer's Blog: Writing Secure Web Applications with PHPPower Creative Seeks Interactive Developer/Analyst (Louisville, KY)PHP Security Consortium: New Product Launch - PHPSecInfoMarket Day: At A Glance: ASP.net vs. PHPJob Posting: LAMP Developer (PHP/MySQL) (Nashville, TN)Community News: Symfony Turns OneBard Farstad's Blog: Optimizing PHP for Intel based Mac
622401
The International PHP Magazine has posted results from their latest poll conducted over this past week asking which, of their given options, is the best helpful hint for creating a web application in PHP.   Two of the options ranked higher than the rest with one (Page/object caching) coming out on top of the other (Don't save performance testing for the end of the project). The remainder of the votes were divided pretty evenly between the last three options: "Use multi result set queries to your database", "gzip compression", and "Tune your web server".   While you're in the polling mood, you should check out this week's new poll that wonders which of their options might be the biggest hindrance to PHP5's adoption in the community.
512494
Burstsort is a library for sorting strings, and is currently the fastest algorithm for doing so, being much faster than Quicksort and Radixsort. It has applications to computational linguistics, genomics, and many other areas of science where sorting strings is required.  https://sourceforge.net/projects/burstsort
449834
Sebastian Bergmann has posted the results of some benchmarking on the compilation he's done on the branches of PHP from version 3.0 all the way up to 5.3-CVS.   As people keep asking me for an update to my previous benchmarks (PHP / GCC / ICC Benchmark, PHP 5.1 / GCC Benchmark (Update), and PHP 5.1 Performance, I quickly ran a new benchmark today.   He rendered the results out into a series of charts defining the number of total seconds taken for the compile and how long each of the components took. It's impressive to see how much of a jump there was between the 3.0 series and 4.3.   He also includes his compile settings (and machine information) as well as the numbers for the results if you'd like to graph them out yourself.
573906
In a new blog entry today, Matthew O'Phinney talks about updates (and refactoring) that he's done to a PEAR package he's developed, File_Fortune.   Over the past few evenings, I've refactored File_Fortune to have it implement Iterator, Countable, and ArrayAccess -- basically allowing it to act like an array for most intents and purposes. As a result, I've eliminated the need for the File_Fortune_Writer package, and greatly simplified the usage.   The package is designed to make an interface between the casual PHP user and the fortune files common on most *nix machines. To illustrate he update, he includes some code that grabs the fortune file, parses it to grab a random one and echoes them out. Also included is the save() method so you can add your own to the list easily.
318761
DevShed ramps up another new series today with this new article giving developers a look at working with object-oriented programming through the eyes of design patterns. It's another excerpt from the George Schlossnagle book "Advanced PHP Programming".   This chapter provides an overview of the advanced OO features now available in PHP. Some of the examples developed here will be used throughout the rest of this book and will hopefully serve as a demonstration that certain problems really benefit from the OO approach.   The article lays down the foundation for the more complex information to come. It introduces object-oriented programming briefly, and talks about some of the handy features of it - like inheritance, static attributes and methods.
285686
PHPBuilder.com has another in their series of excerpts from the Sams Publishing book "PHP 5 in Practice" today - a look at paginating results on a website.   When creating browse or search functionality on a website, you many find that you end up with more data than the page can easily display at once. In these situations it makes for a better user experience to give users only a certain number of results and then present them with options to see the next and/or previous pages.   The code listing is slightly complex, but it does provide a good, clear look at how to paginate the values in an array. They also explain a bit about the two functions that make it possible - http_build_ query and array_chunk.
449459
DevShed continues their series looking at some of the fundamentals of working with PHP in this new tutorial posted today. It looks at one of the flow control statements the language has to offer and a very useful data structure - the switch statement and arrays.   In our last exciting adventure (back in early November), we braved crocodiles, ravenous editors, most of the PHP statements, and beginning loops. In this edition we'll cover the final statement, the Switch, and discuss arrays. So sit back, order your R2D2 robot to bring you a cold, frosty Jolt Cola, and let's get cracking.   They start with a simple example of a switch statement (to echo out strings) and follow it with a detailed description of the different sorts of arrays - numeric indexed, associative and multidimensional versions.
20039
Paul Jones will be one of the presenters at this year's php/db|works Conference happening up in Toronto this week and he's offering a teaser of his talk (here's the synopsis) for those interested - "Organizing Your PHP Projects".   Fans of Henry Hazlitt's "Economics in One Lesson" will recognize the kind of talk I have in store, although I don't have the time available to expound in detail the way Hazlitt does. The talk will consist of a one-sentence lesson for you to remember when deciding how to organize your PHP project, whether it's a library, an application, a CMS, or a framework. I'll then explain how to apply the One Lesson in your project, and the various follow-on effects the One Lesson will have on your project organization.   He also jokes that he'll be the only presenter to use references to livestock, Jimmy Hoffa, and Mir as a part of the talk. He's even included a slide of the presentation for even more info.