News Feed
Sections




News Archive
feed this:

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

Robert Hafner:
A Walkthrough of PSR-6 Caching
October 23, 2014 @ 09:17:41

The PHP-FIG (Framework Interoperability Group) has been helping to define standards that can be adopted by projects to make them easier to cross-pollinate and give developers more choices with less hassle. One of the latest to be proposed by the group is PSR-6, the Caching proposal. For those not familiar with it, Robert Hafner has written up an introduction to the proposal and what it all entails.

There's been a lot of discussion about PSR-6, the php-fig caching interfaces, so I thought it was time to step in and describe what this system is all about. Be prepared to read far more about caching interfaces than you probably thought possible.

He starts with a look at why a standard like this might be necessary (and links to the PSR-6 docs for the official word). He does also mention some alternative proposals and gets into details - with code examples - of each of them and shows how they relate back to what's proposed in PSR-6. He finishes off the post with a brief Q&A trying to dispel some of the myths that have com up around the standard. These include "This is all just too complex", "The Pool/Item model isn't used anywhere" and " This is just standardizing Stash", each with their own summary and feedback.

0 comments voice your opinion now!
walkthrough psr6 caching proposal alternatives examples

Link: http://blog.tedivm.com/rants/2014/10/a-walkthrough-of-psr-6-caching/

Matthew Weier O'Phinney:
Deployment with Zend Server (Part 6 of 8) - Page Caching
September 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.

0 comments voice your opinion now!
zendserver deployment tips series part6 page caching

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

DZone.com:
PHP Performance Crash Course, Part 2 The Deep Dive
November 13, 2013 @ 10:56:33

DZone.com has posted the second part of a two-part series looking at increasing the performance of your PHP applications (part one is here). In this new post, he looks at a few topics including caching, session handling and asynchronous processing with Resque and Redis.

Ultimately, scalability is about the entire architecture, not some minor code optimizations. Often times people get this wrong and naively think they should focus on the edge cases. Solid architectural decisions like doing blocking work in the background via tasks, proactively caching expensive calls, and using a reverse proxy cache will get you much further than arguing about single quotes or double quotes.

He briefly recaps some of the "core principles" for optimizing applications and gets right into explaining the later ones on the list:

  • Optimize sessions through memcached handling
  • HTTP request/response caching
  • Caching Doctrine result sets
  • Caching the web service responses made with Guzzle
  • Handling asynchronous processing with Resque and Redis

He includes code and configuration examples for each item, helping to flesh them out a bit more. He also makes a recommendation of using something like AppDynamics to monitor the performance of your application (disclaimer: he works for them).

0 comments voice your opinion now!
performance crash course part2 series caching redis memcached session

Link: http://architects.dzone.com/articles/php-performance-crash-course-0

SitePoint PHP Blog:
Yii Routing, Active Record and Caching
November 07, 2013 @ 09:37:31

On the SitePoint PHP blog today Sandeep Panda has a new article looking at routing, using Active Record and caching with the Yii Framework. The Yii framework is a " a high-performance PHP framework best for developing Web 2.0 applications".

Almost all modern web apps have 3 major concerns: Retrieving data from a database easily and effectively, caching the web content and URL rewriting to create user friendly URLs. Yii, like any other good framework, offers simple and easy solutions to all of the above. [...] In this tutorial we will look at how Yii greatly simplifies the development of database driven websites with its Active Record support. Additionally, Yii lets you further improve your websites by implementing user friendly URLs and powerful caching techniques.

He creates a simple application based on the Yii framework skeleton called "gadgetstore" that works with fictional phone data. He shows how to set up a few sample routes and adding the "phone" table to the database. He then uses the framework's tools to auto-generate the model and shows the save/delete operations. He then creates the "Phone" controller and an add action to handle the create submissions. Finally, he gets into caching the response data and uses the built-in "cache" function for the models to store the results of a "findAll" request.

0 comments voice your opinion now!
yii framework caching activerecord routing

Link: http://www.sitepoint.com/yii-routing-active-record-caching/

Reddit.com:
PSR-6 Caching Interface and PSR-5 PHPDoc enter Draft status
August 28, 2013 @ 15:30:29

As is mentioned in this Reddit post, two new PSRs have officially entered "Draft" status - PSR-5 for PHPDocumentor standards and PSR-6 related to caching implementations.

PSR-4 got to draft status a week ago and the other day it went into Review status. I pushed it to Review quickly as its already been around for several months (before this new workflow existed) so there didn't seem like much point in waiting. In less than two weeks we can put that in for an acceptance vote and we will have a new autoloader! Excellent. More good news from the FIG is that PSR-5 and PSR-6 are officially coming onto the scene, both now in Draft status too!

PSR-5, the PHPDoc standard, is more of an inclusion (and update) of most of the current standards people use when writing their PHPDoc comments, just more formalized by the PHP-FIG. PSR-6 is newer and is more akin to the logging PSR, defining the basic interface for an interchangeable caching layer. You can read more about each of the proposals in the mailing list: PSR-5: PHPDoc and PSR-6: caching.

0 comments voice your opinion now!
phpfig psr5 psr6 caching phpdocumentor phpdoc standard interface

Link: http://www.reddit.com/r/PHP/comments/1la27y/psr5_caching_interface_and_psr6_phpdoc_enter/

NetTuts.com:
HTTP The Protocol Every Web Developer Must Know - Part 2
April 29, 2013 @ 15:07:21

NetTus.com has followed up their previous article covering some of the basics of the HTTP protocol with this new post, part 2 of the series. They suggest that HTTP, the messaging format of the web, is the one protocol that every web developer should know.

In my previous article, we covered some of HTTP's basics, such as the URL scheme, status codes and request/response headers. With that as our foundation, we will look at the finer aspects of HTTP, like connection handling, authentication and HTTP caching. These topics are fairly extensive, but we'll cover the most important bits.

In this article, they talk about things like the HTTPS secure version of HTTP, server-side connection handling, identification/authorization and working with caching and cache control headers.

0 comments voice your opinion now!
http developer knowledge https authentication connections caching

Link: http://net.tutsplus.com/tutorials/tools-and-tips/http-the-protocol-every-web-developer-must-know-part-2

Symfony Blog:
Static Page Caching & Payment Validators in Symfony 2.2
December 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.

0 comments voice your opinion now!
symfony framework page caching payment validator


Zumba Engineering Blog:
Some CakePHP optimizations
November 07, 2012 @ 09:31:20

For those out there using the CakePHP framework to create your applications, you might be interested in these quick tips from Juan Basso on the Zumba Engineering Blog for both the architecture and actual code to optimize the performance of the app.

Our site and system has a lot of throughput and it make us use more instances and try to reduce the load in every part. It makes the company happy (save money) and also make the customer happy (faster load). On this article I will go over few things in terms of architecture and some code changes/strategies that could make your application faster as well.

Some of the recommendations include:

  • Installing the APC/opcode caching to help save execution time
  • Avoiding as many network requests as possible
  • Use local file/data caching
  • Using the "requestAction" inside controllers with its built-in caching
0 comments voice your opinion now!
cakephp optimize caching apc opcode file resource


PHPMaster.com:
Subtype Polymorphism - Swapping Implementation at Runtime
September 17, 2012 @ 12:48:52

On PHPMaster.com there's a new tutorial from Alejandro Gervasio about subtype polymorphism. It sounds a little scary, but really it's just a look at sub-objects that inherit from parents and how to swap them around at runtime to do different things.

In this article I'll show you how to exploit the virtues that Polymorphism offers through the development of a pluggable cache component. The core functionality can be expanded later to suit your needs through the development of additional cache drivers.

He starts off with the definition of an interface to provide structure to the sample application (the CacheInterface) and implements it in two different subtypes - a FileCache and an AppCache (using the file system and APC, respectively). He builds on these and creates a "View" that uses these caching systems to generate and save the output to a cache for use later in the execution.

0 comments voice your opinion now!
subtype polymorphism tutorial interface abstract caching


Maarten Balliauw's Blog:
Running Memcached on Windows Azure for PHP
October 24, 2011 @ 21:52:11

Maarten Balliauw has a new post to his blog with a guide to running mamcached on Windows Azure for PHP, a tool targeted towards PHP on Windows users to provide them with the ability to cache outside of their application.

While Windows Azure offers a distributed caching layer under the form of the Windows Azure Caching, that components currently lacks support for non-.NET technologies. I've heard there's work being done there, but that's not very interesting if you are building your app today. This blog post will show you how to modify a Windows Azure deployment to run and use Memcached in the easiest possible manner. Note: this post focuses on PHP but can also be used to setup Memcached on Windows Azure for NodeJS, Java, Ruby, Python...

He provides a phar-based scaffolding you can use to set up the instance and describes two ways of accomplishing it - the "short way" of relying on the scaffolding or the "long way" describing what the scaffolder does behind the scenes (complete with code). For this, you can also download the source and look through it.

0 comments voice your opinion now!
windows azure memcached caching tool tutorial



Community Events





Don't see your event here?
Let us know!


composer framework library conference voicesoftheelephpant release opinion language artisanfiles community version laravel podcast tool series security symfony list introduction interview

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework