I've written about Decoupled Content Management before. As the Symfony Live event in Paris is nearing, I thought to give Symfony CMF a spin. Symfony CMF is a new approach at building PHP content management systems, and adheres quite well to the principles of decoupled CMS:
Content is stored into a standard PHP Content Repository
Symfony2 is used as the web framework
Front-end editing works on the Create.js stack of VIE and Hallo
I'm especially happy with the front-end editor, which has been implemented...
In this new tutorial on NetTuts.com, they talk about one of the more fundamental connection types you can do in PHP - database connections. They want to be sure you're "doing it correctly" via PHP's PDO API.We've covered PHP's PDO API a couple of times here on Nettuts+, but, generally, those articles focused more on the theory, and less on the application. This article will fix that! To put it plainly, if you're still using PHP's old mysql API to connect to your databases, read on!They compare the three...
In a previous post I wrote about how to build a Mailchimp subscription form using the native WordPress Ajax API, jQuery and the Mailchimp API. Today we use the same Ajax API and jQuery to create a simple post report form. You can use that (additional) form to get a quick feedback from your blog's [...]
Michael Dowling has shared a new tool on his blog today - a parser for crontab files that can be used directly from within PHP - cron-expression.When faced with the task of creating the cron expression parsing part of this system, I searched high and low for an existing implementation in PHP that implemented the full feature set of a modern cron expression. Based on the context of this article, you probably guessed that I didn't find one. I posted the original code I came up with to StackOverflow and...
The PHPClasses.org site has released the latest episode in their "Lately in PHP" podcast series - Episode 24, "Do PHP Developers Need and will Adopt PHP Coding Standards?"The PHP Standards Group is trying to push new specifications for PHP coding standards. Whether PHP developers need and will adopt these standards was one of the main topics discussed by Manuel Lemos and Arturs Sosins in episode 24 of the Lately in PHP podcast.They also talk about some of the comments that Linus Torvalds recently made...
The Dev/Hell podcast (as hosted by two PHP community members, Chris Hartjes and Ed Finkler) has posted their latest episode - Episode 13: #tek12 or Something. I Don't Know. (This episode was recorded live at this year's php|tek conference.)This episode was recorded at the tek12 uncon in front of a live studio audience. We talk about pair programming, what we'd recommend to folks who want to start programming, the PHP-FIG & PSRs, and our favorite events from tek12. Also Chris punched Ed a couple times. It...
Ilia Alshanetsky has a new post to his blog sharing a method for fallback with PDO when your database connection fails.For our database connections we PDO at work and we've extended the class with PHP to offer some other convenience functionality and wrappers. One of the things I wanted to do recently is allow the constructor of the PDO class to fail-over to our backup database connection pool in the event the primary was not available.He wanted his code to catch an exception if the object was created...
Continuous deployment is all the rage right now, and I applaud the use of systems that automate a task that seems way easier than it is.
That said, sometimes you need something simple and straightforward: a hook that easily deploys a few pages, or a small application, all without often-complicated set up (come on, this is a PHP-focused site, mostly).Sometimes, you just need to deploy code when it's ready. You don't need a build; you don't need to run testsa-ayou just need to push code to a server. If you...
In this new post to his blog, Joshua Thijssen looks at using the Augeas tool in a PHP application. Augeas is a configuration editing tool, making it easy to parse many different types of configs and transform them into a tree structure.Even though I really like using sed and awk, sometimes its hard to change or add parameters in configuration files. Big sed statements that may or may not work, double checking if everything has been done correctly etc. Augeas is a really cool tool that lets you view / add...
Do PHP Developers Need and will Adopt PHP Coding Standards? - Lately in PHP podcast episode 24
By Manuel Lemos
The PHP Standards Group is trying to push new specifications for PHP coding standards. Whether PHP developers need and will adopt these standards was one of the main topics discussed by Manuel Lemos and Arturs Sosins in episode 24 of the Lately in PHP podcast.
They also discussed the complaints of Linus Torvalds on the limitations of GitHub handling Git pull requests and whether that will...
Software project choose languages based on idoms of the languages. Languages can provide mechanism and structures to support object orientation or a functional programming. Less time is spend thinking about backwards compatbility of a programming language runtimes. While this is usually a non-issue for short living software like websites or software in tightly controlled environment, it becomes an issue for software projects that need to guarantee backwards-compatbility for years. For example: a version...
Did you ever try to debug a system with multiple interacting web services?
We just released a tool, which we developed internally to be able to debug
complex HTTP based SOA stacks (REST). It offers the same listening capabilities
like Wireshark, but displays the HTTP requests in a far more readable way and
makes it easy to reproduce single requests. Read morea
Here are some updates on my chef resource for composer:
It started off with a PR where I was asked to include code that would download (and install) a composer.phar if none existed. Not a bad idea in general, but also not something I want to impose on anyone, so I decided to create a new action (or in chef-lingo goal) instead.setupUp until now, my php_composer resource supported :install which runs php composer.phar install when a composer.phar is in the designated directory:
For our database connections we PDO at work and we've extended the class with PHP to offer some other convenience functionality and wrappers. One of the things I wanted to do recently is allow the constructor of the PDO class to fail-over to our backup database connection pool in the event the primary was not available. The idea was to do something along the lines of:
On Friday, Dries merged in the first major work from the Web Services and Context Core Initiative (WSCCI). In short, it means we are now making use of all of the Symfony2 Components that we've pulled into core in the past few months.
It is also step one in the biggest change in Drupal's design since Drupal 4.7.
Microsoft recently announced that they will automatically enable the 'Do Not Track' header in Internet Explorer 10.
The DNT header allows a user to opt-out of being tracked by websites. This was introduced by Firefox, and now also has support from Opera and Safari (but not Chrome).This header is a great feature. Before, the ad providers had to ask the user on their website to opt-out, and this actually was usually implemented using a Cookie.Although not every ad publisher supports the DNT header yet,...
On PHPMaster.com today there's a good tutorial that gives you some methods to do one of the most important things in any application - validating input. Their examples show how to use some of PHP's own filter functions to accomplish this.Filter functions in PHP might not be sexy, but they can improve the stability, security, and even maintainability of your code if you learn how to use them correctly. In this article I'll explain why input validation is important, why using PHPs built-in functions for...
On the VG Tech blog today André Roaldseth has a new post showing how to lazy load in the Zend Framework bootstrap using two handy methods you can drop into your applications initialization.The Bootstrapping process in Zend Framework isn't perfect. You'll often end up bootstrapping a lot of resources that you don't need to complete the request. Depending on the resources this can be really expensive and hurt your overall performance. The worst kind are resources that open connections to external services...
Chris Hartjes, a big proponent of testing in the PHP community, has a new post to his blog about a new testing tool he's released to make it easier for you to know what needs testing - Tricorder.I've hacked together a little CLI script that I think will be of use to many people who are trying to answer the question "just what should I do to test this thing anyway?" as they learn how to write PHPUnit tests to go along with their code. [...] I've created something that I am calling PHP-Tricorder, a CLI...