News Feed
Jobs Feed
Sections




Recent Jobs

News Archive
feed this:

Adrian Schneider's Blog:
Caching Zend Framework Forms
February 11, 2010 @ 11:36:10

In a new post to his blog Adrian Schneider looks at a method for caching your forms in your Zend Framework application so you don't have to recreate it every time.

Generating a form is an expensive process in ZF. It's always bugged me that I can't find any resources on trying to cache the initial HTML anywhere, so I took a stab at it myself. I use a loader from inside my controller action to load forms and models, so I found that was a good place to start.

To help solve the problem, he's created a simple loader class (maybe dropped into an action helper) that, when used will cache the form (using Zend_Cache, of course) to keep the object instance where you can get to it later. The code to implement it and to put it to good use is also included.

0 comments voice your opinion now!
cahe zendform zendframework zendcache tutorial



Joey Rivera's Blog:
Using Zend_Paginator with Twitter API and Zend_Cache
January 29, 2010 @ 10:54:44

In a recent post to his blog Joey Rivera looks at using the Zend_paginator component with Twitter and APC to create a cachable, paged view of a set of Twitter API results.

I'm going to focus more on Zend_Paginator and Zend_Rest_Client to access Twitters API since I've already created a post on Zend_Cache. Normally, I would use Zend_Service_Twitter to access the twitter service but it still seems to require authentication to retrieve a users timeline where only protected users should require authentication.

He includes all of the needed code including the bootstrap.ini file and his own custom Twitter service class that grabs the timeline of the given user and calls the REST interface to grab the latest posts and caches them to a file.

0 comments voice your opinion now!
zendpaginator zendcache tutorial twitter api


Zend Developer Zone:
Enhance performance with Zend_Cache
January 08, 2010 @ 08:44:50

On the Zend Developer Zone there's a recent tutorial from Chris Renner focusing on the use of the Zend_Cache component of the Zend Framework to increase the performance of your site by caching chunks of data to easy retrieval.

The applications I develop and manage are very heavy with database transactions. Hitting the db every time you need an object is a serious performance bottleneck, and on a shared environment can be troubling to other applications living in the same environment. I'm going to describe my experiences with Zend_Cache here, but I am not going to bore you with lots of code detail and specifics.

He talks about the frontends you can use to cache the data to different types of formats, includes a code example for caching objects with the component and how to clear out the cache when you need to refresh the content.

0 comments voice your opinion now!
zendcache performance zendframework tutorial


Joey Rivera's Blog:
Caching using PHP/Zend_Cache and MySQL
November 10, 2009 @ 14:47:40

New on his blog today Joey Rivera has posted this tutorial about using the Zend_Cache component of the Zend Framework to boost the performance of your site.

I like the definition used in Wikipedia: "a cache is a temporary storage area where often accessed data can be stored for quick access". The idea is to get 'often accessed data' from a database and store it in memory (RAM or as a file in your local file system). [...] Resources are limited on systems and to take advantage of your resources, you need to make sure time isn't spent on tasks that could be handled better elsewhere.

He talks about the Zend_Cache component and what sort of features it includes like the different caching methods (file, SQLite, mamcache, etc) and the different frontends your application can use (output caching, class caching, file caching, etc). He sets up a sample environment and shows how to cache a variable to a file, database results into a file, caching an entire page and how to clear out the cached items.

0 comments voice your opinion now!
caching zendframework zendcache tutorial mysql


ZendCasts:
Using Zend_Cache to speed up Web Service calls
September 15, 2009 @ 12:07:16

On the ZendCasts site today there's a new video looking at the Zend_Cache component of the Zend Framework and how it can be used to speed up the response time for things like calls to a web service.

This is part 4 in a four part series on Google Docs and Google maps. While this example shows how to cache a Class to a file, you could easily modify the code to work with other caching backends such as a memory-based caching engine or something like Zend Optimizer or APC.

If you want to get caught up on the series, here's the links to part one, two and three.

0 comments voice your opinion now!
zendcache zendframework webservice tutorial video


Content with Style Blog:
A caching pattern for models
April 17, 2009 @ 08:44:38

On the Content with Style blog there's a new post by Pascal Opitz talking about a suggested caching pattern for use with the Zend_Cache component of the Zend Framework and the __call magic method.

The initial thought behind this is that a model should be able to return calls either uncached or cached, without initializing some cache object every time. It should be easy to switch between the two calls, and the cache should be coming with the model object already.

He compares the old way - making a new cache object and performing actions based on that - to his new way of already having a cache object as a part of the model to help with storing any information you wanted anywhere inside. He includes a code example showing the method, basically a call to create the cached object in the constructor and, when a method is called, the __call traps it and dynamically attaches that cache object to it.

0 comments voice your opinion now!
caching pattern model zendcache zendframework model tutorial


Developer Tutorials:
Zend Framework Tutorial
August 14, 2008 @ 07:52:16

On the Developer Tutorials site there's a new tutorial providing an introduction to the popular PHP framework, the Zend Framework.

I find myself constantly bombarded with questions from students and co-workers I've introduced to the Zend Framework regarding how the different components can come together to form a basic application. I've searched, I have found, I have emailed great tutorials, but still the most common questions are posed "What's should I include in index.php?", "Should I use Zend_Db_Table?", "And what about Zend_Form?"

It gives the usual overview of setting up an application and how its all structured but it also includes a specific look at the Zend_Form, Zend_Db_Table, Zend_Registry and Zend_Cache components.

0 comments voice your opinion now!
zendframework tutorial introduction zendform zenddbtable zendregistry zendcache


Rob Allen's Blog:
Notes on Zend_Cache
July 11, 2008 @ 07:58:43

Rob Allen has posted a few notes about the Zend_Cache component of the Zend Framework to his blog today.

Recently I needed to speed up a legacy project that makes a lot of database calls to generate each page. After profiling, I discovered that 90% of the database calls returned data that rarely changed, so decided to cache these calls. One of the nice things about Zend_Framework is that its use-at-will philosophy means that you can use any given component with minimal dependencies on the rest of the framework code.

He shows how, using the Zend_Cache module (and friends Zend_Loader and Zend_Exception), he creates a caching class that can be called anywhere and is used to cache the results from the queries. His default lifetime is set to 7200 seconds - two hours - before the script needs to refresh the cache and get the latest updates.

0 comments voice your opinion now!
zendcache zendframework sql query results example


Doug Brown's Blog:
Zend_Cache is Saving me Money!
July 04, 2008 @ 07:55:01

Doug Brown has posted a new entry to his blog about how the Zend_Cache component of the Zend Framework has saved him some money.

He and his site were taken offline by his own hosting company because of one little detail - the limit on usage for the shared server was 3% and his site was using 30%. Going through his logs, he found the culprit - a "too many connections" message from MySQL due to the number of requests.

I'll admit, I was in a huge hurry to get this project done, so I wasn't thinking about the long term effects. Needless to say, I wasn't caching my MySQL query results. I know, tisk tisk.

He added a new private method to his class (using Zend_Cache to store the date) and dropped the call into his controller to pulled the cached info whenever it needed it.

0 comments voice your opinion now!
zendcache zendframework hosting shared mysql connection usage cache


Nick Halstead's Blog:
Making a TAG Cloud out of Zend_Cache
May 09, 2007 @ 10:14:00

In his current work with a project staring the Zend Framework, Nick Halstead has figured out a way to create a tag cloud that can be loaded quickly with the help of the Zend_Cache component.

Zend_Cache is a caching mechanism that either lets you cache chunks of output or chunks of data. Both concepts are easy to implement within your code and given time they become second nature to use. And because they are simple to implement you find yourself using them anywhere and everywhere.

In his example, he grabs treed category data and dumps it (formatted) into a Zend_Cache object. He also mentions what he calls a "touch of genius on the part of the Zend Framework team" - the ability to tag the cache and make it easy to reference.

Finally, it's back out to the front end, an interface to the cached object that pushes the data back out as a series of formatted links pointing to content associated with the chosen tag.

0 comments voice your opinion now!
tagcloud zendframework zendcache cache data tagcloud zendframework zendcache cache data



Community Events









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


symfony codeigniter extension podcast release zend microsoft zendframework feature developer framework facebook sqlserver job opinion wordpress conference performance windows drupal

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