Updated Tutorial for Zend Framework 1.5

Zend Framework 1.5 has now been released to mark the occasion I have significantly updated my Zend Framework Tutorial! The tutorial was first released on 16th August 2006 and was written against version 0.1 of Zend Framework and had one major revision to bring in support for the ViewRenderer component.

Tutorial-Screenshot

The new tutorial produces exactly the same application as before, but now uses the new 1.5 goodies of Zend_Form and Zend_Layout, so you can see how these key components fit into a Zend Framework MVC application.

As always, when you find bugs and typos, please let me know and I'll fix them!

29 Responses to “Updated Tutorial for Zend Framework 1.5”

  1. 1 Turist

    I've waited for it for a long time :)

    Can you also present an aplication that requires login... access rights that do the same thing as the "zend framework tutorial".
    Thanks.

  2. 2 Jonathan Street

    There is an error in the sql to insert the data. The table created it called albums but the data goes into album.

    I'm giving it a try now.

  3. 3 Rob...

    Thanks Jonathan!

    I've updated the zip files.

    Regards,

    Rob...

  4. 4 Jonathan Street

    Excellent.

    Thanks for the great introduction. I took a look at your tutorial a couple of days ago when it was working around the 1.0.x release. I liked it then but taking another look now there is even more good stuff.

    I'll definitely have to have a play with the form and layout components.

  5. 5 Rob...

    Hi Turist,

    My Zend_Auth tutorial gives the basics of providing a login system. It needs updating for 1.5, but the core usage of Zend_Auth hasn't changed.

    Regards

    Rob...

  6. 6 Jason Qi

    It seems that the folder indent is not correct (page 2 of 19)

  7. 7 Turist

    Thanks Rob, I have problems with Zend_Auth because I use custom routes :(
    I need to provide "language param" in the url because I want to build a multilanguage site.
    In this case when I log into admin account I have the error with wrong controller specified :(

    When you have time can you give some advices for how to build multilanguage sites with zend framework.
    Thanks.

  8. 8 Pieter

    Great! Nice work :-)

    @Turist: Did you check Zend_Translate?

  9. 9 Turist

    Thanks Pieter, I'll look through Zend_Translate.

  10. 10 Źmicier

    I found 3 minor mistakes:
    1. Page 2: Folder indent is not correct (thanx to Jason Qi) and we dont see layouts folder.
    2. Page 10: Finally, we need some CSS styles: zf-tutorial/public/styles/site.css
    should be zf-tutorial/public/css/site.css
    3. Page 11: In our config.ini, the host, username, password and dbname parameters will
    be grouped under $config->db->config.

    Should be $config->db->params.

  11. 11 Rob...

    Thanks Jason and Źmicier!

    I have updated :)

    Regards,

    Rob..

  12. 12 Jason Qi

    You are very welcome Rob! One more little thing:

    In file \application\dbschema.sql, line 11

    "INSERT INTO album (artist, title)"
    should be
    "INSERT INTO albums (artist, title)"

  13. 13 Christian

    Hi,
    I'm following your tutorials and akrabat a long time and want to show my respect and thank for your great work. I'ld like to know how deep ACL and AUTH is covered by the book. I suppose, the focus of the book is more a beginners guide (correct me if I'm wrong) but as the ACL and Auth combination are very uncovered topics, some hint on an implementation suitable for a productive environment will be one more reason to buy.

  14. 14 Isidro

    Nice tutorial!!!

    I have a doubt... I want to personalize the messages of mistake to spanish (I'm spanish)

    Thanks!!!

  15. 15 christie

    Hi,when I Click the 'Add new album' or 'Edit' or 'Delete',Notice: HTTP 404...
    I don't know why?

  16. 16 Rob...

    christie,

    You have not set up mod_rewrite correctly.

    Regards,

    Rob...

  17. 17 kamm

    Thanks so much for this tutorial - it's simply the best to get a ZF newbie up and running.

    I'd be very grateful if someone could give a few pointers relating to this tutorial on how to implement decorators - I'm not really "getting it" when reading the manual..!

  18. 18 Rob...

    Kamm,

    There's a separate post on this site about Zend_Form: Simple Zend Form Example.

    Regards,

    Rob...

  19. 19 Dima

    Sorry, I'm rookie to PHP and ZF, but want to learn both. I set all stuff and it shows that
    Fatal error: Call to undefined method Zend_Config::asArray() in /home/webmaster/www/projects/album/index.php on line 24

    I don't know what is a problem. thanks

  20. 20 Rob...

    Dima,

    It should be toArray() not asArray(). Which version of the tutorial are you using?

    Regards,

    Rob...

  21. 21 Dima

    Rob,so i download the last version of tutirial now that works.

    I'm your fan! Big fan.

    Thanks!

    Dima

  22. 22 Michael

    Rob,
    This is the very first tutorial which is really working on the first trial I do. Thank you so much.

  23. 23 Rob...

    Hi Michael,

    I'm glad it helped you!

    Regards,

    Rob...

  24. 24 xuwei

    非常感谢你的分享,这是我找到最好的资料,期待更多,再次表示感谢!!!

  25. 25 Nguyen

    Hi Rob,
    Can you please tell how to add pagination to this example.

  26. 26 arturo

    hello l'm new in it.
    please
    can l help me, zend_auth and zend_acl for zend framework 1.5
    thenks....

  27. 27 Miguel Melo

    Hey rob, Amazing work! Thank you for this! Are you thinking to post any tutorial about log in ?

  28. 28 Miguel Melo

    Hi people, someone can tell me how do i make to when i just insert an album it redirects to the index where it lists the albuns and appears a message: A New album has been inserted sucessfully ? The redirect part it's easy ... but about the message ?

  29. 29 Rob...

    Miguel,

    You need the FlashMessenger Action Helper.

    Regards,

    Rob..

The views expressed in these comments are not the views of the publisher. However, we believe in the rights of others to express their legitimate views and concerns. Any legitimate complaint emailed to rob@akrabat.com will be seriously considered and the post reviewed as desirable and necessary.