January 13th, 2010
There’s been a lot of talk online about finding the best approach for bringing Zend and Doctrine 1.x together. This video is my humble approach of combining some of the learning brought about over the last few weeks on Zendcasts, as well as suggestions from Doctrine developers.
The goal of this video is to show how you leverage the existing resource loading tools in Zend to have a model structure that reflects Zend’s best practices. This video builds on the last Doctrine video, but if you’re familiar with both frameworks, you should be able to follow along. Enjoy!
Grab a copy of the project or browse the repository.
Also, a big thank you to ServerGrove for extending their support of Zendcasts for January. ServerGrove specializes in Zend Framework hosting and they’ve offered a 10% rebate on hosting with coupon code “zc”. If you’re looking for a host, be sure to check them out. They’ve also added an additional coupon for “Mini Hosting” plans, get $2 off by using code “zcmini”.
Topics: Working with a Database |
Tags: bootstrap, doctrine, integration, relations, zend_config, zend_controller
Posted in Working with a Database |
Episode Discussion
November 23rd, 2009
By popular demand, I’ve put together an introduction to Doctrine 1.2 integration with the Zend Framework. Doctrine is a fantastic ORM (object-relational mapping tool). If you’ve jumped from NHibernate or Hibernate and are itching to have a powerful tool for handling database relationships, Doctrine is probably your best bet. On the mailing lists, there’s a lot of talk about integrating Doctrine 2.0 into the 2.0 release of the Zend Framework. Regardless, this will help you get up to speed today. In next week’s video, I’ll show you how you can unit test those models in the Zend Framework.
Enjoy!
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.
Grab a copy of the project or browse the repository.
Topics: Working with a Database |
Tags: bootstrap, doctrine, framework, integration, zend_config
Posted in Working with a Database |
Episode Discussion
November 5th, 2009
We’re going to build on what was covered in the last video and work with Zend Controller Plugins to specify a special layout for each module in our application. We’ll also look at how we can clean up the configuration of our Bootstrap.php file by moving as much configuration as possible into the application.ini file. Included in this video is a very quick look at how the Zend Framework’s resources are defined and loaded.
Grab a copy of the project or browse the repository.
Topics: zend_controller |
Tags: bootstrap, modules, zend_config, zend_controller_plugin
Posted in zend_controller |
12 Comments »
March 18th, 2009
This podcast is a two-parter: Zend_Config_Ini and Zend_Http_Client(). While the two classes aren’t married together in the video, anyone serious about writing an API to their web application will need to access the API differently in development, staging and production environments.
We also take 10 minutes and 4 lines of code to work with the Twitter API. Jump to around the 15 minute mark if you’re already up to speed on Zend_Config_*.
I’m trying to cover the basic classes required to write a web service in the video next week. I’ve gotten a couple emails about covering Zend_Db. Since this podcast has covered Zend_Controller_* and Zend_View_* classes, the Zend_Db_* are starting to appear as the odd class out. I’m hoping to introduce Zend_Db by mid April.
View / download the source on Google Code
Topics: Web Services |
Tags: rest, Web Services, zend_config, zend_http_client
Posted in Web Services |
6 Comments »