Pragmatism in the real world

Evan Coury: Module-specific layouts in Zend Framework 2

Evan Coury has posted Module-specific layouts in Zend Framework 2 First, I should point out that the title of this post is a bit of an intentional misnomer. There’s really no such thing as “module-specific” anything in ZF2, so what we’re really talking about is the topmost namespace of the controller being dispatched. So in the case of MyModuleControllerSomeController, the topmost namespace would be MyModle. In most cases, this will be the name of a… continue reading.

Evan Coury: Sharing a database connection across modules in Zend Framework 2

Evan Coury has posted Sharing a database connection across modules in Zend Framework 2 » Evan's Blog With the new modular infrastructure in Zend Framework 2, one of the most common questions will indoubitably be how to share a database connection across modules. Here’s a quick explanation of how to share your database connection across multiple modules in a way that can even allow you to use a single connection between ZendDb, Doctrine2, and possibly… continue reading.

Ralph Schindler: PHP Constructor Best Practices And The Prototype Pattern

Ralph Schindler has posted PHP Constructor Best Practices And The Prototype Pattern If your knowledge of constructors ends with “the place where I put my object initialization code,” read on. While this is mostly what a constructor is, the way a developer crafts their class constructor greatly impacts the initial API of a particular class/object; which ultimately affects usability and extensibility. After all, the constructor is the first impression a particular class can make. In… continue reading.

Pádraic Brady: A Hitchhiker’s Guide to Cross-Site Scripting (XSS) in PHP (Part 1)

Pádraic Brady has posted A Hitchhiker’s Guide to Cross-Site Scripting (XSS) in PHP (Part 1): How Not To Use Htmlspecialchars() For Output Escaping: Always set the third parameter to htmlspecialchars(), set it correctly, and make sure your document is never served with a mismatched or invalid character encoding! Don’t expect some theoretically perfect world to magically appear – browsers are filthily efficient at doing weird things you don’t expect. With a nod to the anniversary… continue reading.

Matthew Weier OPhinney: View Layers, Database Abstraction, Configuration, Oh, My!

Matthew Weier OPhinney has posted View Layers, Database Abstraction, Configuration, Oh, My! Late last week, the Zend Framework community 2.0.0beta3, the latest iteration of the v2 framework. What have we been busy doing the last couple months? In a nutshell, getting dirty with view layers, database abstraction, and configuration. This is a must read article if you want to know what's new in ZendView, ZendDb and ZendConfig!

Shahar Evron: Generating ZF Autoloader Classmaps with Phing

Shahar has posted a new article about how to generate ZF2 autoloader classmaps with phing. As the ZF2 classmap autoloader is quicker than the standard autoloader, this can be a benefit in production, so being able to automate the creation is beneficial. Fortunately, using ZF2′s autoloader stack and Phing, we can enjoy both worlds: while in development, standard PSR-0 autoloading is used and the developer can work smoothly without worrying about updating class maps. As… continue reading.

Jason Grimes: Using Doctrine 2 in Zend Framework 2

Jason Grimes has posted an article showing how to use Doctrine 2 with Zend Framework 2. He uses my tutorial as the starting point which enables him to concentrate on the Doctrine integration rather than the irrelevant details about setting a ZF2 application which is excellent. He walks through 6 steps in order to do the integration: This article shows how to set up and use Doctrine 2 in Zend Framework 2, by extending Rob’s… continue reading.

Evan Coury: Keeping a clean GitHub fork – Part 1

Evan has posted the first of a series of articles on his blog about using git and github successfully: Let’s face it, nobody likes a dirty fork. In this series, I’ll show you some of the tricks I’ve learned over the years to successfully maintain a clean fork on GitHub for projects I actively contribute to. The first article covers creating your clone, adding remotes, keeping things up to date and working in topic branches.… continue reading.

Remi Woler: The 10 rules to get support through IRC

Remi Woler has posted a useful article on getting support via IRC. Zend Framework has the #zftalk irc channel and I strongly recommend going through his points. I especially liked point 4: Ask a complete question, directed to anyone willing to answer (that is: don't direct it to any person or group in particular). If someone knows and has time, they will respond. Why rule out people in advance, without even telling what your question… continue reading.