May 21st, 2009
This is part 2 in a series on many to many with Zend_Form and Zend_Db. I suggest starting with last week’s video on Zend_Db and many-to-many in order to follow the configuration of our models. Grab the code and follow along! This concludes this series on Zend_Db. I’ve also uploaded a zipped version of the code if that’s easier than Google Code.
Topics: zend_db |
Tags: many-to-many, models, persistence, zend_controller, zend_db, zend_form
Posted in zend_db |
10 Comments »
May 4th, 2009
This is part 3 in the Zend_Db series. I’m only scratching the surface with what you can do with Zend_Db_Table classes, however starting is often the hardest part. I’ve posted the code once again on the Google code for this episode, so please don’t be shy and grab a copy.
There’s a lot of discussion over where and how I’m using the model in the comments, and I have a feeling that as I keep doing this, some of my controversial design decisions (whether out of ignorance, which I’ll gladly acknowledge, or professional experience) might start to surface. I’m really hoping to do a series of similar videos with Doctrine, since I find their solution to database persistence really elegant. If anyone has any suggestions, or would like access to the Google code, I would love to open up the discussion and find the “best practices” here. Personally, I would start by moving our custom made form to Zend_Form and adding some much needed validation to the project.
Lastly, I need to apologize for the delay, this week has been quite full due to work and personal commitments. I’m going to keep the video a week schedule as best I can. The video also deals with setting up the MySQL database, if this isn’t interesting, skip to the 12 minute mark.
Topics: zend_db |
Tags: database, layer, one-to-many, persistence, service layer, table data gateway, zend_db, zend_db_table
Posted in zend_db |
34 Comments »
April 22nd, 2009
This is the second in a series exploring Zend_Db_Table. We finish up the project in the last video by adding Update and Delete functionality to our UserService. Grab the source code and follow along.
Topics: zend_db |
Tags: database, layer, persistence, service layer, table data gateway, zend_db, zend_db_table
Posted in zend_db |
23 Comments »
April 17th, 2009
This video is the first in a series on Zend_Db. I start with a looking at insert and read using the Zend_Db_Table classes with a bit of Zend_Db_Select thrown in at the end. Next week will be a followup with update and delete with the help of a custom route, some view partials and a few more additions to our service layer. I’m not a fan of putting business logic in the same object as a class belonging to the Table Data Gateway pattern, so I’ve created a custom UserService object to help seperate the view and model layers. This would also be in keeping if you had multiple service layers (for example, a database, a couple RSS feeds and a couple of web services) and wanted to keep their business logic and querying outside of the Controller. I don’t bother with Zend_Form since it’s configuration heavy and only really interesting in conjunction with validators, however it would fit in perfectly as an extension to this project. The code can be downloaded for this and next weeks episode to help you follow along.
Topics: zend_db |
Tags: database, persistence layer, service layer, table data gateway, zend_db, zend_db_table
Posted in zend_db |
29 Comments »