Zend: PHP 101 - SQLite My Fire!
553589
Zend has a new tutorial posted in their PHP 101 series - PHP 101 (part 9): SQLite My Fire!
393458
Richard Lord has posted some thoughts about why he likes one of his latest explorations - the Zend Framework - on his blog today.   I've been researching the Zend Framework for PHP in relation to a project I'm working on and I have to say I'm now a fan of it. There's lots to like about it, and some to dislike about it too. But to me the best aspect of it is the flexibility it offers.   He also mentions other reasons for liking it, including the simplicity of working his current application/workflow into the Framework's methods. There is one hit he mentions that the Framework team could improve on - the documentation.
450911
Mike Lively shares some info about a project he's been working on in a new post to his blog today - a port of Java's DBUnit functionality over to PHP to work happily with PHPUnit:   For those of you not familiar with DBUnit, it is a framework that allows you to easily and quickly test php code that modifies and works with database data. [...] With database code this [testing] is somewhat difficult because you have to ensure that your database is in a known state prior to running your tests.   He gives two examples, the first illustrates the difficulty that can come up when trying to test the database information with a normal unit test and the second an example of the same, but using his port of PHPDBUnit to delete information from the database. It uses two XML files in the test - one to seed the database and the other to give the expected export information.   Check out his post for more details on the port from Java and keep an eye out for a beta release of the library as soon as July.
416241
In a new post Richard Heyes links to a replacement for the popular PEAR::DB package:   PEAR::DB is all well and good if you want to connect to multiple databases (I assume, I've never actually used it with anything other than mysql) but it is somewhat hefty on the bad side of 60k. Not a good thing if you're not using some sort of accelerator and have a high traffic site. Here's a class which replicates the PEAR::DB API (the bits that I use anyhoo) and weighs in at a much nicer ~11k. Sweet.   The class is posted for download here as a simple PHP source file with functions and values named similar to those in the PEAR::DB package.
393153
Sometimes, a technology sounds like a great, simple answer to all of your problems. That, however, was not the experience of this blogger when checking out SQLite on Windows.    My first task at my new job was a simple enough one. All our customers have a review site that has a list of contacts. The file was contacts.html and it was just a static html file.   Since there are already 100s of sites using the static html, I wanted to avoid any kind of complex migration or external database. I decided to give SQLite a try since the db files are so portable. Each site would have it's own database with a single contacts table. Simple right? Let me go over all the problems I ran into.    He starts off with the fact that SQLite 3 doesn't work with PHP (different client drivers in PHP) and that PHP doesn't like SQLite 2 all that much either. His third and final experience? That SQLite isn't the brightest when it comes to working with directory permissions.
139275
Popular posts from PHPDeveloper.org for the past week:PHP-Coding-Practices.com: Try-Catch Syntax WeirdnessPHPBuilder.com: Cross-Platform Database PHP DevelopmentIBM developerWorks: Java and PHP technology on AIX - Integrate the Java business application w/ DB2OpenSourceCommunity.org: What do you think makes a good CMS?Jonathan Snook's Blog: Elemental: Conditional Content with CakePHPDevShed: The Basics of Using the Factory Pattern in PHP 5Builder.com.au: PHP exploit code plants itself in GIFJohn Cox's Blog:  Linux.com Now PHP PoweredNick Halstead's Blog: Solving Programming ProblemsPHP-Tools Blog: Testing FIT
313082
P&aacute;draic Brady, looking ahead to the work he will be doing over the next few months, is proposing on his blog about a new Zend Framework component - Zend_Service_Currency.    I did a quick check on what PHP classes are available for the purpose. There's really not a whole lot out there. There's a PEAR class along the lines I need, but it's released under the PHP License and, not to be too argumentative, I prefer non-PEAR solutions where the end-user may have no access to update PEAR.   So since the project is planned to use the Zend Framework, I shot off a mail to the Framework's fw-general mailing list to see if it would be a worthwhile contribution.    He sees that someone else had already opened a proposal for the same idea and decided to join with that group to work up the module. He also links to his original proposal and gives a brief overview of the goals of the package.
169108
For anyone keeping up with the PHP 5 Programming Contest that Zend hosted - the final results have been posted!
360849
On the Zend Developer Zone today, there's this new tutorial that looks at making the move from PHP4's object-oriented programming up to the "more complete obejct model of PHP5" - specifically with the Decorator design pattern.   While working on a project I realized one particular solution was a pretty good way to demonstrate the decorator design pattern together with some of PHP5's features, including abstract classes, interfaces, type hinting, the final keyword and the visibility of properties and methods. This article is intended for those of you who, like myself, are moving from object-oriented programming, including some use of design patterns, in PHP4, to the more complete object model of PHP5.   He sets up a scenario about the development of an online pizza ordering system to show how to "decorate" a pizza with each of the toppings on a list (instead of having to list out every pizza in every possible topping combination). Of course, all of the code is included and explained so you understand exactly what's happening. Finally, there's a demonstration of its usage - a simple call that grabs the stock level/name/cost of each of the items in stock (pizza combinations).
351080
Matthew O'Phinney had the chance to present the Zend Framework during a meeting he attended of his local PHP user group (BostonPHP) as a part of a series their doing.   Horde was also represented as part of the evening's fare. It was the first time I've attended a UG, so I got the double whammy of that and being a presenter. Oh, make it a triple whammy -- Boston is a 3+ hour drive from the Burlington, VT area I now call home.   He mentions a talk that Chuck Hagenbuch (of the Horde project) gave on the current state of the project and a bit about his presentation (including some portions that pointed out problems with the Zend_Db component). You can check out this and the rest of the contents of his presentation here [pdf] and here [mp3 podcast].
188297
Christian Wenz, back from the php/db|works conference and at a break following the conference, has posted some of his thoughts about this years conference over on his blog.   My schedule was crammed right after php|works 2006, so I could not find an earlier possibility to blog. Anyway, the extended entry contains my short report on php|arch's second conference this year.   He talks about some sightseeing before-hand, Tutorial Day, XML Security demos, Unicode in PHP6, a "slight problem" concerning his laptop, and his role on the Zend PHP5 Certification Panel. Check out the full entry for all of the details and "expect a separate blog entry later" on his experience on the panel.
416917
php|architect's A/R/T article repository has a new tutorial posted today with a look at logging in your application (the entire application) with the help of the Zend Framework by Stefan Koopmanschap.   There are different reasons for logging information, different strategies for what and how to log, and of course different ways of implementing it. This article will look at why you would want to log, what you want to log and how to do it.   They introduce  application-level logging, how it can help, what it can show you, and how it can make finding security issues even easier. They get into the code a bit later on, showing how to use the Zend file functionality to write out to a simple log file. They enhance it with a bit more information in the message, and show how to set a prefix/suffix to each line automatically (like a timestamp and a newline).
437031
In a new post today, P&aacute;draic Brady takes a look at the OpenID library included in the Zend Framework and his own efforts to create functionality of his own.   Here in the present, everyone I work with is all too aware of OpenID. [...] Enter the Zend Framework. If you've ever looked under the hood of the JanRain PHP-Openid library you'll notice they implement all of this without a single dependency on PEAR or other external classes.   He notes that this application of the "Not Invented Here" method that the Zend Framework follows might not be the best when there are already plenty of libraries out there that help with this exact functionality. He mentions a PEAR class that helps with it, but is written in PHP4 and hasn't quite been optimized.
377262
With just a quick, supporting note today, John Lim has posted to the PHP Everywhere blog about the Zend Core download that Zend offers to help make installing PHP and its friends even easier.   I'd like to point out that one of the greatest services to the PHP community that Zend is providing is the free Zend Core for Oracle and Zend Core for DB2. The latest versions install PHP 5.1.6. The little known secret is that these 2 installers are perfect for MySQL as the mysql and mysqli extensions are included in the release.   He also recommends it for the IISers out there because of the FastCGI support built in.
91596
Padraic Brady has posted a manifesto of sorts about the work that he's been doing on his PHPSpec library and trying to work it into the approval process for the Zend Framework.   I'll be attempting to pound the Zend Framework into submission so I can apply Behaviour-Driven Development (BDD) using PHPSpec when I write a Controller. Why? Because I feel like it, and it gives me an excuse to promote one possible incarnation of PHPMock and the PHPSpec Zend Framework extension. See? Perfectly reasonable selfishness!   He hopes to move it past the typical test-driven development process that PHPUnit offers and "kick your ass into high-TDD gear" without having to have worked much with it before then (the key is simplicity).   He includes some code examples (how it should flow) and describes some of the challenges that he's coming across so far, specifically with the way that the Zend Framework works with the Controllers and what he wants to accomplish.
624249
On the Zend Developer Zone, there's a new post pointing to the second part of their look at the Manning Publishing book "PHP in Action".   If you've been anxiously awaiting part two of this series then your wait is over. Here's a short introduction to the section part of this series written by the author of the book, Dagfinn Reiersol. I had the privilege of meeting Dagfinn at phpuk last week. Below the introduction is the link I know youâve been waiting for.   The new PDF they link to focus on two different patterns - the Decorator (a wrapper class) pattern and the Null Object (an object that works like the others but does nothing behind the scenes) pattern.
767479
Here's what was popular in the PHP community one year ago today:Matthew O'Phinney's Blog: svn:externals (and the Zend Framework)Mark Jaquith's Blog: WordPress 2.0.6: Feedburner issue, and fixJob Posting: Unborn Media Inc Seeks PHP/MySQL Developer (Boston, MA)Zend Developer Zone: Tutorial : Using Zend Framework Without PDONetmag.co.uk: Make your own SoapChristopher Jones' Blog: Duplicate Columns in "2 Day Plus PHP Developer Guide"International PHP Magazine: Poll Question: Which is the Best PHP MVC Framework?William Candillon's Blog: phpAspect alpha 0.1.0 is released!Community News: phpthrowdown Registration OpenZend Developer Zone:  AJAX Chat Part Tutorial 6 : Updating the User ListIBM developerWorks: U2 PDO Driver Tutorial, Parts 1 & 2Stoyan Stefanov's Blog: Reusing an existing database connection with MDB2DevShed: Introducing the Memento PatternNexen.net: PHP statistics for December 2006Sandro Groganz's Blog: Syntax Highlighting & Migrating Permalinks in WordPress