Writing Doctrine Unit Tests with Zend_Test

December 2nd, 2009

Building on the Introduction to Doctrine 1.2 video, this video will show how you can easily test the persistence of Doctrine models within the Zend_Test environment.

I also touch briefly on how to setup the latest version of MAMP with phpunit.

Edit: I spoke to Guilherme Blanco (one of the core developers behind Doctrine) and he kindly brought up some things I should bear in mind for my Doctrine / Zend set.
Doctrine’s autoloader configuration can be scaled back by doing PEAR style Model Loading (new to 1.2). Also, you can use Doctrine_Core instead of Doctrine since everything has been moved to Doctrine_Core in order to follow Zend-style namespacing.

lastly, you can register your own CLI tasks as part of Doctrine’s CLI script or just write them in the scripts/doctrine.php file. With this, you could have your newly-generated models placed in the necessary folders. I’ll be experimenting with this in the coming week.

Enjoy!
 

Using Zend_Cache to speed up Web Service calls

September 14th, 2009

A short video showing how you can test and implement Zend_Cache on a class that makes a really slow request (like a web service call).
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.

Previous Parts

Show Synopsis

  • 0:00 – What is caching
  • 4:15 – preparing our bootstrap (for later on)
  • 6:25 – Reviewing the class we want to unit test
  • 10:25 – writing our first iteration of the Zend_Cache
  • 13:22 – front options and back options
  • 15:00 – looking at what Zend_Cache is caching
  • 18:25 – Moving caching into the bootstrap
 

Introduction to the Google Docs API

August 4th, 2009

This video is going to be first in a small series looking at how we can integrate a small handful of the many Google APIs into a Zend Application. We’ll look at using a google docs spreadsheet as a data store and have it talk to your zend application through a small collection of unit tests. In following videos, we’ll start using the maps API for geocoding and finally plotting people to places using the Google Maps embeddeble map. Browse the source code or download the project. Discuss this video on the forum.

 

Introducing Zend_Acl

June 21st, 2009

There’s been a lot of talk on Twitter about doing some videos about Zend_Acl, so by popular demand, here’s part 1 of a 2 part series about Zend_Acl.

I’m going to do this with the unit testing framework we setup in the last video tutorial so that I can focus on the meat of Zend_Acl and its power.

If you don’t have unit testing setup locally, feel free to grab the source here, or a zipped version of the project.

 
Desktop RSS feed iPhone + iPod