Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Julien Pauli:
Huge Page usage in PHP 7
Oct 30, 2015 @ 12:16:48

In this post to his site Julien Pauli looks at the concept of "huge pages" and how it relates to some of the behind the scenes work done in PHP 7 to improve memory usage.

Memory paging is a way Operating Systems manage userland process memory. Each process memory access is virtual, and the OS together with the hardware MMU must translate that address into a physical address used to access the data in main memory (RAM).

Paging memory is dividing memory in chunks of fixed size, called pages. [...] Why use huge pages? The concept is easy. If we make the OS Kernel use bigger page sizes, that means that more data can be accessed into one single page. That also means that we'll suffer from less TLB miss, once the page translation is stored into the TLB, because one translation will now be valid for more data.

He briefly covers how some updated memory handling and opcode restructuring helps PHP 7 perform even better, especially when it comes to the OPCache handling. He talks about the changes made in the extension specifically to support the "huge pages" idea, complete with code examples (in C) of how this was accomplished.

tagged: huge page php7 memory improvement performance opcache

Link: http://jpauli.github.io/2015/10/28/huge-page.html

SitePoint PHP Blog:
Using BoltCMS to Build a Small Business Website
Apr 21, 2015 @ 12:12:23

The SitePoint PHP blog has a new tutorial posted showing you how to set up a simple small business website using the BoltCMS tool. This recent article will walk you through the full installation, configuration and setup for a simple site including database interactions.

As the web continues to mature and the demand for the efficiency of content delivery increases, more and more slim and trim CMSs are coming into the fray. Developers (front-end and back-end) are branching away from the heavy-hitters like WordPress and Drupal, and into the likes of more streamlined, tailor-made solutions. Bolt CMS is one of these CMSs, and prides itself on being a dream for designers, developers, and content editors alike.

He starts with a brief overview of what the BoltCMS has to offer and some of the technology that powers it. He then goes through each of the steps to get the application up and running:

  • Requirements, setup and installation
  • Main configuration and theme set up
  • Splitting up files into templates
  • Introducing and creating content types
  • Retrieving content from database records

Each step along the way includes the code, configuration changes or template updates you'll need to make to end up with a simple site allowing you to view a page of content and list/add related testimonials.

tagged: boltcms small business website tutorial page testimonial

Link: http://www.sitepoint.com/using-boltcms-build-small-business-website/

New Supported Versions Timeline Page
Oct 29, 2014 @ 11:18:40

The PHP.net website has introduced a new feature to help make it a bit clearer which versions of PHP are supported and which have reached their end-of-life mark. This new Supported versions page off the main site provides listings of currently supported versions and graphical timelines of past (and future) support milestones.

Each release branch of PHP is fully supported for two years from its initial stable release. During this period, bugs and security issues that have been reported are fixed and are released in regular point releases. After this two year period of active support, each branch is then supported for an additional year for critical security issues only. Releases during this period are made on an as-needed basis: there may be multiple point releases, or none, depending on the number of reports.

The page includes information on when the initial release in a series was made (like the 5.4.x or 5.5.x series), when active support did/will end and how long the timeline is for security fixes and support. As of the time of this post, PHP 5.3.x is the only series that has reached end-of-life, but the 5.4.x series is coming close being in security fix only mode now and EOL-ing completely in ten months.

tagged: version support timeline page phpnet release bugfix security

Link: http://php.net/supported-versions.php

Matthew Weier O'Phinney:
Deployment with Zend Server (Part 6 of 8) - Page Caching
Sep 11, 2014 @ 14:57:08

Matthew Weier O'Phinney has posted his sixth part (of eight) in his "deployment with Zend Server" tips and tricks. In this latest post he talks about page caching.

This is the sixth in a series of eight posts detailing tips on deploying to Zend Server. The previous post in the series detailed setting job script status codes. Today, I'm sharing some tips around setting up page caching, and jobs for clearing the Zend Server page cache.

He starts off describing what Zend Server offers in the way of page caching and provides an example (with screenshots) of how he sets his up to work with multiple subdomains. He then shows how to set what variable the caching looks at to tell the difference between pages and how to clear the cache on deploy. He includes a simple script to help with that, running through a list of paths and calling the flush on each.

tagged: zendserver deployment tips series part6 page caching

Link: https://mwop.net/blog/2014-09-11-zend-server-deployment-part-6.html

Cal Evans:
Step 0 when hiring PHP developers online. Get this right!
Aug 12, 2014 @ 09:25:31

Cal Evans has a new post to his site with a great suggestion for those looking to hire PHP developers: get your jobs page right and show that you have a good "developer culture" to attract good, solid talent.

When building an online strategy for finding developers to hire, start with your web site. It is amazing that so many companies miss this totally or mess this step up. Make sure you have a top level menu item that is easy to identify as “this is where we post jobs”. Call it “Jobs”, “Careers”, “Work with us” whatever, just make sure it’s in the top level of your menu and not something that people have to dig down into your site to get to.

He also suggests that you treat the "Jobs" page as an important part of the site. Vague or incomplete descriptions of the positions turn off developers and will make them move on to something else. Link to the deeper details and don't overwhelm the viewer with it all up front. He gives two examples of companies that he thinks have gotten it right and how it reflects on their investment in developer culture.

So step 0 in the process of finding developers to work on your team is to build a culture of respect. If you get this right, attracting developers – attracting the best developers – will be easy. Get this wrong though, nothing else will matter. Remember, developer talk to each other within their community. They will know if you are not a good place to work.
tagged: hiring developer jobs page step0 culture

Link: http://blog.calevans.com/2014/08/11/step-0-when-hiring-php-developers-online-get-this-right/

Paul Jones:
"Page Script" As A Degenerate Controller
Feb 04, 2014 @ 12:26:52

In his latest post Paul Jones looks at the more legacy structure of "page controllers" (a site based on several pages rather than an MVC style) that was common before the "MVC revolution" in the PHP community years back.

Almost all of the legacy applications I’ve had to deal with were page-based. In doing the work to modernize them, there comes a time where the page script has been refactored to look very much like a page controller, with some distinct but not critical differences. As such, I have come to consider the typical PHP page script to be a degenerate form of a page controller. With a little imagination, I think it’s easy to see why.

He talks about how, in this older situation, the web server becomes a sort of "simplified front controller+router+dispatcher" and the PHP page acts as a "controller". He suggests that, even though this structure isn't as well separated as an MVC application, it can still be organized to make it easier to maintain.

tagged: page controller mvc legacy structure

Link: http://paul-m-jones.com/archives/5907

Aura.Web: Aura’s Page Controller for MVC
Jun 05, 2013 @ 09:58:42

On PHPMaster.com today Hari K T has spotlighted one of the components from the Aura framework, the Aura.Web component.

MVC is an acronym that means Model-View-Controller. In this tutorial I would like to introduce you to Aura.Web, the controller component of the Aura Library. Here I’ll show you how to use it to build your own controller, and also how to use a response transfer object to issue HTTP response headers, and integrate a templating engine like Mustache for rendering views.

He starts off with an overview of how the component is architected and how it is used to create controllers and what dependencies it needs injected. He talks about some of the objects and the methods they provide and includes some sample code for a basic "Index" controller. He shows how to integrate the Mustache templating engine for output and how to work directly with HTTP responses.

tagged: auraweb aura framework page controller mvc tutorial introduction

Link: http://phpmaster.com/aura-web-auras-page-controller-for-mvc

Symfony Blog:
Static Page Caching & Payment Validators in Symfony 2.2
Dec 12, 2012 @ 11:46:39

On the Symfony blog, there's two new posts highlighting some recent improvements to the Symfony2 framework - the addition of static page caching and payment validators:

These features are all a part of the upcoming Symfony 2.2 release that's planned to be moved in the "stabilization" status in early 2013. It should be able two months following that when the stable version will be released.

tagged: symfony framework page caching payment validator


Matthew Weier O'Phinney:
Zend Server, ZF2, and Page Caching
Nov 06, 2012 @ 10:53:56

If you're considering using Zend Server in your development, you might find this new post from Matthew Weier O'Phinney interesting. It talks about a handy feature of the tool and how it can help with the performance of a Zend Framework 2-based application.

Zend Server has a very cool Page Caching feature. Basically, you can provide URLs or URL regular expressions, and tell Zend Server to provide full-page caching of those pages. This can provide a tremendous performance boost, without needing to change anything in your application structure; simply enable it for a set of pages, and sit back and relax. [...] However, this feature is not entirely straight-forward when using a framework that provides its own routing, such as ZF2. The reason is because it assumes by default that each match maps to a specific file on the filesystem, and prepares the caching based on the actual file it hits.

Since configuration is mostly done through Server's web interface, this could be a problem. Thankfully, he shows you another setting that allows you to cache multiple versions of pages based on parameters you define. Using this and a setting of "_SERVER" with a value of "[REQUEST_URI]" you should be good to go.

tagged: zendframework2 zendserver page cache configuration


Robert Basic's Blog:
Zend Framework full page cache tips
Feb 13, 2012 @ 11:45:10

If you're looking at using the full-page caching that the Zend Framework has to offer, you should read about Robert Basic's experiences with it before implementing it in your application.

When I started rewriting this blog, I knew from start that I want to use Zend Framework's full page caching, as, I think, that's the best cache for this purpose. Not much going on on the front end, much more reads than writes, no ajax or any other "dynamic" content. While implementing the cache, I ran into two issues.

His issues revolved around the feature not creating valid cache files due to a duplicate "startSession" call in his code and having the Google Analytics code included in the template (with different keys every time). You can find out more about this functionality in the Zend Framework manual.

tagged: zednframework fullpagecache problem page contents