Lee Blue's Blog: How To Implement A Ruby on Rails style before_filter With The PHP Zend Framework
446342
Lee Blue has posted something looking to bridge yet another gap between Ruby on Rails and PHP - a method for adding before_filter functionality to PHP.   I often use this when implementing a simple login screen for a password protected section of my application. In a Zend Framework application you can implement a preDispatch() function in a Zend_Controller_Action which will run before an action is dispatched. This lets you setup your filter to check to see if the visitor is logged in or not. If the visitor is not logged in, you can redirect them to the login screen of your application.   He includes example code to show its usefulness - checking to see two things: is a user is logged in and to see if they're allowed to use a certain resource.
179571
Here's what was popular in the PHP community one year ago today:Splitbrain.org: Add comments to any PHP scriptRyan Malesevich's Blog: Separate Trackbacks from Comments RevisitedDeveloperTutorials.com: Inserting An Array Into A DatabaseSymfony Blog: The Definitive Guide to Symfony and symfony 1.0 RC1 releasedSoledad Pendaes' Blog: PHP will never have a (real) Rails-like frameworkJSLabs Blog:  A web server in PHPRobert Swarthout's Blog: PHP frontend to Subversion (SVN)Christopher Jones' Blog: OCI8 1.2.3 Patch is Available on PECLDotVoid.com: Parsing the user agent string using PHPPaul Jones' Blog: Solar 0.26.0 Released, and New WebsitePierre-Alain Joye's Blog: Zip 1.8.5, small bug fixes releaseZend Developer Zone: Zend Monthly Newsletter - JanuaryMike Potter's Blog: Flash, Flex and PHP Just Got A Huge BoostJonathan Snook's Blog: Review: PHP SolutionsOracle Technology Network: Creating an Ajax Process Using PHP and Oracle
169108
For anyone keeping up with the PHP 5 Programming Contest that Zend hosted - the final results have been posted!
746444
Josh Sharp has posted a new article to his blog advocating something that there's still a lot of controversy around in the PHP community - frameworks (when to use them and when to not).   PHP's ease of use is also its downfall. Because there are less restrictions on the structure of the code you write, it's much easier to write bad code. But there is a solution: use a framework. [...] Of course, if you're not taken with any of the packages above you can also write your own framework, which I've done and will talk about in the next few posts. But for now, let's have a look at the common benefits of a framework.   He's broken it out to talk about the usual framework structure, MVC and how a framework can enforce good code standards. He also mentions some happy side benefits of their use including making for "pretty URLs" and the helpers that most of the frameworks come with.
78691
Reading about the Model/View/Controller style of framework is one thing, but actually implementing a system based on it is a different story. Arnold decided to embark on this journey and is taking you along for the ride in this new post to his blog.   Thanks to the rise of the PHP frameworks the Model View Controller pattern is becoming quite popular. To get a good idea how this works and what job PHP and Apache have, I've written a short example Hello World application which implements the MVC model without the use of a framework.   He starts with a sort of general overview of the framework - advantages, disadvantages, etc - before getting into the code. He's creating a simple "Hello world" kind of application to show how it's done and includes links to the code he's created for the controller, the action, views, the router (an Apache .htaccess file), and the PHP to handle all of the requests.
343952
The Zend Developer Zone has posted an announcement about a new book from php|architect (authored by DevZone's own Cal Evans) - Guide to Programming with the Zend Framework.   This is a project I've been interested in since it's very beginning, mainly because I'm the author of this particular tome. [...] The php|architect web site was a bit more helpful giving a breakdown of the contents of the book and a useful quote.   The book covers topics on the framework like the parts of MVC, web services, authorization, exceptions and even some tutorials to help you get started (including a look at the brand new Zend_Layout class).
755892
The Zend Developer Zone has posted the latest podcast in its PHP Abstract series. This time it's hosted by Paul Jones, developer of the Solar framework project, who talks gives an overview of the project and its place in the PHP community.   Today's special guest is Paul M. Jones. Paul is an internationally-recognized expert PHP developer and technical consultant living in Memphis, TN. On his blog, he writes mostly about his software projects, but also touches on management, business, politics, and culture.   You can grab the show directly or subscribe to the feed to get this and more great shows from the podcast (with topics covered like PHP & Java, CodeIgniter, Security and much more)
611971
Although frankly I really didn't feel the need to read the entire thread, I can tell you that the posting to the PHP 3 mailing list is related to the Smarty Templating Engine back in the day. In fact, I believe this was the original spec Andrei proposed before Smarty even existed. Although I don't remember the exact e-mail, this posting reminded me that there was a point in time I thought exactly this way... quoting myself:
259423
Rob Allen has posted about a small modification that he made to his Zend Framework setup that allows for a little safer echoing of information out to the View later of an application.   One of my biggest issues with using PHP as the templating engine in View scripts is that the easiest way to echo a variable is the least secure. [...] So, I decided to leverage a post by Mike Naberezny from a while ago about streams. The idea is all his; I just modified it to work with Zend Framework's Zend_View the way I wanted it to.   His method uses a slightly different output format - instead of using a normal echo statement to push out the escaped output, it uses a special syntax using the "@" sign as a shortcut to the call to escape(). He includes the code you'll need to make it work in your ZF install and explain it a bit (including where the real key lies - in stream_popen).
181510
Dave Dash has posted his own summary about a recent PHP-related conference that happened in Amersfoort - SymfonyCamp.   He talks about some of the presentations given, the other conference attendees, Fabien Potencier's Symfony 2.0 talk, his own talk on the Zend Search Lucene component and the "clean up" project they spent a day working on.   You can also check out Fabien's overview of the event (with more photos) for a different perspective.
680036
Chris Hartjes has posted the first part of a series on the "rebirth" of a component that was contributed to the Zend Framework - Zend_Service_Audioscrobbler (to interface with the Audioscrobbler service from Last.fm).   Many moons ago I set out (along with my friend Derek) to make a contribution to Zend Framework in the form of an add-on to let people easily access the Audioscrobbler web service. We worked really hard, implemented all the features of the web service at that time. Imagine our surprise when it got accepted as part of the 1.0 release of Zend Framework! Awesome! It even has it's own entry in the manual and everything.   He admits, though, that the code is not all that it could be and cites some examples as well as ways he would make it all work so much better.
241556
Cody Caughlan has created a project that brings one of the popular features of Ruby on Rails to the world of PHP5 - database migrations.   One of the cool things I like about Ruby on Rails is the use of "migrations" for maintaining your DB. Migrations have proven to be pretty handy in keeping a local database in sync with the work of other developers. [...] Because migrations are incremental and they are done in a structured manner, it is a great way of pushing out new DB changes to the production database servers.   His framework, Ruckusing Migrations, is a modular framework that makes use of some of the more advanced features of PHP5. It's portable (via an adapter interface) and uses a generic task interface (task files) to load functionality into the framework. There's also plenty of API hooks to allow for a developer to easily create their own custom operations.   Check out the project homepage for more information.
242013
Popular posts from PHPDeveloper.org for the past week:ProDevTips.com: Writing a CMS/Community with Smarty and the Zend Framework: Part 6Nessa's Blog: Using an .htaccess with PHP Compiled as CGIArnold Daniels' Blog: How I PHP: The Output Handler - ContinuedMartynas Jusevicius' Blog: PHP 5 features: Class autoloadingSean Coates' Blog: Actually Solving a Problem (believe it or not)The Northclick Blog: Message Queue Project: First working versionStefan Mischook's Blog: A Question about object properties in PHP ClassesJob Posting: G2 Technology Seeks PHP Developer (Memphis, TN)Rob Allen's Blog: Zend_View: Access the view from a view helperDavid Walsh's Blog: Using PHP Generic Objects To Organize Your Code
304735
Continuing on from his preamble on the integration of the PHPSpec BDD tool into the Zend Framework, Padraic Brady has posted the next in the series - a look at what it would take to make the integration happen.   The ideal was to move away from line-by-line setup and manipulation of Zend instances towards a more simplified model which is standardised for any PHPSpec specs.   He's already created an "experimental branch" to work inside of and some of these updates have been made to the trunk for the release of PHPSpec 0.3.0. The key that he found was in getting the customization of the "Zend Context operational to set up elements of the FrontController". He also includes a simple example of the extended functionality in action - simple interface methods to work with Twitter.
654789
Padraic Brady has posted today about a subclass of the Zend_Loader package (in the Zend Framework) he had written up to handle Dependency Injections - it was submitted but ended up being replaced with a Zend_Di component instead.   I realised someone had proposed a novel new component called Zend_Di, and that small change was since accepted by Federico into his DI buster. This is a quick overview with very simple use cases - read the full proposal for even more gory details about your object innards using DI.   He talks about what DI (dependency injection) is and what it can be used for and includes a simple example set around a controller in the framework that uses the Zend_Di component to make a "mock Zend_Mail" that can be used in testing too. Examples of these sorts of tests (with PHPSpec) are included too.
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.
84118
KillerPHP.com has a new articles posted today looking at another one of the components of the Zend Framework - Zend_View.   As part of a series of articles about the Zend Framework and MVC, I'd like to take some time and cover Zend_View (the 'V' in that MVC triad).   He touches on where the Zend_View component's place in life is and even includes some sample code to show one in action (along with an explanation of what it's doing).