Programming the new world

Programming your life and the net, one day at a time

Browsing This

Zend Framework 1.8 Workshop

Posted in June 25th, 2009
Published in PHP
Tags:

Hello Everybody,

today I gave a workshop at Skynet Belgacom on how to use the new features in Zend Framework: Zend_Application and Zend_Tool. Also a quick overview on how to use a DAO to separate the database from the model. The DAO and the model are kept very basic so everybody attending the workshop could understand the principle behind such a design principle.

I also gave an introduction to Zend_Auth and implemented a custom Zend_Auth_Adapter_Interface which could have been the Zend_Auth_Adapter_DbTable but that wouldn’t have teached my fellow colleagues on how extensible ZF really is…

Beneath I share the slides from this workshop. If you do it step by step at the end you will have a running ZF application based on modules.

have fun,

Nick Belhomme

Follow NickBelhomme on Twitter Follow NickBelhomme on Facebook

9 Users Commented In " Zend Framework 1.8 Workshop "

Subscribes to this post Comment RSS or TrackBack URL
abadaba says,
7-11-2009 at 07:31:32 from 71.198.210.49    

This is a great tutorial. I like the way you seperated the db actions into a DAO. When can we expect your next tutorial regarding ACL and the logged in members module? :) Thanks!

Nick says,
7-11-2009 at 18:16:19 from 84.193.86.50    

thx for the feedback. The next one is in progress.
Nick

abadaba says,
7-12-2009 at 00:18:48 from 71.198.210.49    

Looking forward to it…
I have one question. You created the UserDB model and DAO under the admin module. Wouldn’t it be more reusable if you put it somewhere where both the Default and Admin modules can access it so that you don’t have to re-write it for every module? Maybe I’m confused on this…
Thanks…

Nick says,
7-12-2009 at 12:45:40 from 84.193.86.50    

Rewriting for every module is not necessary. Every module has access to the models of others. But indeed it would be best to put it on another place. Remember these are slides that should be accompanied with explanations. During the workshops I elaborate deeper into the issue. Without the explanations you will have to do some thinking on your own. And it seems you do that. GREAT! Keep up the good work.

Nick
Nick

thatch says,
7-22-2009 at 17:06:16 from 212.219.221.148    

Hi There,

I’ve noticed a problem that stems from slide #26 when issuing the following commands via zf:

$ zf create action add index 1 admin
$ zf create action edit index 1 admin
$ zf create action delete index 1 admin

I am getting the following error:
Fatal error: Call to a member function search() on a non-object in C:\wamp\library\Zend\Tool\Project\Provider\Action.php on line 92

I have googled this and came to the following bug on zend’s bugtracker:

http://framework.zend.com/issues/browse/ZF-6585

however there is no fix.

Any suggestions?
Thatch

thatch says,
7-23-2009 at 12:14:53 from 212.219.221.148    

Hi Again,

Just noticed on slide #36

$users->update($username, $pwd, $firstname);

should be

$users->update($id,$username, $pwd, $firstname);

Behrang says,
5-24-2010 at 08:01:03 from 78.38.206.74    

First thanks for your helpful tutorial,
second when I go to http://localhost/myprogect/admin I get this error:
Message: Invalid controller specified (index)
what you think about it? I’m using zf 1.9 create successfully admin module but when I go to admin module I found IndexController.php renamed it to Admin_IndexController.php as you say
another thing is in my .zfproject.xml I have :

maybe help!

Nick says,
5-25-2010 at 09:24:11 from 194.78.5.130    

Hi Behrang,

you should NOT rename the filename IndexController.php in the admin module, BUT rename the class name inside this file from class IndexController to class Admin_IndexController

Admin_ is a namespace specifically used for classes INSIDE the admin module directory.

Friendly greetings,
Nick

Behrang says,
5-26-2010 at 07:24:08 from 78.38.206.73    

Dear Nick
With your help my problem solved that wasted two days of my time .
Tanks
Behrang

Leave Your Reply Below

 Username

 Email Address

 Website

Sticky note: Please double check your comments before submit Please Note: The comment moderation maybe active so there is no need to resubmit your comment

All time most popular tags